TSK-247: Added customX as filter/sortorder to all queries.

This commit is contained in:
Marcel Lengl 2018-02-19 14:53:31 +01:00 committed by Holger Hagen
parent 11442571f2
commit 7200a826fe
6 changed files with 917 additions and 23 deletions

View File

@ -284,4 +284,164 @@ public interface ClassificationQuery extends BaseQuery<ClassificationSummary> {
* @return the query
*/
ClassificationQuery custom8Like(String... custom8Like);
/**
* Sort the query result by key.
*
* @param sortDirection
* Determines whether the result is sorted in ascending or descending order. If sortDirection is null,
* the result is sorted in ascending order
* @return the query
*/
ClassificationQuery orderByKey(SortDirection sortDirection);
/**
* Sort the query result by the parent classification ID.
*
* @param sortDirection
* Determines whether the result is sorted in ascending or descending order. If sortDirection is null,
* the result is sorted in ascending order
* @return the query
*/
ClassificationQuery orderByParentId(SortDirection sortDirection);
/**
* Sort the query result by category.
*
* @param sortDirection
* Determines whether the result is sorted in ascending or descending order. If sortDirection is null,
* the result is sorted in ascending order
* @return the query
*/
ClassificationQuery orderByCategory(SortDirection sortDirection);
/**
* Sort the query result by domain.
*
* @param sortDirection
* Determines whether the result is sorted in ascending or descending order. If sortDirection is null,
* the result is sorted in ascending order
* @return the query
*/
ClassificationQuery orderByDomain(SortDirection sortDirection);
/**
* Sort the query result by name.
*
* @param sortDirection
* Determines whether the result is sorted in ascending or descending order. If sortDirection is null,
* the result is sorted in ascending order
* @return the query
*/
ClassificationQuery orderByName(SortDirection sortDirection);
/**
* Sort the query result by service level.
*
* @param sortDirection
* Determines whether the result is sorted in ascending or descending order. If sortDirection is null,
* the result is sorted in ascending order
* @return the query
*/
ClassificationQuery orderByServiceLevel(SortDirection sortDirection);
/**
* Sort the query result by priority.
*
* @param sortDirection
* Determines whether the result is sorted in ascending or descending order. If sortDirection is null,
* the result is sorted in ascending order
* @return the query
*/
ClassificationQuery orderByPriority(SortDirection sortDirection);
/**
* Sort the query result by the application entry point name.
*
* @param sortDirection
* Determines whether the result is sorted in ascending or descending order. If sortDirection is null,
* the result is sorted in ascending order
* @return the query
*/
ClassificationQuery orderByApplicationEntryPoint(SortDirection sortDirection);
/**
* Sort the query result by custom property 1.
*
* @param sortDirection
* Determines whether the result is sorted in ascending or descending order. If sortDirection is null,
* the result is sorted in ascending order
* @return the query
*/
ClassificationQuery orderByCustom1(SortDirection sortDirection);
/**
* Sort the query result by custom property 2.
*
* @param sortDirection
* Determines whether the result is sorted in ascending or descending order. If sortDirection is null,
* the result is sorted in ascending order
* @return the query
*/
ClassificationQuery orderByCustom2(SortDirection sortDirection);
/**
* Sort the query result by custom property 3.
*
* @param sortDirection
* Determines whether the result is sorted in ascending or descending order. If sortDirection is null,
* the result is sorted in ascending order
* @return the query
*/
ClassificationQuery orderByCustom3(SortDirection sortDirection);
/**
* Sort the query result by custom property 4.
*
* @param sortDirection
* Determines whether the result is sorted in ascending or descending order. If sortDirection is null,
* the result is sorted in ascending order
* @return the query
*/
ClassificationQuery orderByCustom4(SortDirection sortDirection);
/**
* Sort the query result by custom property 5.
*
* @param sortDirection
* Determines whether the result is sorted in ascending or descending order. If sortDirection is null,
* the result is sorted in ascending order
* @return the query
*/
ClassificationQuery orderByCustom5(SortDirection sortDirection);
/**
* Sort the query result by custom property 6.
*
* @param sortDirection
* Determines whether the result is sorted in ascending or descending order. If sortDirection is null,
* the result is sorted in ascending order
* @return the query
*/
ClassificationQuery orderByCustom6(SortDirection sortDirection);
/**
* Sort the query result by custom property 7.
*
* @param sortDirection
* Determines whether the result is sorted in ascending or descending order. If sortDirection is null,
* the result is sorted in ascending order
* @return the query
*/
ClassificationQuery orderByCustom7(SortDirection sortDirection);
/**
* Sort the query result by custom property 8.
*
* @param sortDirection
* Determines whether the result is sorted in ascending or descending order. If sortDirection is null,
* the result is sorted in ascending order
* @return the query
*/
ClassificationQuery orderByCustom8(SortDirection sortDirection);
}

View File

@ -215,4 +215,264 @@ public interface WorkbasketQuery extends BaseQuery<WorkbasketSummary> {
*/
WorkbasketQuery orderByType(SortDirection sortDirection);
/**
* Sort the query result by domain.
*
* @param sortDirection
* Determines whether the result is sorted in ascending or descending order. If sortDirection is null,
* the result is sorted in ascending order
* @return the query
*/
WorkbasketQuery orderByDomain(SortDirection sortDirection);
/**
* Add the domains for pattern matching to your query. It will be compared in SQL with the LIKE operator. You may
* use a wildcard like % to specify the pattern. If you specify multiple arguments they are combined with the OR
* keyword.
*
* @param domain
* the domains of workbaskets as Strings
* @return the query
*/
WorkbasketQuery domainLike(String... domain);
/**
* Sort the query result by custom property 1.
*
* @param sortDirection
* Determines whether the result is sorted in ascending or descending order. If sortDirection is null,
* the result is sorted in ascending order
* @return the query
*/
WorkbasketQuery orderByCustom1(SortDirection sortDirection);
/**
* Sort the query result by custom property 2.
*
* @param sortDirection
* Determines whether the result is sorted in ascending or descending order. If sortDirection is null,
* the result is sorted in ascending order
* @return the query
*/
WorkbasketQuery orderByCustom2(SortDirection sortDirection);
/**
* Sort the query result by custom property 3.
*
* @param sortDirection
* Determines whether the result is sorted in ascending or descending order. If sortDirection is null,
* the result is sorted in ascending order
* @return the query
*/
WorkbasketQuery orderByCustom3(SortDirection sortDirection);
/**
* Sort the query result by custom property 4.
*
* @param sortDirection
* Determines whether the result is sorted in ascending or descending order. If sortDirection is null,
* the result is sorted in ascending order
* @return the query
*/
WorkbasketQuery orderByCustom4(SortDirection sortDirection);
/**
* Sort the query result by organization level 1.
*
* @param sortDirection
* Determines whether the result is sorted in ascending or descending order. If sortDirection is null,
* the result is sorted in ascending order
* @return the query
*/
WorkbasketQuery orderByOrgLevel1(SortDirection sortDirection);
/**
* Sort the query result by organization level 2.
*
* @param sortDirection
* Determines whether the result is sorted in ascending or descending order. If sortDirection is null,
* the result is sorted in ascending order
* @return the query
*/
WorkbasketQuery orderByOrgLevel2(SortDirection sortDirection);
/**
* Sort the query result by organization level 3.
*
* @param sortDirection
* Determines whether the result is sorted in ascending or descending order. If sortDirection is null,
* the result is sorted in ascending order
* @return the query
*/
WorkbasketQuery orderByOrgLevel3(SortDirection sortDirection);
/**
* Sort the query result by organization level 4.
*
* @param sortDirection
* Determines whether the result is sorted in ascending or descending order. If sortDirection is null,
* the result is sorted in ascending order
* @return the query
*/
WorkbasketQuery orderByOrgLevel4(SortDirection sortDirection);
/**
* Add the 1st custom property to your query.
*
* @param custom1
* the 1st custom property as String
* @return the query
*/
WorkbasketQuery custom1In(String... custom1);
/**
* Add the 1st custom property for pattern matching to your query. It will be compared in SQL with the LIKE
* operator. You may use a wildcard like % to specify the pattern. If you specify multiple arguments they are
* combined with the OR keyword.
*
* @param custom1
* the 1st custom property of workbaskets as Strings
* @return the query
*/
WorkbasketQuery custom1Like(String... custom1);
/**
* Add the 2nd custom property to your query.
*
* @param custom2
* the 2nd custom property as String
* @return the query
*/
WorkbasketQuery custom2In(String... custom2);
/**
* Add the 2nd custom property for pattern matching to your query. It will be compared in SQL with the LIKE
* operator. You may use a wildcard like % to specify the pattern. If you specify multiple arguments they are
* combined with the OR keyword.
*
* @param custom2
* the 2nd custom property of workbaskets as Strings
* @return the query
*/
WorkbasketQuery custom2Like(String... custom2);
/**
* Add the 3rd custom property to your query.
*
* @param custom3
* the 3rd custom property as String
* @return the query
*/
WorkbasketQuery custom3In(String... custom3);
/**
* Add the 3rd custom property for pattern matching to your query. It will be compared in SQL with the LIKE
* operator. You may use a wildcard like % to specify the pattern. If you specify multiple arguments they are
* combined with the OR keyword.
*
* @param custom3
* the 3rd custom property of workbaskets as Strings
* @return the query
*/
WorkbasketQuery custom3Like(String... custom3);
/**
* Add the 4th custom property to your query.
*
* @param custom4
* the 4th custom property as String
* @return the query
*/
WorkbasketQuery custom4In(String... custom4);
/**
* Add the 4th custom property for pattern matching to your query. It will be compared in SQL with the LIKE
* operator. You may use a wildcard like % to specify the pattern. If you specify multiple arguments they are
* combined with the OR keyword.
*
* @param custom4
* the 4th custom property of workbaskets as Strings
* @return the query
*/
WorkbasketQuery custom4Like(String... custom4);
/**
* Add the 1st organization level to your query.
*
* @param orgLevel1
* the 1st organization level as String
* @return the query
*/
WorkbasketQuery orgLevel1In(String... orgLevel1);
/**
* Add the 1st organization level for pattern matching to your query. It will be compared in SQL with the LIKE
* operator. You may use a wildcard like % to specify the pattern. If you specify multiple arguments they are
* combined with the OR keyword.
*
* @param orgLevel1
* the 1st organization level as Strings
* @return the query
*/
WorkbasketQuery orgLevel1Like(String... orgLevel1);
/**
* Add the 2nd organization level to your query.
*
* @param orgLevel2
* the 2nd organization level as String
* @return the query
*/
WorkbasketQuery orgLevel2In(String... orgLevel2);
/**
* Add the 2nd organization level for pattern matching to your query. It will be compared in SQL with the LIKE
* operator. You may use a wildcard like % to specify the pattern. If you specify multiple arguments they are
* combined with the OR keyword.
*
* @param orgLevel2
* the 2nd organization level as Strings
* @return the query
*/
WorkbasketQuery orgLevel2Like(String... orgLevel2);
/**
* Add the 3rd organization level to your query.
*
* @param orgLevel3
* the 3rd organization level as String
* @return the query
*/
WorkbasketQuery orgLevel3In(String... orgLevel3);
/**
* Add the 3rd organization level for pattern matching to your query. It will be compared in SQL with the LIKE
* operator. You may use a wildcard like % to specify the pattern. If you specify multiple arguments they are
* combined with the OR keyword.
*
* @param orgLevel3
* the 3rd organization level as Strings
* @return the query
*/
WorkbasketQuery orgLevel3Like(String... orgLevel3);
/**
* Add the 4th organization level to your query.
*
* @param orgLevel4
* the 4th organization level as String
* @return the query
*/
WorkbasketQuery orgLevel4In(String... orgLevel4);
/**
* Add the 4th organization level for pattern matching to your query. It will be compared in SQL with the LIKE
* operator. You may use a wildcard like % to specify the pattern. If you specify multiple arguments they are
* combined with the OR keyword.
*
* @param orgLevel4
* the 4th organization level as Strings
* @return the query
*/
WorkbasketQuery orgLevel4Like(String... orgLevel4);
}

View File

@ -1,5 +1,6 @@
package pro.taskana.impl;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@ -57,9 +58,11 @@ public class ClassificationQueryImpl implements ClassificationQuery {
private String[] custom7Like;
private String[] custom8In;
private String[] custom8Like;
private List<String> orderBy;
ClassificationQueryImpl(TaskanaEngine taskanaEngine) {
this.taskanaEngineImpl = (TaskanaEngineImpl) taskanaEngine;
this.orderBy = new ArrayList<>();
}
@Override
@ -253,6 +256,86 @@ public class ClassificationQueryImpl implements ClassificationQuery {
return this;
}
@Override
public ClassificationQuery orderByKey(SortDirection sortDirection) {
return addOrderCriteria("KEY", sortDirection);
}
@Override
public ClassificationQuery orderByParentId(SortDirection sortDirection) {
return addOrderCriteria("PARENT_ID", sortDirection);
}
@Override
public ClassificationQuery orderByCategory(SortDirection sortDirection) {
return addOrderCriteria("CATEGORY", sortDirection);
}
@Override
public ClassificationQuery orderByDomain(SortDirection sortDirection) {
return addOrderCriteria("DOMAIN", sortDirection);
}
@Override
public ClassificationQuery orderByPriority(SortDirection sortDirection) {
return addOrderCriteria("PRIORITY", sortDirection);
}
@Override
public ClassificationQuery orderByName(SortDirection sortDirection) {
return addOrderCriteria("NAME", sortDirection);
}
@Override
public ClassificationQuery orderByServiceLevel(SortDirection sortDirection) {
return addOrderCriteria("SERVICE_LEVEL", sortDirection);
}
@Override
public ClassificationQuery orderByApplicationEntryPoint(SortDirection sortDirection) {
return addOrderCriteria("APPLICATION_ENTRY_POINT", sortDirection);
}
@Override
public ClassificationQuery orderByCustom1(SortDirection sortDirection) {
return addOrderCriteria("CUSTOM_1", sortDirection);
}
@Override
public ClassificationQuery orderByCustom2(SortDirection sortDirection) {
return addOrderCriteria("CUSTOM_2", sortDirection);
}
@Override
public ClassificationQuery orderByCustom3(SortDirection sortDirection) {
return addOrderCriteria("CUSTOM_3", sortDirection);
}
@Override
public ClassificationQuery orderByCustom4(SortDirection sortDirection) {
return addOrderCriteria("CUSTOM_4", sortDirection);
}
@Override
public ClassificationQuery orderByCustom5(SortDirection sortDirection) {
return addOrderCriteria("CUSTOM_5", sortDirection);
}
@Override
public ClassificationQuery orderByCustom6(SortDirection sortDirection) {
return addOrderCriteria("CUSTOM_6", sortDirection);
}
@Override
public ClassificationQuery orderByCustom7(SortDirection sortDirection) {
return addOrderCriteria("CUSTOM_7", sortDirection);
}
@Override
public ClassificationQuery orderByCustom8(SortDirection sortDirection) {
return addOrderCriteria("CUSTOM_8", sortDirection);
}
@Override
public List<ClassificationSummary> list() {
LOGGER.debug("entry to list(), this = {}", this);
@ -314,6 +397,15 @@ public class ClassificationQueryImpl implements ClassificationQuery {
}
}
private ClassificationQuery addOrderCriteria(String columnName, SortDirection sortDirection) {
String orderByDirection = " ASC";
if (sortDirection != null && SortDirection.DESCENDING.equals(sortDirection)) {
orderByDirection = " DESC";
}
orderBy.add(columnName + orderByDirection);
return this;
}
public String[] getKey() {
return key;
}

View File

@ -36,19 +36,36 @@ public class WorkbasketQueryImpl implements WorkbasketQuery {
private String[] keyIn;
private String[] keyLike;
private String[] keyOrNameLike;
private String[] domain;
private String[] domainIn;
private String[] domainLike;
private WorkbasketType[] type;
private TimeInterval[] createdIn;
private TimeInterval[] modifiedIn;
private String[] descriptionLike;
private String[] ownerIn;
private String[] ownerLike;
private String[] custom1In;
private String[] custom1Like;
private String[] custom2In;
private String[] custom2Like;
private String[] custom3In;
private String[] custom3Like;
private String[] custom4In;
private String[] custom4Like;
private String[] orgLevel1In;
private String[] orgLevel1Like;
private String[] orgLevel2In;
private String[] orgLevel2Like;
private String[] orgLevel3In;
private String[] orgLevel3Like;
private String[] orgLevel4In;
private String[] orgLevel4Like;
private TaskanaEngineImpl taskanaEngineImpl;
private List<String> orderBy;
WorkbasketQueryImpl(TaskanaEngine taskanaEngine) {
this.taskanaEngineImpl = (TaskanaEngineImpl) taskanaEngine;
orderBy = new ArrayList<>();
this.orderBy = new ArrayList<>();
}
@Override
@ -58,14 +75,8 @@ public class WorkbasketQueryImpl implements WorkbasketQuery {
}
@Override
public WorkbasketQuery domainIn(String... domain) {
this.domain = domain;
return this;
}
@Override
public WorkbasketQuery typeIn(WorkbasketType... type) {
this.type = type;
public WorkbasketQuery keyLike(String... keys) {
this.keyLike = toUpperCopy(keys);
return this;
}
@ -82,14 +93,26 @@ public class WorkbasketQueryImpl implements WorkbasketQuery {
}
@Override
public WorkbasketQuery keyLike(String... keys) {
this.keyLike = toUpperCopy(keys);
public WorkbasketQuery keyOrNameLike(String... keysOrNames) {
this.keyOrNameLike = toUpperCopy(keysOrNames);
return this;
}
@Override
public WorkbasketQuery keyOrNameLike(String... keysOrNames) {
this.keyOrNameLike = toUpperCopy(keysOrNames);
public WorkbasketQuery domainIn(String... domain) {
this.domainIn = domain;
return this;
}
@Override
public WorkbasketQuery domainLike(String... domain) {
this.domainLike = domain;
return this;
}
@Override
public WorkbasketQuery typeIn(WorkbasketType... type) {
this.type = type;
return this;
}
@ -133,6 +156,102 @@ public class WorkbasketQueryImpl implements WorkbasketQuery {
return this;
}
@Override
public WorkbasketQuery custom1In(String... custom1) {
this.custom1In = custom1;
return this;
}
@Override
public WorkbasketQuery custom1Like(String... custom1) {
this.custom1Like = toUpperCopy(custom1);
return this;
}
@Override
public WorkbasketQuery custom2In(String... custom2) {
this.custom2In = custom2;
return this;
}
@Override
public WorkbasketQuery custom2Like(String... custom2) {
this.custom2Like = toUpperCopy(custom2);
return this;
}
@Override
public WorkbasketQuery custom3In(String... custom3) {
this.custom3In = custom3;
return this;
}
@Override
public WorkbasketQuery custom3Like(String... custom3) {
this.custom3Like = toUpperCopy(custom3);
return this;
}
@Override
public WorkbasketQuery custom4In(String... custom4) {
this.custom4In = custom4;
return this;
}
@Override
public WorkbasketQuery custom4Like(String... custom4) {
this.custom4Like = toUpperCopy(custom4);
return this;
}
@Override
public WorkbasketQuery orgLevel1In(String... orgLevel1) {
this.orgLevel1In = orgLevel1;
return this;
}
@Override
public WorkbasketQuery orgLevel1Like(String... orgLevel1) {
this.orgLevel1Like = toUpperCopy(orgLevel1);
return this;
}
@Override
public WorkbasketQuery orgLevel2In(String... orgLevel2) {
this.orgLevel2In = orgLevel2;
return this;
}
@Override
public WorkbasketQuery orgLevel2Like(String... orgLevel2) {
this.orgLevel2Like = toUpperCopy(orgLevel2);
return this;
}
@Override
public WorkbasketQuery orgLevel3In(String... orgLevel3) {
this.orgLevel3In = orgLevel3;
return this;
}
@Override
public WorkbasketQuery orgLevel3Like(String... orgLevel3) {
this.orgLevel3Like = toUpperCopy(orgLevel3);
return this;
}
@Override
public WorkbasketQuery orgLevel4In(String... orgLevel4) {
this.orgLevel4In = orgLevel4;
return this;
}
@Override
public WorkbasketQuery orgLevel4Like(String... orgLevel4) {
this.orgLevel4Like = toUpperCopy(orgLevel4);
return this;
}
@Override
public WorkbasketQuery orderByName(SortDirection sortDirection) {
return addOrderCriteria("NAME", sortDirection);
@ -143,6 +262,11 @@ public class WorkbasketQueryImpl implements WorkbasketQuery {
return addOrderCriteria("KEY", sortDirection);
}
@Override
public WorkbasketQuery orderByDomain(SortDirection sortDirection) {
return addOrderCriteria("DOMAIN", sortDirection);
}
@Override
public WorkbasketQuery orderByDescription(SortDirection sortDirection) {
return addOrderCriteria("DESCRIPTION", sortDirection);
@ -158,6 +282,46 @@ public class WorkbasketQueryImpl implements WorkbasketQuery {
return addOrderCriteria("TYPE", sortDirection);
}
@Override
public WorkbasketQuery orderByCustom1(SortDirection sortDirection) {
return addOrderCriteria("CUSTOM_1", sortDirection);
}
@Override
public WorkbasketQuery orderByCustom2(SortDirection sortDirection) {
return addOrderCriteria("CUSTOM_2", sortDirection);
}
@Override
public WorkbasketQuery orderByCustom3(SortDirection sortDirection) {
return addOrderCriteria("CUSTOM_3", sortDirection);
}
@Override
public WorkbasketQuery orderByCustom4(SortDirection sortDirection) {
return addOrderCriteria("CUSTOM_4", sortDirection);
}
@Override
public WorkbasketQuery orderByOrgLevel1(SortDirection sortDirection) {
return addOrderCriteria("ORG_LEVEL_1", sortDirection);
}
@Override
public WorkbasketQuery orderByOrgLevel2(SortDirection sortDirection) {
return addOrderCriteria("ORG_LEVEL_2", sortDirection);
}
@Override
public WorkbasketQuery orderByOrgLevel3(SortDirection sortDirection) {
return addOrderCriteria("ORG_LEVEL_3", sortDirection);
}
@Override
public WorkbasketQuery orderByOrgLevel4(SortDirection sortDirection) {
return addOrderCriteria("ORG_LEVEL_4", sortDirection);
}
@Override
public WorkbasketQuery accessIdsHavePermission(WorkbasketAuthorization permission, String... accessIds)
throws InvalidArgumentException {
@ -289,10 +453,6 @@ public class WorkbasketQueryImpl implements WorkbasketQuery {
return keyOrNameLike;
}
public String[] getDomain() {
return domain;
}
public WorkbasketType[] getType() {
return type;
}
@ -313,6 +473,78 @@ public class WorkbasketQueryImpl implements WorkbasketQuery {
return ownerIn;
}
public String[] getDomainIn() {
return domainIn;
}
public String[] getDomainLike() {
return domainLike;
}
public String[] getCustom1In() {
return custom1In;
}
public String[] getCustom1Like() {
return custom1Like;
}
public String[] getCustom2In() {
return custom2In;
}
public String[] getCustom2Like() {
return custom2Like;
}
public String[] getCustom3In() {
return custom3In;
}
public String[] getCustom3Like() {
return custom3Like;
}
public String[] getCustom4In() {
return custom4In;
}
public String[] getCustom4Like() {
return custom4Like;
}
public String[] getOrgLevel1In() {
return orgLevel1In;
}
public String[] getOrgLevel1Like() {
return orgLevel1Like;
}
public String[] getOrgLevel2In() {
return orgLevel2In;
}
public String[] getOrgLevel2Like() {
return orgLevel2Like;
}
public String[] getOrgLevel3In() {
return orgLevel3In;
}
public String[] getOrgLevel3Like() {
return orgLevel3Like;
}
public String[] getOrgLevel4In() {
return orgLevel4In;
}
public String[] getOrgLevel4Like() {
return orgLevel4Like;
}
public String[] getOwnerLike() {
return ownerLike;
}
@ -352,8 +584,10 @@ public class WorkbasketQueryImpl implements WorkbasketQuery {
builder.append(Arrays.toString(keyLike));
builder.append(", keyOrNameLike=");
builder.append(Arrays.toString(keyOrNameLike));
builder.append(", domain=");
builder.append(Arrays.toString(domain));
builder.append(", domainIn=");
builder.append(Arrays.toString(domainIn));
builder.append(", domainLike=");
builder.append(Arrays.toString(domainLike));
builder.append(", type=");
builder.append(Arrays.toString(type));
builder.append(", createdIn=");
@ -366,6 +600,38 @@ public class WorkbasketQueryImpl implements WorkbasketQuery {
builder.append(Arrays.toString(ownerIn));
builder.append(", ownerLike=");
builder.append(Arrays.toString(ownerLike));
builder.append(", custom1In=");
builder.append(Arrays.toString(custom1In));
builder.append(", custom1Like=");
builder.append(Arrays.toString(custom1Like));
builder.append(", custom2In=");
builder.append(Arrays.toString(custom2In));
builder.append(", custom2Like=");
builder.append(Arrays.toString(custom2Like));
builder.append(", custom3In=");
builder.append(Arrays.toString(custom3In));
builder.append(", custom3Like=");
builder.append(Arrays.toString(custom3Like));
builder.append(", custom4In=");
builder.append(Arrays.toString(custom4In));
builder.append(", custom4Like=");
builder.append(Arrays.toString(custom4Like));
builder.append(", orgLevel1In=");
builder.append(Arrays.toString(orgLevel1In));
builder.append(", orgLevel1Like=");
builder.append(Arrays.toString(orgLevel1Like));
builder.append(", orgLevel2In=");
builder.append(Arrays.toString(orgLevel2In));
builder.append(", orgLevel2Like=");
builder.append(Arrays.toString(orgLevel2Like));
builder.append(", orgLevel3In=");
builder.append(Arrays.toString(orgLevel3In));
builder.append(", orgLevel3Like=");
builder.append(Arrays.toString(orgLevel3Like));
builder.append(", orgLevel4In=");
builder.append(Arrays.toString(orgLevel4In));
builder.append(", orgLevel4Like=");
builder.append(Arrays.toString(orgLevel4Like));
builder.append(", orderBy=");
builder.append(orderBy);
builder.append("]");

View File

@ -165,6 +165,7 @@ public interface QueryMapper {
+ "<if test='custom8In != null'>AND CUSTOM_8 IN(<foreach item='item' collection='custom8In' separator=',' >#{item}</foreach>) </if> "
+ "<if test='custom8Like != null'>AND (<foreach item='item' collection='custom8Like' separator=' OR ' > CUSTOM_8 LIKE #{item}</foreach>)</if> "
+ "</where>"
+ "<if test='!orderBy.isEmpty()'>ORDER BY <foreach item='item' collection='orderBy' separator=',' >${item}</foreach></if> "
+ "</script>")
@Results({@Result(property = "id", column = "ID"),
@Result(property = "key", column = "KEY"),
@ -205,12 +206,29 @@ public interface QueryMapper {
+ "<if test='nameIn != null'>AND UPPER(w.NAME) IN(<foreach item='item' collection='nameIn' separator=',' >#{item}</foreach>)</if> "
+ "<if test='nameLike != null'>AND (<foreach item='item' collection='nameLike' separator=' OR ' >UPPER(w.NAME) LIKE #{item}</foreach>)</if> "
+ "<if test='keyOrNameLike != null'>AND (<foreach item='item' collection='keyOrNameLike' separator=' OR ' >UPPER(w.NAME) LIKE #{item} OR UPPER(w.KEY) LIKE #{item}</foreach>)</if> "
+ "<if test='domain != null'>AND w.DOMAIN IN(<foreach item='item' collection='domain' separator=',' >#{item}</foreach>)</if> "
+ "<if test='domainIn != null'>AND w.DOMAIN IN(<foreach item='item' collection='domainIn' separator=',' >#{item}</foreach>)</if> "
+ "<if test='domainLike != null'>AND (<foreach item='item' collection='domainLike' separator=' OR ' >UPPER(w.DOMAIN) LIKE #{item}</foreach>)</if> "
+ "<if test='type!= null'>AND w.TYPE IN(<foreach item='item' collection='type' separator=',' >#{item}</foreach>)</if> "
+ "<if test='createdIn !=null'> AND ( <foreach item='item' collection='createdIn' separator=' OR ' > ( <if test='item.begin!=null'> w.CREATED &gt;= #{item.begin} </if> <if test='item.begin!=null and item.end!=null'> AND </if><if test='item.end!=null'> w.CREATED &lt;=#{item.end} </if>)</foreach>)</if> "
+ "<if test='modifiedIn !=null'> AND ( <foreach item='item' collection='modifiedIn' separator=' OR ' > ( <if test='item.begin!=null'> w.MODIFIED &gt;= #{item.begin} </if> <if test='item.begin!=null and item.end!=null'> AND </if><if test='item.end!=null'> w.MODIFIED &lt;=#{item.end} </if>)</foreach>)</if> "
+ "<if test='descriptionLike != null'>AND (<foreach item='item' collection='descriptionLike' separator=' OR '>UPPER(w.DESCRIPTION) LIKE #{item}</foreach>)</if> "
+ "<if test='accessId != null'>AND a.ACCESS_ID IN(<foreach item='item' collection='accessId' separator=',' >#{item}</foreach>) AND PERM_READ = 1 </if> "
+ "<if test='custom1In != null'>AND UPPER(w.CUSTOM_1) IN(<foreach item='item' collection='custom1In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='custom1Like != null'>AND (<foreach item='item' collection='custom1Like' separator=' OR ' >UPPER(w.CUSTOM_1) LIKE #{item}</foreach>)</if> "
+ "<if test='custom2In != null'>AND UPPER(w.CUSTOM_2) IN(<foreach item='item' collection='custom2In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='custom2Like != null'>AND (<foreach item='item' collection='custom2Like' separator=' OR ' >UPPER(w.CUSTOM_2) LIKE #{item}</foreach>)</if> "
+ "<if test='custom3In != null'>AND UPPER(w.CUSTOM_3) IN(<foreach item='item' collection='custom3In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='custom3Like != null'>AND (<foreach item='item' collection='custom3Like' separator=' OR ' >UPPER(w.CUSTOM_3) LIKE #{item}</foreach>)</if> "
+ "<if test='custom4In != null'>AND UPPER(w.CUSTOM_4) IN(<foreach item='item' collection='custom4In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='custom4Like != null'>AND (<foreach item='item' collection='custom4Like' separator=' OR ' >UPPER(w.CUSTOM_4) LIKE #{item}</foreach>)</if> "
+ "<if test='orgLevel1In != null'>AND UPPER(w.ORG_LEVEL_1) IN(<foreach item='item' collection='orgLevel1In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='orgLevel1Like != null'>AND (<foreach item='item' collection='orgLevel1Like' separator=' OR ' >UPPER(w.ORG_LEVEL_1) LIKE #{item}</foreach>)</if> "
+ "<if test='orgLevel2In != null'>AND UPPER(w.ORG_LEVEL_2) IN(<foreach item='item' collection='orgLevel2In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='orgLevel2Like != null'>AND (<foreach item='item' collection='orgLevel2Like' separator=' OR ' >UPPER(w.ORG_LEVEL_2) LIKE #{item}</foreach>)</if> "
+ "<if test='orgLevel3In != null'>AND UPPER(w.ORG_LEVEL_3) IN(<foreach item='item' collection='orgLevel3In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='orgLevel3Like != null'>AND (<foreach item='item' collection='orgLevel3Like' separator=' OR ' >UPPER(w.ORG_LEVEL_3) LIKE #{item}</foreach>)</if> "
+ "<if test='orgLevel4In != null'>AND UPPER(w.ORG_LEVEL_4) IN(<foreach item='item' collection='orgLevel4In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='orgLevel4Like != null'>AND (<foreach item='item' collection='orgLevel4Like' separator=' OR ' >UPPER(w.ORG_LEVEL_4) LIKE #{item}</foreach>)</if> "
+ "<if test='authorization != null'>AND "
+ "<if test=\"authorization.name().equals('OPEN')\">PERM_OPEN</if> "
+ "<if test=\"authorization.name().equals('READ')\">PERM_READ</if>"
@ -396,7 +414,8 @@ public interface QueryMapper {
+ "</script>")
Long countQueryObjectReferences(ObjectReferenceQueryImpl objectReference);
@Select("<script>SELECT COUNT(ID) from WORKBASKET w"
@Select("<script>"
+ "SELECT COUNT(ID) from WORKBASKET w "
+ "<if test='accessId != null'>LEFT OUTER JOIN WORKBASKET_ACCESS_LIST a on w.KEY = a.WORKBASKET_KEY</if> "
+ "<where>"
+ "<if test='ownerIn != null'>AND w.OWNER IN(<foreach item='item' collection='ownerIn' separator=',' >#{item}</foreach>)</if> "
@ -406,12 +425,29 @@ public interface QueryMapper {
+ "<if test='nameIn != null'>AND UPPER(w.NAME) IN(<foreach item='item' collection='nameIn' separator=',' >#{item}</foreach>)</if> "
+ "<if test='nameLike != null'>AND (<foreach item='item' collection='nameLike' separator=' OR ' >UPPER(w.NAME) LIKE #{item}</foreach>)</if> "
+ "<if test='keyOrNameLike != null'>AND (<foreach item='item' collection='keyOrNameLike' separator=' OR ' >UPPER(w.NAME) LIKE #{item} OR UPPER(w.KEY) LIKE #{item}</foreach>)</if> "
+ "<if test='domain != null'>AND w.DOMAIN IN(<foreach item='item' collection='domain' separator=',' >#{item}</foreach>)</if> "
+ "<if test='domainIn != null'>AND w.DOMAIN IN(<foreach item='item' collection='domainIn' separator=',' >#{item}</foreach>)</if> "
+ "<if test='domainLike != null'>AND (<foreach item='item' collection='domainLike' separator=' OR ' >UPPER(w.DOMAIN) LIKE #{item}</foreach>)</if> "
+ "<if test='type!= null'>AND w.TYPE IN(<foreach item='item' collection='type' separator=',' >#{item}</foreach>)</if> "
+ "<if test='createdIn !=null'> AND ( <foreach item='item' collection='createdIn' separator=' OR ' > ( <if test='item.begin!=null'> w.CREATED &gt;= #{item.begin} </if> <if test='item.begin!=null and item.end!=null'> AND </if><if test='item.end!=null'> w.CREATED &lt;=#{item.end} </if>)</foreach>)</if> "
+ "<if test='modifiedIn !=null'> AND ( <foreach item='item' collection='modifiedIn' separator=' OR ' > ( <if test='item.begin!=null'> w.MODIFIED &gt;= #{item.begin} </if> <if test='item.begin!=null and item.end!=null'> AND </if><if test='item.end!=null'> w.MODIFIED &lt;=#{item.end} </if>)</foreach>)</if> "
+ "<if test='descriptionLike != null'>AND (<foreach item='item' collection='descriptionLike' separator=' OR '>UPPER(w.DESCRIPTION) LIKE #{item}</foreach>)</if> "
+ "<if test='accessId != null'>AND a.ACCESS_ID IN(<foreach item='item' collection='accessId' separator=',' >#{item}</foreach>) AND PERM_READ = 1 </if> "
+ "<if test='custom1In != null'>AND UPPER(w.CUSTOM_1) IN(<foreach item='item' collection='custom1In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='custom1Like != null'>AND (<foreach item='item' collection='custom1Like' separator=' OR ' >UPPER(w.CUSTOM_1) LIKE #{item}</foreach>)</if> "
+ "<if test='custom2In != null'>AND UPPER(w.CUSTOM_2) IN(<foreach item='item' collection='custom2In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='custom2Like != null'>AND (<foreach item='item' collection='custom2Like' separator=' OR ' >UPPER(w.CUSTOM_2) LIKE #{item}</foreach>)</if> "
+ "<if test='custom3In != null'>AND UPPER(w.CUSTOM_3) IN(<foreach item='item' collection='custom3In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='custom3Like != null'>AND (<foreach item='item' collection='custom3Like' separator=' OR ' >UPPER(w.CUSTOM_3) LIKE #{item}</foreach>)</if> "
+ "<if test='custom4In != null'>AND UPPER(w.CUSTOM_4) IN(<foreach item='item' collection='custom4In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='custom4Like != null'>AND (<foreach item='item' collection='custom4Like' separator=' OR ' >UPPER(w.CUSTOM_4) LIKE #{item}</foreach>)</if> "
+ "<if test='orgLevel1In != null'>AND UPPER(w.ORG_LEVEL_1) IN(<foreach item='item' collection='orgLevel1In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='orgLevel1Like != null'>AND (<foreach item='item' collection='orgLevel1Like' separator=' OR ' >UPPER(w.ORG_LEVEL_1) LIKE #{item}</foreach>)</if> "
+ "<if test='orgLevel2In != null'>AND UPPER(w.ORG_LEVEL_2) IN(<foreach item='item' collection='orgLevel2In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='orgLevel2Like != null'>AND (<foreach item='item' collection='orgLevel2Like' separator=' OR ' >UPPER(w.ORG_LEVEL_2) LIKE #{item}</foreach>)</if> "
+ "<if test='orgLevel3In != null'>AND UPPER(w.ORG_LEVEL_3) IN(<foreach item='item' collection='orgLevel3In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='orgLevel3Like != null'>AND (<foreach item='item' collection='orgLevel3Like' separator=' OR ' >UPPER(w.ORG_LEVEL_3) LIKE #{item}</foreach>)</if> "
+ "<if test='orgLevel4In != null'>AND UPPER(w.ORG_LEVEL_4) IN(<foreach item='item' collection='orgLevel4In' separator=',' >#{item}</foreach>)</if> "
+ "<if test='orgLevel4Like != null'>AND (<foreach item='item' collection='orgLevel4Like' separator=' OR ' >UPPER(w.ORG_LEVEL_4) LIKE #{item}</foreach>)</if> "
+ "<if test='authorization != null'>AND "
+ "<if test=\"authorization.name().equals('OPEN')\">PERM_OPEN</if> "
+ "<if test=\"authorization.name().equals('READ')\">PERM_READ</if>"

View File

@ -197,4 +197,84 @@ public class TestClassificationQuery implements ClassificationQuery {
public long count() {
return 0;
}
@Override
public ClassificationQuery orderByKey(SortDirection sortDirection) {
return this;
}
@Override
public ClassificationQuery orderByParentId(SortDirection sortDirection) {
return this;
}
@Override
public ClassificationQuery orderByCategory(SortDirection sortDirection) {
return this;
}
@Override
public ClassificationQuery orderByDomain(SortDirection sortDirection) {
return this;
}
@Override
public ClassificationQuery orderByName(SortDirection sortDirection) {
return this;
}
@Override
public ClassificationQuery orderByServiceLevel(SortDirection sortDirection) {
return this;
}
@Override
public ClassificationQuery orderByPriority(SortDirection sortDirection) {
return this;
}
@Override
public ClassificationQuery orderByApplicationEntryPoint(SortDirection sortDirection) {
return this;
}
@Override
public ClassificationQuery orderByCustom1(SortDirection sortDirection) {
return this;
}
@Override
public ClassificationQuery orderByCustom2(SortDirection sortDirection) {
return this;
}
@Override
public ClassificationQuery orderByCustom3(SortDirection sortDirection) {
return this;
}
@Override
public ClassificationQuery orderByCustom4(SortDirection sortDirection) {
return this;
}
@Override
public ClassificationQuery orderByCustom5(SortDirection sortDirection) {
return this;
}
@Override
public ClassificationQuery orderByCustom6(SortDirection sortDirection) {
return this;
}
@Override
public ClassificationQuery orderByCustom7(SortDirection sortDirection) {
return this;
}
@Override
public ClassificationQuery orderByCustom8(SortDirection sortDirection) {
return this;
}
}