diff --git a/common/taskana-common-data/src/main/resources/sql/test-data/workbasket.sql b/common/taskana-common-data/src/main/resources/sql/test-data/workbasket.sql index 5b9e392c7..a2c770860 100644 --- a/common/taskana-common-data/src/main/resources/sql/test-data/workbasket.sql +++ b/common/taskana-common-data/src/main/resources/sql/test-data/workbasket.sql @@ -17,6 +17,7 @@ INSERT INTO WORKBASKET VALUES ('WBI:100000000000000000000000000000000012', 'GPK_ INSERT INTO WORKBASKET VALUES ('WBI:100000000000000000000000000000000013', 'GPK_B_KSC_2', RELATIVE_DATE(0) , RELATIVE_DATE(0) , 'Gruppenpostkorb KSC B2' , 'DOMAIN_B', 'GROUP' , 'Gruppenpostkorb KSC 2' , '' , '' , '' , '' , '' , '' , '' , '' , '' , false ); INSERT INTO WORKBASKET VALUES ('WBI:100000000000000000000000000000000014', 'USER-B-1' , RELATIVE_DATE(0) , RELATIVE_DATE(0) , 'PPK User 1 KSC 1 Domain B', 'DOMAIN_B', 'PERSONAL', 'PPK User 1 KSC 1 Domain B' , '' , '' , 'custom20', '' , 'custom4' , '' , '' , '' , '' , false ); INSERT INTO WORKBASKET VALUES ('WBI:100000000000000000000000000000000015', 'USER-B-2' , RELATIVE_DATE(0) , RELATIVE_DATE(0) , 'PPK User 2 KSC 1 Domain B', 'DOMAIN_B', 'PERSONAL', 'PPK User 1 KSC 1 Domain B' , 'user-1-2' , 'ABCABC' , 'cust2' , 'cust3' , 'cust4' , 'orgl1' , 'orgl2' , 'orgl3' , 'orgl4' , false ); +INSERT INTO WORKBASKET VALUES ('WBI:100000000000000000000000000000000016', 'MASSNAHMEN' , RELATIVE_DATE(0) , RELATIVE_DATE(0) , 'TPK Maßnahmen' , 'DOMAIN_B', 'TOPIC' , 'TPK Maßnahmen' , '' , '' , '' , '' , '' , '' , '' , '' , '' , false ); -- Workbaskets for sorting test INSERT INTO WORKBASKET VALUES ('WBI:000000000000000000000000000000000900', 'sort001' , RELATIVE_DATE(0) , RELATIVE_DATE(0) , 'basxet0' , 'DOMAIN_A', 'TOPIC' , 'Lorem ipsum dolor sit amet.', 'user-1-3' , '' , '' , '' , '' , '' , '' , '' , '' , false ); diff --git a/common/taskana-common/src/main/java/pro/taskana/common/api/BaseQuery.java b/common/taskana-common/src/main/java/pro/taskana/common/api/BaseQuery.java index 389ae11c1..3eb515fa1 100644 --- a/common/taskana-common/src/main/java/pro/taskana/common/api/BaseQuery.java +++ b/common/taskana-common/src/main/java/pro/taskana/common/api/BaseQuery.java @@ -76,14 +76,14 @@ public interface BaseQuery & QueryColumnName> { */ long count(); - default String[] toUpperCopy(String... source) { + default String[] toLowerCopy(String... source) { if (source == null || source.length == 0) { return null; // we are currently aware that this is a code smell. Unfortunately the resolution of this // would cause havoc in our queries, since we do not have a concept // for a user input validation yet. As soon as that is done we can resolve this code smell. } - return Arrays.stream(source).map(String::toUpperCase).toArray(String[]::new); + return Arrays.stream(source).map(String::toLowerCase).toArray(String[]::new); } /** Determines the sort direction. */ diff --git a/common/taskana-common/src/main/java/pro/taskana/common/internal/util/SqlProviderUtil.java b/common/taskana-common/src/main/java/pro/taskana/common/internal/util/SqlProviderUtil.java index 2d28943ae..46966a00a 100644 --- a/common/taskana-common/src/main/java/pro/taskana/common/internal/util/SqlProviderUtil.java +++ b/common/taskana-common/src/main/java/pro/taskana/common/internal/util/SqlProviderUtil.java @@ -100,7 +100,7 @@ public class SqlProviderUtil { .append(collection) .append(" != null'>AND (UPPER(") + .append("' separator=' OR '>LOWER(") .append(column) .append(") LIKE #{item}) "); } @@ -114,7 +114,7 @@ public class SqlProviderUtil { .append(collection) .append(" != null'>AND (UPPER(") + .append("' separator=' OR '>LOWER(") .append(column) .append(") NOT LIKE #{item}) "); } diff --git a/common/taskana-common/src/main/resources/sql/db2/taskana-schema-db2.sql b/common/taskana-common/src/main/resources/sql/db2/taskana-schema-db2.sql index 9a0a19c76..9fe2f48f6 100644 --- a/common/taskana-common/src/main/resources/sql/db2/taskana-schema-db2.sql +++ b/common/taskana-common/src/main/resources/sql/db2/taskana-schema-db2.sql @@ -380,8 +380,9 @@ CREATE INDEX IDX_TASK_WORKBASKET_KEY_DOMAIN ON TASK COMMIT WORK; CREATE INDEX IDX_TASK_POR_VALUE ON TASK - (UPPER("POR_VALUE") ASC, "WORKBASKET_ID" ASC) ALLOW REVERSE SCANS COLLECT SAMPLED DETAILED STATISTICS; -COMMIT WORK; + (LOWER("POR_VALUE") ASC, "WORKBASKET_ID" ASC) + ALLOW REVERSE SCANS COLLECT SAMPLED DETAILED STATISTICS; +COMMIT WORK ; CREATE INDEX IDX_ATTACHMENT_TASK_ID ON ATTACHMENT ("TASK_ID" ASC, "RECEIVED" ASC, "CLASSIFICATION_ID" ASC, "CLASSIFICATION_KEY" ASC, diff --git a/common/taskana-common/src/main/resources/sql/db2/taskana_schema_update_4.11.0_to_5.0.0_db2.sql b/common/taskana-common/src/main/resources/sql/db2/taskana_schema_update_4.11.0_to_5.0.0_db2.sql index 8ac5c8898..7279a67fb 100644 --- a/common/taskana-common/src/main/resources/sql/db2/taskana_schema_update_4.11.0_to_5.0.0_db2.sql +++ b/common/taskana-common/src/main/resources/sql/db2/taskana_schema_update_4.11.0_to_5.0.0_db2.sql @@ -52,7 +52,7 @@ CREATE INDEX IDX_TASK_WORKBASKET_KEY_DOMAIN ON TASK COMMIT WORK ; CREATE INDEX IDX_TASK_POR_VALUE ON TASK - (UPPER("POR_VALUE") ASC, "WORKBASKET_ID" ASC) + (LOWER("POR_VALUE") ASC, "WORKBASKET_ID" ASC) ALLOW REVERSE SCANS COLLECT SAMPLED DETAILED STATISTICS; COMMIT WORK ; diff --git a/common/taskana-common/src/main/resources/sql/postgres/taskana-schema-postgres.sql b/common/taskana-common/src/main/resources/sql/postgres/taskana-schema-postgres.sql index 50f48212f..e064c67ab 100644 --- a/common/taskana-common/src/main/resources/sql/postgres/taskana-schema-postgres.sql +++ b/common/taskana-common/src/main/resources/sql/postgres/taskana-schema-postgres.sql @@ -379,12 +379,12 @@ CREATE INDEX IDX_CLASSIFICATION_KEY_DOMAIN ON CLASSIFICATION COMMIT WORK; -CREATE INDEX IDX_TASK_WORKBASKET_KEY_DOMAIN ON TASK - (WORKBASKET_KEY ASC, DOMAIN DESC); -COMMIT WORK; -CREATE INDEX IDX_TASK_POR_VALUE ON TASK - (UPPER(POR_VALUE) ASC, WORKBASKET_ID ASC); -COMMIT WORK; + CREATE INDEX IDX_TASK_WORKBASKET_KEY_DOMAIN ON TASK + (WORKBASKET_KEY ASC, DOMAIN DESC); + COMMIT WORK ; + CREATE INDEX IDX_TASK_POR_VALUE ON TASK + (LOWER(POR_VALUE) ASC, WORKBASKET_ID ASC); + COMMIT WORK ; CREATE INDEX IDX_ATTACHMENT_TASK_ID ON ATTACHMENT diff --git a/common/taskana-common/src/main/resources/sql/postgres/taskana_schema_update_4.11.0_to_5.0.0_postgres.sql b/common/taskana-common/src/main/resources/sql/postgres/taskana_schema_update_4.11.0_to_5.0.0_postgres.sql index ccdb16a13..5a0a7d842 100644 --- a/common/taskana-common/src/main/resources/sql/postgres/taskana_schema_update_4.11.0_to_5.0.0_postgres.sql +++ b/common/taskana-common/src/main/resources/sql/postgres/taskana_schema_update_4.11.0_to_5.0.0_postgres.sql @@ -42,7 +42,7 @@ COMMIT WORK ; DROP INDEX IF EXISTS IDX_TASK_2; CREATE INDEX IDX_TASK_POR_VALUE ON TASK - (UPPER(POR_VALUE) ASC, WORKBASKET_ID ASC); + (LOWER(POR_VALUE) ASC, WORKBASKET_ID ASC); COMMIT WORK ; DROP INDEX IF EXISTS IDX_ATTACHMENT_1; diff --git a/history/taskana-simplehistory-provider/src/main/java/pro/taskana/simplehistory/impl/ClassificationHistoryQueryImpl.java b/history/taskana-simplehistory-provider/src/main/java/pro/taskana/simplehistory/impl/ClassificationHistoryQueryImpl.java index 472c22cdb..ccb1203ca 100644 --- a/history/taskana-simplehistory-provider/src/main/java/pro/taskana/simplehistory/impl/ClassificationHistoryQueryImpl.java +++ b/history/taskana-simplehistory-provider/src/main/java/pro/taskana/simplehistory/impl/ClassificationHistoryQueryImpl.java @@ -87,13 +87,13 @@ public class ClassificationHistoryQueryImpl implements ClassificationHistoryQuer @Override public ClassificationHistoryQuery idIn(String... idIn) { - this.idIn = toUpperCopy(idIn); + this.idIn = idIn; return this; } @Override public ClassificationHistoryQuery eventTypeIn(String... eventType) { - this.eventTypeIn = toUpperCopy(eventType); + this.eventTypeIn = eventType; return this; } @@ -105,55 +105,55 @@ public class ClassificationHistoryQueryImpl implements ClassificationHistoryQuer @Override public ClassificationHistoryQuery userIdIn(String... userId) { - this.userIdIn = toUpperCopy(userId); + this.userIdIn = userId; return this; } @Override public ClassificationHistoryQuery classificationIdIn(String... classificationId) { - this.classificationIdIn = toUpperCopy(classificationId); + this.classificationIdIn = classificationId; return this; } @Override public ClassificationHistoryQuery applicationEntryPointIn(String... applicationEntryPoint) { - this.applicationEntryPointIn = toUpperCopy(applicationEntryPoint); + this.applicationEntryPointIn = applicationEntryPoint; return this; } @Override public ClassificationHistoryQuery categoryIn(String... category) { - this.categoryIn = toUpperCopy(category); + this.categoryIn = category; return this; } @Override public ClassificationHistoryQuery domainIn(String... domain) { - this.domainIn = toUpperCopy(domain); + this.domainIn = domain; return this; } @Override public ClassificationHistoryQuery keyIn(String... key) { - this.keyIn = toUpperCopy(key); + this.keyIn = key; return this; } @Override public ClassificationHistoryQuery nameIn(String... name) { - this.nameIn = toUpperCopy(name); + this.nameIn = name; return this; } @Override public ClassificationHistoryQuery parentIdIn(String... parentId) { - this.parentIdIn = toUpperCopy(parentId); + this.parentIdIn = parentId; return this; } @Override public ClassificationHistoryQuery parentKeyIn(String... parentKey) { - this.parentKeyIn = toUpperCopy(parentKey); + this.parentKeyIn = parentKey; return this; } @@ -180,28 +180,28 @@ public class ClassificationHistoryQueryImpl implements ClassificationHistoryQuer ClassificationCustomField customField, String... searchArguments) { switch (customField) { case CUSTOM_1: - custom1In = toUpperCopy(searchArguments); + custom1In = searchArguments; break; case CUSTOM_2: - custom2In = toUpperCopy(searchArguments); + custom2In = searchArguments; break; case CUSTOM_3: - custom3In = toUpperCopy(searchArguments); + custom3In = searchArguments; break; case CUSTOM_4: - custom4In = toUpperCopy(searchArguments); + custom4In = searchArguments; break; case CUSTOM_5: - custom5In = toUpperCopy(searchArguments); + custom5In = searchArguments; break; case CUSTOM_6: - custom6In = toUpperCopy(searchArguments); + custom6In = searchArguments; break; case CUSTOM_7: - custom7In = toUpperCopy(searchArguments); + custom7In = searchArguments; break; case CUSTOM_8: - custom8In = toUpperCopy(searchArguments); + custom8In = searchArguments; break; default: throw new SystemException("Unknown customField '" + customField + "'"); @@ -211,73 +211,73 @@ public class ClassificationHistoryQueryImpl implements ClassificationHistoryQuer @Override public ClassificationHistoryQuery eventTypeLike(String... eventType) { - this.eventTypeLike = toUpperCopy(eventType); + this.eventTypeLike = toLowerCopy(eventType); return this; } @Override public ClassificationHistoryQuery userIdLike(String... userId) { - this.userIdLike = toUpperCopy(userId); + this.userIdLike = toLowerCopy(userId); return this; } @Override public ClassificationHistoryQuery classificationIdLike(String... classificationId) { - this.classificationIdLike = toUpperCopy(classificationId); + this.classificationIdLike = toLowerCopy(classificationId); return this; } @Override public ClassificationHistoryQuery applicationEntryPointLike(String... applicationEntryPointLike) { - this.applicationEntryPointLike = toUpperCopy(applicationEntryPointLike); + this.applicationEntryPointLike = toLowerCopy(applicationEntryPointLike); return this; } @Override public ClassificationHistoryQuery categoryLike(String... category) { - this.categoryLike = toUpperCopy(category); + this.categoryLike = toLowerCopy(category); return this; } @Override public ClassificationHistoryQuery domainLike(String... domain) { - this.domainLike = toUpperCopy(domain); + this.domainLike = toLowerCopy(domain); return this; } @Override public ClassificationHistoryQuery keyLike(String... key) { - this.keyLike = toUpperCopy(key); + this.keyLike = toLowerCopy(key); return this; } @Override public ClassificationHistoryQuery nameLike(String... name) { - this.nameLike = toUpperCopy(name); + this.nameLike = toLowerCopy(name); return this; } @Override public ClassificationHistoryQuery parentIdLike(String... parentId) { - this.parentIdLike = toUpperCopy(parentId); + this.parentIdLike = toLowerCopy(parentId); return this; } @Override public ClassificationHistoryQuery parentKeyLike(String... parentKey) { - this.parentKeyLike = toUpperCopy(parentKey); + this.parentKeyLike = toLowerCopy(parentKey); return this; } @Override public ClassificationHistoryQuery serviceLevelLike(String... serviceLevel) { - this.serviceLevelLike = toUpperCopy(serviceLevel); + this.serviceLevelLike = toLowerCopy(serviceLevel); return this; } @Override public ClassificationHistoryQuery typeLike(String... type) { - this.typeLike = toUpperCopy(type); + this.typeLike = toLowerCopy(type); return this; } @@ -286,28 +286,28 @@ public class ClassificationHistoryQueryImpl implements ClassificationHistoryQuer ClassificationCustomField customField, String... searchArguments) { switch (customField) { case CUSTOM_1: - custom1Like = toUpperCopy(searchArguments); + custom1Like = toLowerCopy(searchArguments); break; case CUSTOM_2: - custom2Like = toUpperCopy(searchArguments); + custom2Like = toLowerCopy(searchArguments); break; case CUSTOM_3: - custom3Like = toUpperCopy(searchArguments); + custom3Like = toLowerCopy(searchArguments); break; case CUSTOM_4: - custom4Like = toUpperCopy(searchArguments); + custom4Like = toLowerCopy(searchArguments); break; case CUSTOM_5: - custom5Like = toUpperCopy(searchArguments); + custom5Like = toLowerCopy(searchArguments); break; case CUSTOM_6: - custom6Like = toUpperCopy(searchArguments); + custom6Like = toLowerCopy(searchArguments); break; case CUSTOM_7: - custom7Like = toUpperCopy(searchArguments); + custom7Like = toLowerCopy(searchArguments); break; case CUSTOM_8: - custom8Like = toUpperCopy(searchArguments); + custom8Like = toLowerCopy(searchArguments); break; default: throw new SystemException("Unknown customField '" + customField + "'"); diff --git a/history/taskana-simplehistory-provider/src/main/java/pro/taskana/simplehistory/impl/TaskHistoryQueryImpl.java b/history/taskana-simplehistory-provider/src/main/java/pro/taskana/simplehistory/impl/TaskHistoryQueryImpl.java index 1cbeed7dd..acee984d0 100644 --- a/history/taskana-simplehistory-provider/src/main/java/pro/taskana/simplehistory/impl/TaskHistoryQueryImpl.java +++ b/history/taskana-simplehistory-provider/src/main/java/pro/taskana/simplehistory/impl/TaskHistoryQueryImpl.java @@ -267,31 +267,31 @@ public class TaskHistoryQueryImpl implements TaskHistoryQuery { @Override public TaskHistoryQuery idIn(String... idIn) { - this.idIn = toUpperCopy(idIn); + this.idIn = idIn; return this; } @Override public TaskHistoryQuery businessProcessIdIn(String... businessProcessId) { - this.businessProcessIdIn = toUpperCopy(businessProcessId); + this.businessProcessIdIn = businessProcessId; return this; } @Override public TaskHistoryQuery parentBusinessProcessIdIn(String... parentBusinessProcessId) { - this.parentBusinessProcessIdIn = toUpperCopy(parentBusinessProcessId); + this.parentBusinessProcessIdIn = parentBusinessProcessId; return this; } @Override public TaskHistoryQuery taskIdIn(String... taskId) { - this.taskIdIn = toUpperCopy(taskId); + this.taskIdIn = taskId; return this; } @Override public TaskHistoryQuery eventTypeIn(String... eventType) { - this.eventTypeIn = toUpperCopy(eventType); + this.eventTypeIn = eventType; return this; } @@ -303,181 +303,181 @@ public class TaskHistoryQueryImpl implements TaskHistoryQuery { @Override public TaskHistoryQuery userIdIn(String... userId) { - this.userIdIn = toUpperCopy(userId); + this.userIdIn = userId; return this; } @Override public TaskHistoryQuery domainIn(String... domain) { - this.domainIn = toUpperCopy(domain); + this.domainIn = domain; return this; } @Override public TaskHistoryQuery workbasketKeyIn(String... workbasketKey) { - this.workbasketKeyIn = toUpperCopy(workbasketKey); + this.workbasketKeyIn = workbasketKey; return this; } @Override public TaskHistoryQuery porCompanyIn(String... porCompany) { - this.porCompanyIn = toUpperCopy(porCompany); + this.porCompanyIn = porCompany; return this; } @Override public TaskHistoryQuery porSystemIn(String... porSystem) { - this.porSystemIn = toUpperCopy(porSystem); + this.porSystemIn = porSystem; return this; } @Override public TaskHistoryQuery porInstanceIn(String... porInstance) { - this.porInstanceIn = toUpperCopy(porInstance); + this.porInstanceIn = porInstance; return this; } @Override public TaskHistoryQuery porTypeIn(String... porType) { - this.porTypeIn = toUpperCopy(porType); + this.porTypeIn = porType; return this; } @Override public TaskHistoryQuery porValueIn(String... porValue) { - this.porValueIn = toUpperCopy(porValue); + this.porValueIn = porValue; return this; } @Override public TaskHistoryQuery taskClassificationKeyIn(String... taskClassificationKey) { - this.taskClassificationKeyIn = toUpperCopy(taskClassificationKey); + this.taskClassificationKeyIn = taskClassificationKey; return this; } @Override public TaskHistoryQuery taskClassificationCategoryIn(String... taskClassificationCategory) { - this.taskClassificationCategoryIn = toUpperCopy(taskClassificationCategory); + this.taskClassificationCategoryIn = taskClassificationCategory; return this; } @Override public TaskHistoryQuery attachmentClassificationKeyIn(String... attachmentClassificationKey) { - this.attachmentClassificationKeyIn = toUpperCopy(attachmentClassificationKey); + this.attachmentClassificationKeyIn = attachmentClassificationKey; return this; } @Override public TaskHistoryQuery oldValueIn(String... oldValueIn) { - this.oldValueIn = toUpperCopy(oldValueIn); + this.oldValueIn = oldValueIn; return this; } @Override public TaskHistoryQuery newValueIn(String... newValueIn) { - this.newValueIn = toUpperCopy(newValueIn); + this.newValueIn = newValueIn; return this; } @Override public TaskHistoryQuery businessProcessIdLike(String... businessProcessId) { - this.businessProcessIdLike = toUpperCopy(businessProcessId); + this.businessProcessIdLike = toLowerCopy(businessProcessId); return this; } @Override public TaskHistoryQuery parentBusinessProcessIdLike(String... parentBusinessProcessId) { - this.parentBusinessProcessIdLike = toUpperCopy(parentBusinessProcessId); + this.parentBusinessProcessIdLike = toLowerCopy(parentBusinessProcessId); return this; } @Override public TaskHistoryQuery taskIdLike(String... taskId) { - this.taskIdLike = toUpperCopy(taskId); + this.taskIdLike = toLowerCopy(taskId); return this; } @Override public TaskHistoryQuery eventTypeLike(String... eventType) { - this.eventTypeLike = toUpperCopy(eventType); + this.eventTypeLike = toLowerCopy(eventType); return this; } @Override public TaskHistoryQuery userIdLike(String... userId) { - this.userIdLike = toUpperCopy(userId); + this.userIdLike = toLowerCopy(userId); return this; } @Override public TaskHistoryQuery domainLike(String... domain) { - this.domainLike = toUpperCopy(domain); + this.domainLike = toLowerCopy(domain); return this; } @Override public TaskHistoryQuery workbasketKeyLike(String... workbasketKey) { - this.workbasketKeyLike = toUpperCopy(workbasketKey); + this.workbasketKeyLike = toLowerCopy(workbasketKey); return this; } @Override public TaskHistoryQuery porCompanyLike(String... porCompany) { - this.porCompanyLike = toUpperCopy(porCompany); + this.porCompanyLike = toLowerCopy(porCompany); return this; } @Override public TaskHistoryQuery porSystemLike(String... porSystem) { - this.porSystemLike = toUpperCopy(porSystem); + this.porSystemLike = toLowerCopy(porSystem); return this; } @Override public TaskHistoryQuery porInstanceLike(String... porInstance) { - this.porInstanceLike = toUpperCopy(porInstance); + this.porInstanceLike = toLowerCopy(porInstance); return this; } @Override public TaskHistoryQuery porTypeLike(String... porType) { - this.porTypeLike = toUpperCopy(porType); + this.porTypeLike = toLowerCopy(porType); return this; } @Override public TaskHistoryQuery porValueLike(String... porValue) { - this.porValueLike = toUpperCopy(porValue); + this.porValueLike = toLowerCopy(porValue); return this; } @Override public TaskHistoryQuery taskClassificationKeyLike(String... taskClassificationKey) { - this.taskClassificationKeyLike = toUpperCopy(taskClassificationKey); + this.taskClassificationKeyLike = toLowerCopy(taskClassificationKey); return this; } @Override public TaskHistoryQuery taskClassificationCategoryLike(String... taskClassificationCategory) { - this.taskClassificationCategoryLike = toUpperCopy(taskClassificationCategory); + this.taskClassificationCategoryLike = toLowerCopy(taskClassificationCategory); return this; } @Override public TaskHistoryQuery attachmentClassificationKeyLike(String... attachmentClassificationKey) { - this.attachmentClassificationKeyLike = toUpperCopy(attachmentClassificationKey); + this.attachmentClassificationKeyLike = toLowerCopy(attachmentClassificationKey); return this; } @Override public TaskHistoryQuery oldValueLike(String... oldValue) { - this.oldValueLike = toUpperCopy(oldValue); + this.oldValueLike = toLowerCopy(oldValue); return this; } @Override public TaskHistoryQuery newValueLike(String... newValue) { - this.newValueLike = toUpperCopy(newValue); + this.newValueLike = toLowerCopy(newValue); return this; } @@ -486,16 +486,16 @@ public class TaskHistoryQueryImpl implements TaskHistoryQuery { TaskHistoryCustomField customField, String... searchArguments) { switch (customField) { case CUSTOM_1: - custom1In = toUpperCopy(searchArguments); + custom1In = searchArguments; break; case CUSTOM_2: - custom2In = toUpperCopy(searchArguments); + custom2In = searchArguments; break; case CUSTOM_3: - custom3In = toUpperCopy(searchArguments); + custom3In = searchArguments; break; case CUSTOM_4: - custom4In = toUpperCopy(searchArguments); + custom4In = searchArguments; break; default: throw new SystemException("Unknown customField '" + customField + "'"); @@ -508,16 +508,16 @@ public class TaskHistoryQueryImpl implements TaskHistoryQuery { TaskHistoryCustomField customField, String... searchArguments) { switch (customField) { case CUSTOM_1: - custom1Like = toUpperCopy(searchArguments); + custom1Like = toLowerCopy(searchArguments); break; case CUSTOM_2: - custom2Like = toUpperCopy(searchArguments); + custom2Like = toLowerCopy(searchArguments); break; case CUSTOM_3: - custom3Like = toUpperCopy(searchArguments); + custom3Like = toLowerCopy(searchArguments); break; case CUSTOM_4: - custom4Like = toUpperCopy(searchArguments); + custom4Like = toLowerCopy(searchArguments); break; default: throw new SystemException("Unknown customField '" + customField + "'"); diff --git a/history/taskana-simplehistory-provider/src/main/java/pro/taskana/simplehistory/impl/WorkbasketHistoryQueryImpl.java b/history/taskana-simplehistory-provider/src/main/java/pro/taskana/simplehistory/impl/WorkbasketHistoryQueryImpl.java index fb3488a80..741ad2746 100644 --- a/history/taskana-simplehistory-provider/src/main/java/pro/taskana/simplehistory/impl/WorkbasketHistoryQueryImpl.java +++ b/history/taskana-simplehistory-provider/src/main/java/pro/taskana/simplehistory/impl/WorkbasketHistoryQueryImpl.java @@ -207,19 +207,19 @@ public class WorkbasketHistoryQueryImpl implements WorkbasketHistoryQuery { @Override public WorkbasketHistoryQuery idIn(String... idIn) { - this.idIn = toUpperCopy(idIn); + this.idIn = idIn; return this; } @Override public WorkbasketHistoryQuery workbasketIdIn(String... workbasketId) { - this.workbasketIdIn = toUpperCopy(workbasketId); + this.workbasketIdIn = workbasketId; return this; } @Override public WorkbasketHistoryQuery eventTypeIn(String... eventType) { - this.eventTypeIn = toUpperCopy(eventType); + this.eventTypeIn = eventType; return this; } @@ -231,55 +231,55 @@ public class WorkbasketHistoryQueryImpl implements WorkbasketHistoryQuery { @Override public WorkbasketHistoryQuery userIdIn(String... userId) { - this.userIdIn = toUpperCopy(userId); + this.userIdIn = userId; return this; } @Override public WorkbasketHistoryQuery domainIn(String... domain) { - this.domainIn = toUpperCopy(domain); + this.domainIn = domain; return this; } @Override public WorkbasketHistoryQuery keyIn(String... workbasketKey) { - this.keyIn = toUpperCopy(workbasketKey); + this.keyIn = workbasketKey; return this; } @Override public WorkbasketHistoryQuery typeIn(String... workbasketType) { - this.typeIn = toUpperCopy(workbasketType); + this.typeIn = workbasketType; return this; } @Override - public WorkbasketHistoryQuery ownerIn(String... oownerIn) { - this.ownerIn = toUpperCopy(ownerIn); + public WorkbasketHistoryQuery ownerIn(String... ownerIn) { + this.ownerIn = ownerIn; return this; } @Override public WorkbasketHistoryQuery orgLevel1In(String... orgLevel1) { - this.orgLevel1In = toUpperCopy(orgLevel1); + this.orgLevel1In = orgLevel1; return this; } @Override public WorkbasketHistoryQuery orgLevel2In(String... orgLevel2) { - this.orgLevel2In = toUpperCopy(orgLevel2); + this.orgLevel2In = orgLevel2; return this; } @Override public WorkbasketHistoryQuery orgLevel3In(String... orgLevel3) { - this.orgLevel3In = toUpperCopy(orgLevel3); + this.orgLevel3In = orgLevel3; return this; } @Override public WorkbasketHistoryQuery orgLevel4In(String... orgLevel4) { - this.orgLevel4In = toUpperCopy(orgLevel4); + this.orgLevel4In = orgLevel4; return this; } @@ -288,16 +288,16 @@ public class WorkbasketHistoryQueryImpl implements WorkbasketHistoryQuery { WorkbasketCustomField customField, String... searchArguments) { switch (customField) { case CUSTOM_1: - custom1In = toUpperCopy(searchArguments); + custom1In = searchArguments; break; case CUSTOM_2: - custom2In = toUpperCopy(searchArguments); + custom2In = searchArguments; break; case CUSTOM_3: - custom3In = toUpperCopy(searchArguments); + custom3In = searchArguments; break; case CUSTOM_4: - custom4In = toUpperCopy(searchArguments); + custom4In = searchArguments; break; default: throw new SystemException("Unknown customField '" + customField + "'"); @@ -310,16 +310,16 @@ public class WorkbasketHistoryQueryImpl implements WorkbasketHistoryQuery { WorkbasketCustomField customField, String... searchArguments) { switch (customField) { case CUSTOM_1: - custom1Like = toUpperCopy(searchArguments); + custom1Like = toLowerCopy(searchArguments); break; case CUSTOM_2: - custom2Like = toUpperCopy(searchArguments); + custom2Like = toLowerCopy(searchArguments); break; case CUSTOM_3: - custom3Like = toUpperCopy(searchArguments); + custom3Like = toLowerCopy(searchArguments); break; case CUSTOM_4: - custom4Like = toUpperCopy(searchArguments); + custom4Like = toLowerCopy(searchArguments); break; default: throw new SystemException("Unknown customField '" + customField + "'"); @@ -329,67 +329,67 @@ public class WorkbasketHistoryQueryImpl implements WorkbasketHistoryQuery { @Override public WorkbasketHistoryQuery workbasketIdLike(String... workbasketId) { - this.workbasketIdLike = toUpperCopy(workbasketId); + this.workbasketIdLike = toLowerCopy(workbasketId); return this; } @Override public WorkbasketHistoryQuery eventTypeLike(String... eventType) { - this.eventTypeLike = toUpperCopy(eventType); + this.eventTypeLike = toLowerCopy(eventType); return this; } @Override public WorkbasketHistoryQuery userIdLike(String... userId) { - this.userIdLike = toUpperCopy(userId); + this.userIdLike = toLowerCopy(userId); return this; } @Override public WorkbasketHistoryQuery domainLike(String... domain) { - this.domainLike = toUpperCopy(domain); + this.domainLike = toLowerCopy(domain); return this; } @Override public WorkbasketHistoryQuery workbasketKeyLike(String... workbasketKey) { - this.keyLike = toUpperCopy(workbasketKey); + this.keyLike = toLowerCopy(workbasketKey); return this; } @Override public WorkbasketHistoryQuery workbasketTypeLike(String... workbasketType) { - this.typeLike = toUpperCopy(workbasketType); + this.typeLike = toLowerCopy(workbasketType); return this; } @Override public WorkbasketHistoryQuery ownerLike(String... ownerLike) { - this.ownerLike = toUpperCopy(ownerLike); + this.ownerLike = toLowerCopy(ownerLike); return this; } @Override public WorkbasketHistoryQuery orgLevel1Like(String... orgLevel1) { - this.orgLevel1Like = toUpperCopy(orgLevel1); + this.orgLevel1Like = toLowerCopy(orgLevel1); return this; } @Override public WorkbasketHistoryQuery orgLevel2Like(String... orgLevel2) { - this.orgLevel2Like = toUpperCopy(orgLevel2); + this.orgLevel2Like = toLowerCopy(orgLevel2); return this; } @Override public WorkbasketHistoryQuery orgLevel3Like(String... orgLevel3) { - this.orgLevel3Like = toUpperCopy(orgLevel3); + this.orgLevel3Like = toLowerCopy(orgLevel3); return this; } @Override public WorkbasketHistoryQuery orgLevel4Like(String... orgLevel4) { - this.orgLevel4Like = toUpperCopy(orgLevel4); + this.orgLevel4Like = toLowerCopy(orgLevel4); return this; } diff --git a/history/taskana-simplehistory-provider/src/main/java/pro/taskana/simplehistory/impl/classification/ClassificationHistoryQueryMapper.java b/history/taskana-simplehistory-provider/src/main/java/pro/taskana/simplehistory/impl/classification/ClassificationHistoryQueryMapper.java index 4d119a512..3778d74fa 100644 --- a/history/taskana-simplehistory-provider/src/main/java/pro/taskana/simplehistory/impl/classification/ClassificationHistoryQueryMapper.java +++ b/history/taskana-simplehistory-provider/src/main/java/pro/taskana/simplehistory/impl/classification/ClassificationHistoryQueryMapper.java @@ -18,50 +18,50 @@ public interface ClassificationHistoryQueryMapper { + "FROM CLASSIFICATION_HISTORY_EVENT" + "" // IN-Queries - + "AND UPPER(ID) IN (#{item}) " - + "AND UPPER(EVENT_TYPE) IN (#{item}) " + + "AND ID IN (#{item}) " + + "AND EVENT_TYPE IN (#{item}) " + " AND ( ( CREATED >= #{item.begin} AND CREATED <=#{item.end} )) " - + "AND UPPER(USER_ID) IN (#{item}) " - + "AND UPPER(CLASSIFICATION_ID) IN (#{item}) " - + "AND UPPER(APPLICATION_ENTRY_POINT) IN (#{item}) " - + "AND UPPER(CATEGORY) IN (#{item}) " - + "AND UPPER(DOMAIN) IN (#{item}) " - + "AND UPPER(KEY) IN (#{item}) " - + "AND UPPER(NAME) IN (#{item}) " - + "AND UPPER(PARENT_ID) IN (#{item}) " - + "AND UPPER(PARENT_KEY) IN (#{item}) " - + "AND UPPER(PRIORITY) IN (#{item}) " - + "AND UPPER(SERVICE_LEVEL) IN (#{item}) " - + "AND UPPER(TYPE) IN (#{item}) " - + "AND UPPER(CUSTOM_1) IN (#{item}) " - + "AND UPPER(CUSTOM_2) IN (#{item}) " - + "AND UPPER(CUSTOM_3) IN (#{item}) " - + "AND UPPER(CUSTOM_4) IN (#{item}) " - + "AND UPPER(CUSTOM_5) IN (#{item}) " - + "AND UPPER(CUSTOM_6) IN (#{item}) " - + "AND UPPER(CUSTOM_7) IN (#{item}) " - + "AND UPPER(CUSTOM_8) IN (#{item}) " + + "AND USER_ID IN (#{item}) " + + "AND CLASSIFICATION_ID IN (#{item}) " + + "AND APPLICATION_ENTRY_POINT IN (#{item}) " + + "AND CATEGORY IN (#{item}) " + + "AND DOMAIN IN (#{item}) " + + "AND KEY IN (#{item}) " + + "AND NAME IN (#{item}) " + + "AND PARENT_ID IN (#{item}) " + + "AND PARENT_KEY IN (#{item}) " + + "AND PRIORITY IN (#{item}) " + + "AND SERVICE_LEVEL IN (#{item}) " + + "AND TYPE IN (#{item}) " + + "AND CUSTOM_1 IN (#{item}) " + + "AND CUSTOM_2 IN (#{item}) " + + "AND CUSTOM_3 IN (#{item}) " + + "AND CUSTOM_4 IN (#{item}) " + + "AND CUSTOM_5 IN (#{item}) " + + "AND CUSTOM_6 IN (#{item}) " + + "AND CUSTOM_7 IN (#{item}) " + + "AND CUSTOM_8 IN (#{item}) " // LIKE-Queries - + "AND (UPPER(EVENT_TYPE) LIKE #{item}) " - + "AND ( UPPER(USER_ID) LIKE #{item}) " - + "AND (UPPER(CLASSIFICATION_ID) LIKE #{item}) " - + "AND (UPPER(APPLICATION_ENTRY_POINT) LIKE #{item}) " - + "AND (UPPER(CATEGORY) LIKE #{item}) " - + "AND (UPPER(DOMAIN) LIKE #{item}) " - + "AND (UPPER(KEY) LIKE #{item}) " - + "AND (UPPER(NAME) LIKE #{item}) " - + "AND (UPPER(PARENT_ID) LIKE #{item}) " - + "AND (UPPER(PARENT_KEY) LIKE #{item}) " - + "AND (UPPER(SERVICE_LEVEL) LIKE #{item}) " - + "AND (UPPER(TYPE) LIKE #{item}) " - + "AND (UPPER(CUSTOM_1) LIKE #{item}) " - + "AND (UPPER(CUSTOM_2) LIKE #{item}) " - + "AND (UPPER(CUSTOM_3) LIKE #{item}) " - + "AND (UPPER(CUSTOM_4) LIKE #{item}) " - + "AND (UPPER(CUSTOM_5) LIKE #{item}) " - + "AND (UPPER(CUSTOM_6) LIKE #{item}) " - + "AND (UPPER(CUSTOM_7) LIKE #{item}) " - + "AND (UPPER(CUSTOM_8) LIKE #{item}) " + + "AND (LOWER(EVENT_TYPE) LIKE #{item}) " + + "AND ( LOWER(USER_ID) LIKE #{item}) " + + "AND (LOWER(CLASSIFICATION_ID) LIKE #{item}) " + + "AND (LOWER(APPLICATION_ENTRY_POINT) LIKE #{item}) " + + "AND (LOWER(CATEGORY) LIKE #{item}) " + + "AND (LOWER(DOMAIN) LIKE #{item}) " + + "AND (LOWER(KEY) LIKE #{item}) " + + "AND (LOWER(NAME) LIKE #{item}) " + + "AND (LOWER(PARENT_ID) LIKE #{item}) " + + "AND (LOWER(PARENT_KEY) LIKE #{item}) " + + "AND (LOWER(SERVICE_LEVEL) LIKE #{item}) " + + "AND (LOWER(TYPE) LIKE #{item}) " + + "AND (LOWER(CUSTOM_1) LIKE #{item}) " + + "AND (LOWER(CUSTOM_2) LIKE #{item}) " + + "AND (LOWER(CUSTOM_3) LIKE #{item}) " + + "AND (LOWER(CUSTOM_4) LIKE #{item}) " + + "AND (LOWER(CUSTOM_5) LIKE #{item}) " + + "AND (LOWER(CUSTOM_6) LIKE #{item}) " + + "AND (LOWER(CUSTOM_7) LIKE #{item}) " + + "AND (LOWER(CUSTOM_8) LIKE #{item}) " + "" + "ORDER BY ${item} " + "") @@ -96,50 +96,50 @@ public interface ClassificationHistoryQueryMapper { + "SELECT COUNT(ID) " + "FROM CLASSIFICATION_HISTORY_EVENT" + "" - + "AND UPPER(ID) IN (#{item}) " - + "AND UPPER(EVENT_TYPE) IN (#{item}) " + + "AND LOWER(ID) IN (#{item}) " + + "AND LOWER(EVENT_TYPE) IN (#{item}) " + " AND ( ( CREATED >= #{item.begin} AND CREATED <=#{item.end} )) " - + "AND UPPER(USER_ID) IN (#{item}) " - + "AND UPPER(CLASSIFICATION_ID) IN (#{item}) " - + "AND UPPER(APPLICATION_ENTRY_POINT) IN (#{item}) " - + "AND UPPER(CATEGORY) IN (#{item}) " - + "AND UPPER(DOMAIN) IN (#{item}) " - + "AND UPPER(KEY) IN (#{item}) " - + "AND UPPER(NAME) IN (#{item}) " - + "AND UPPER(PARENT_ID) IN (#{item}) " - + "AND UPPER(PARENT_KEY) IN (#{item}) " - + "AND UPPER(PRIORITY) IN (#{item}) " - + "AND UPPER(SERVICE_LEVEL) IN (#{item}) " - + "AND UPPER(TYPE) IN (#{item}) " - + "AND UPPER(CUSTOM_1) IN (#{item}) " - + "AND UPPER(CUSTOM_2) IN (#{item}) " - + "AND UPPER(CUSTOM_3) IN (#{item}) " - + "AND UPPER(CUSTOM_4) IN (#{item}) " - + "AND UPPER(CUSTOM_5) IN (#{item}) " - + "AND UPPER(CUSTOM_6) IN (#{item}) " - + "AND UPPER(CUSTOM_7) IN (#{item}) " - + "AND UPPER(CUSTOM_8) IN (#{item}) " + + "AND LOWER(USER_ID) IN (#{item}) " + + "AND LOWER(CLASSIFICATION_ID) IN (#{item}) " + + "AND LOWER(APPLICATION_ENTRY_POINT) IN (#{item}) " + + "AND LOWER(CATEGORY) IN (#{item}) " + + "AND LOWER(DOMAIN) IN (#{item}) " + + "AND LOWER(KEY) IN (#{item}) " + + "AND LOWER(NAME) IN (#{item}) " + + "AND LOWER(PARENT_ID) IN (#{item}) " + + "AND LOWER(PARENT_KEY) IN (#{item}) " + + "AND LOWER(PRIORITY) IN (#{item}) " + + "AND LOWER(SERVICE_LEVEL) IN (#{item}) " + + "AND LOWER(TYPE) IN (#{item}) " + + "AND LOWER(CUSTOM_1) IN (#{item}) " + + "AND LOWER(CUSTOM_2) IN (#{item}) " + + "AND LOWER(CUSTOM_3) IN (#{item}) " + + "AND LOWER(CUSTOM_4) IN (#{item}) " + + "AND LOWER(CUSTOM_5) IN (#{item}) " + + "AND LOWER(CUSTOM_6) IN (#{item}) " + + "AND LOWER(CUSTOM_7) IN (#{item}) " + + "AND LOWER(CUSTOM_8) IN (#{item}) " // LIKE-Queries - + "AND (UPPER(EVENT_TYPE) LIKE #{item}) " - + "AND ( UPPER(USER_ID) LIKE #{item}) " - + "AND (UPPER(CLASSIFICATION_ID) LIKE #{item}) " - + "AND (UPPER(APPLICATION_ENTRY_POINT) LIKE #{item}) " - + "AND (UPPER(CATEGORY) LIKE #{item}) " - + "AND (UPPER(DOMAIN) LIKE #{item}) " - + "AND (UPPER(KEY) LIKE #{item}) " - + "AND (UPPER(NAME) LIKE #{item}) " - + "AND (UPPER(PARENT_ID) LIKE #{item}) " - + "AND (UPPER(PARENT_KEY) LIKE #{item}) " - + "AND (UPPER(SERVICE_LEVEL) LIKE #{item}) " - + "AND (UPPER(TYPE) LIKE #{item}) " - + "AND (UPPER(CUSTOM_1) LIKE #{item}) " - + "AND (UPPER(CUSTOM_2) LIKE #{item}) " - + "AND (UPPER(CUSTOM_3) LIKE #{item}) " - + "AND (UPPER(CUSTOM_4) LIKE #{item}) " - + "AND (UPPER(CUSTOM_5) LIKE #{item}) " - + "AND (UPPER(CUSTOM_6) LIKE #{item}) " - + "AND (UPPER(CUSTOM_7) LIKE #{item}) " - + "AND (UPPER(CUSTOM_8) LIKE #{item}) " + + "AND (LOWER(EVENT_TYPE) LIKE #{item}) " + + "AND ( LOWER(USER_ID) LIKE #{item}) " + + "AND (LOWER(CLASSIFICATION_ID) LIKE #{item}) " + + "AND (LOWER(APPLICATION_ENTRY_POINT) LIKE #{item}) " + + "AND (LOWER(CATEGORY) LIKE #{item}) " + + "AND (LOWER(DOMAIN) LIKE #{item}) " + + "AND (LOWER(KEY) LIKE #{item}) " + + "AND (LOWER(NAME) LIKE #{item}) " + + "AND (LOWER(PARENT_ID) LIKE #{item}) " + + "AND (LOWER(PARENT_KEY) LIKE #{item}) " + + "AND (LOWER(SERVICE_LEVEL) LIKE #{item}) " + + "AND (LOWER(TYPE) LIKE #{item}) " + + "AND (LOWER(CUSTOM_1) LIKE #{item}) " + + "AND (LOWER(CUSTOM_2) LIKE #{item}) " + + "AND (LOWER(CUSTOM_3) LIKE #{item}) " + + "AND (LOWER(CUSTOM_4) LIKE #{item}) " + + "AND (LOWER(CUSTOM_5) LIKE #{item}) " + + "AND (LOWER(CUSTOM_6) LIKE #{item}) " + + "AND (LOWER(CUSTOM_7) LIKE #{item}) " + + "AND (LOWER(CUSTOM_8) LIKE #{item}) " + "" + "ORDER BY ${item} " + "") @@ -149,50 +149,50 @@ public interface ClassificationHistoryQueryMapper { "") diff --git a/history/taskana-simplehistory-provider/src/main/java/pro/taskana/simplehistory/impl/task/TaskHistoryQueryMapper.java b/history/taskana-simplehistory-provider/src/main/java/pro/taskana/simplehistory/impl/task/TaskHistoryQueryMapper.java index 8f0ab9b1c..d8e174f67 100644 --- a/history/taskana-simplehistory-provider/src/main/java/pro/taskana/simplehistory/impl/task/TaskHistoryQueryMapper.java +++ b/history/taskana-simplehistory-provider/src/main/java/pro/taskana/simplehistory/impl/task/TaskHistoryQueryMapper.java @@ -24,51 +24,51 @@ public interface TaskHistoryQueryMapper { + "" + "" // IN-Queries - + "AND UPPER(ID) IN (#{item}) " - + "AND UPPER(BUSINESS_PROCESS_ID) IN (#{item}) " - + "AND UPPER(PARENT_BUSINESS_PROCESS_ID) IN (#{item}) " - + "AND UPPER(TASK_ID) IN (#{item}) " - + "AND UPPER(EVENT_TYPE) IN (#{item}) " + + "AND ID IN (#{item}) " + + "AND BUSINESS_PROCESS_ID IN (#{item}) " + + "AND PARENT_BUSINESS_PROCESS_ID IN (#{item}) " + + "AND TASK_ID IN (#{item}) " + + "AND EVENT_TYPE IN (#{item}) " + " AND ( ( CREATED >= #{item.begin} AND CREATED <=#{item.end} )) " - + "AND UPPER(t.USER_ID) IN (#{item}) " - + "AND UPPER(DOMAIN) IN (#{item}) " - + "AND UPPER(WORKBASKET_KEY) IN (#{item}) " - + "AND UPPER(POR_COMPANY) IN (#{item}) " - + "AND UPPER(POR_SYSTEM) IN (#{item}) " - + "AND UPPER(POR_INSTANCE) IN (#{item}) " - + "AND UPPER(POR_TYPE) IN (#{item}) " - + "AND UPPER(POR_VALUE) IN (#{item}) " - + "AND UPPER(TASK_CLASSIFICATION_KEY) IN (#{item}) " - + "AND UPPER(TASK_CLASSIFICATION_CATEGORY) IN (#{item}) " - + "AND UPPER(ATTACHMENT_CLASSIFICATION_KEY) IN (#{item}) " - + "AND UPPER(OLD_VALUE) IN (#{item}) " - + "AND UPPER(NEW_VALUE) IN (#{item}) " - + "AND UPPER(CUSTOM_1) IN (#{item}) " - + "AND UPPER(CUSTOM_2) IN (#{item}) " - + "AND UPPER(CUSTOM_3) IN (#{item}) " - + "AND UPPER(CUSTOM_4) IN (#{item}) " + + "AND t.USER_ID IN (#{item}) " + + "AND DOMAIN IN (#{item}) " + + "AND WORKBASKET_KEY IN (#{item}) " + + "AND POR_COMPANY IN (#{item}) " + + "AND POR_SYSTEM IN (#{item}) " + + "AND POR_INSTANCE IN (#{item}) " + + "AND POR_TYPE IN (#{item}) " + + "AND POR_VALUE IN (#{item}) " + + "AND TASK_CLASSIFICATION_KEY IN (#{item}) " + + "AND TASK_CLASSIFICATION_CATEGORY IN (#{item}) " + + "AND ATTACHMENT_CLASSIFICATION_KEY IN (#{item}) " + + "AND OLD_VALUE IN (#{item}) " + + "AND NEW_VALUE IN (#{item}) " + + "AND CUSTOM_1 IN (#{item}) " + + "AND CUSTOM_2 IN (#{item}) " + + "AND CUSTOM_3 IN (#{item}) " + + "AND CUSTOM_4 IN (#{item}) " // LIKE-Queries - + "AND ( UPPER(BUSINESS_PROCESS_ID) LIKE #{item} ) " - + "AND (UPPER(PARENT_BUSINESS_PROCESS_ID) LIKE #{item}) " - + "AND (UPPER(TASK_ID) LIKE #{item}) " - + "AND (UPPER(EVENT_TYPE) LIKE #{item}) " - + "AND (UPPER(t.USER_ID) LIKE #{item}) " - + "AND (UPPER(DOMAIN) LIKE #{item}) " - + "AND (UPPER(WORKBASKET_KEY) LIKE #{item}) " - + "AND (UPPER(POR_COMPANY) LIKE #{item}) " - + "AND (UPPER(POR_SYSTEM) LIKE #{item}) " - + "AND (UPPER(POR_INSTANCE) LIKE #{item}) " - + "AND (UPPER(POR_TYPE) LIKE #{item}) " - + "AND (UPPER(POR_VALUE) LIKE #{item}) " - + "AND (UPPER(TASK_CLASSIFICATION_KEY) LIKE #{item}) " - + "AND (UPPER(TASK_CLASSIFICATION_CATEGORY) LIKE #{item}) " - + "AND (UPPER(ATTACHMENT_CLASSIFICATION_KEY) LIKE #{item}) " - + "AND (UPPER(OLD_VALUE) LIKE #{item}) " - + "AND (UPPER(NEW_VALUE) LIKE #{item}) " - + "AND (UPPER(CUSTOM_1) LIKE #{item}) " - + "AND (UPPER(CUSTOM_2) LIKE #{item}) " - + "AND (UPPER(CUSTOM_3) LIKE #{item}) " - + "AND (UPPER(CUSTOM_4) LIKE #{item}) " + + "AND ( LOWER(BUSINESS_PROCESS_ID) LIKE #{item} ) " + + "AND (LOWER(PARENT_BUSINESS_PROCESS_ID) LIKE #{item}) " + + "AND (LOWER(TASK_ID) LIKE #{item}) " + + "AND (LOWER(EVENT_TYPE) LIKE #{item}) " + + "AND (LOWER(t.USER_ID) LIKE #{item}) " + + "AND (LOWER(DOMAIN) LIKE #{item}) " + + "AND (LOWER(WORKBASKET_KEY) LIKE #{item}) " + + "AND (LOWER(POR_COMPANY) LIKE #{item}) " + + "AND (LOWER(POR_SYSTEM) LIKE #{item}) " + + "AND (LOWER(POR_INSTANCE) LIKE #{item}) " + + "AND (LOWER(POR_TYPE) LIKE #{item}) " + + "AND (LOWER(POR_VALUE) LIKE #{item}) " + + "AND (LOWER(TASK_CLASSIFICATION_KEY) LIKE #{item}) " + + "AND (LOWER(TASK_CLASSIFICATION_CATEGORY) LIKE #{item}) " + + "AND (LOWER(ATTACHMENT_CLASSIFICATION_KEY) LIKE #{item}) " + + "AND (LOWER(OLD_VALUE) LIKE #{item}) " + + "AND (LOWER(NEW_VALUE) LIKE #{item}) " + + "AND (LOWER(CUSTOM_1) LIKE #{item}) " + + "AND (LOWER(CUSTOM_2) LIKE #{item}) " + + "AND (LOWER(CUSTOM_3) LIKE #{item}) " + + "AND (LOWER(CUSTOM_4) LIKE #{item}) " + "" + "ORDER BY ${item} " + "") @@ -105,50 +105,50 @@ public interface TaskHistoryQueryMapper { + "FROM TASK_HISTORY_EVENT" + "" // IN-Queries - + "AND UPPER(BUSINESS_PROCESS_ID) IN (#{item}) " - + "AND UPPER(PARENT_BUSINESS_PROCESS_ID) IN (#{item}) " - + "AND UPPER(TASK_ID) IN (#{item}) " - + "AND UPPER(EVENT_TYPE) IN (#{item}) " + + "AND BUSINESS_PROCESS_ID IN (#{item}) " + + "AND PARENT_BUSINESS_PROCESS_ID IN (#{item}) " + + "AND TASK_ID IN (#{item}) " + + "AND EVENT_TYPE IN (#{item}) " + " AND ( ( CREATED >= #{item.begin} AND CREATED <=#{item.end} )) " - + "AND UPPER(USER_ID) IN (#{item}) " - + "AND UPPER(DOMAIN) IN (#{item}) " - + "AND UPPER(WORKBASKET_KEY) IN (#{item}) " - + "AND UPPER(POR_COMPANY) IN (#{item}) " - + "AND UPPER(POR_SYSTEM) IN (#{item}) " - + "AND UPPER(POR_INSTANCE) IN (#{item}) " - + "AND UPPER(POR_TYPE) IN (#{item}) " - + "AND UPPER(POR_VALUE) IN (#{item}) " - + "AND UPPER(TASK_CLASSIFICATION_KEY) IN (#{item}) " - + "AND UPPER(TASK_CLASSIFICATION_CATEGORY) IN (#{item}) " - + "AND UPPER(ATTACHMENT_CLASSIFICATION_KEY) IN (#{item}) " - + "AND UPPER(OLD_VALUE) IN (#{item}) " - + "AND UPPER(NEW_VALUE) IN (#{item}) " - + "AND UPPER(CUSTOM_1) IN (#{item}) " - + "AND UPPER(CUSTOM_2) IN (#{item}) " - + "AND UPPER(CUSTOM_3) IN (#{item}) " - + "AND UPPER(CUSTOM_4) IN (#{item}) " + + "AND USER_ID IN (#{item}) " + + "AND DOMAIN IN (#{item}) " + + "AND WORKBASKET_KEY IN (#{item}) " + + "AND POR_COMPANY IN (#{item}) " + + "AND POR_SYSTEM IN (#{item}) " + + "AND POR_INSTANCE IN (#{item}) " + + "AND POR_TYPE IN (#{item}) " + + "AND POR_VALUE IN (#{item}) " + + "AND TASK_CLASSIFICATION_KEY IN (#{item}) " + + "AND TASK_CLASSIFICATION_CATEGORY IN (#{item}) " + + "AND ATTACHMENT_CLASSIFICATION_KEY IN (#{item}) " + + "AND OLD_VALUE IN (#{item}) " + + "AND NEW_VALUE IN (#{item}) " + + "AND CUSTOM_1 IN (#{item}) " + + "AND CUSTOM_2 IN (#{item}) " + + "AND CUSTOM_3 IN (#{item}) " + + "AND CUSTOM_4 IN (#{item}) " // LIKE-Queries - + "AND ( UPPER(BUSINESS_PROCESS_ID) LIKE #{item} ) " - + "AND (UPPER(PARENT_BUSINESS_PROCESS_ID) LIKE #{item}) " - + "AND (UPPER(TASK_ID) LIKE #{item}) " - + "AND (UPPER(EVENT_TYPE) LIKE #{item}) " - + "AND (UPPER(USER_ID) LIKE #{item}) " - + "AND (UPPER(DOMAIN) LIKE #{item}) " - + "AND (UPPER(WORKBASKET_KEY) LIKE #{item}) " - + "AND (UPPER(POR_COMPANY) LIKE #{item}) " - + "AND (UPPER(POR_SYSTEM) LIKE #{item}) " - + "AND (UPPER(POR_INSTANCE) LIKE #{item}) " - + "AND (UPPER(POR_TYPE) LIKE #{item}) " - + "AND (UPPER(POR_VALUE) LIKE #{item}) " - + "AND (UPPER(TASK_CLASSIFICATION_KEY) LIKE #{item}) " - + "AND (UPPER(TASK_CLASSIFICATION_CATEGORY) LIKE #{item}) " - + "AND (UPPER(ATTACHMENT_CLASSIFICATION_KEY) LIKE #{item}) " - + "AND (UPPER(OLD_VALUE) LIKE #{item}) " - + "AND (UPPER(NEW_VALUE) LIKE #{item}) " - + "AND (UPPER(CUSTOM_1) LIKE #{item}) " - + "AND (UPPER(CUSTOM_2) LIKE #{item}) " - + "AND (UPPER(CUSTOM_3) LIKE #{item}) " - + "AND (UPPER(CUSTOM_4) LIKE #{item}) " + + "AND ( LOWER(BUSINESS_PROCESS_ID) LIKE #{item} ) " + + "AND (LOWER(PARENT_BUSINESS_PROCESS_ID) LIKE #{item}) " + + "AND (LOWER(TASK_ID) LIKE #{item}) " + + "AND (LOWER(EVENT_TYPE) LIKE #{item}) " + + "AND (LOWER(USER_ID) LIKE #{item}) " + + "AND (LOWER(DOMAIN) LIKE #{item}) " + + "AND (LOWER(WORKBASKET_KEY) LIKE #{item}) " + + "AND (LOWER(POR_COMPANY) LIKE #{item}) " + + "AND (LOWER(POR_SYSTEM) LIKE #{item}) " + + "AND (LOWER(POR_INSTANCE) LIKE #{item}) " + + "AND (LOWER(POR_TYPE) LIKE #{item}) " + + "AND (LOWER(POR_VALUE) LIKE #{item}) " + + "AND (LOWER(TASK_CLASSIFICATION_KEY) LIKE #{item}) " + + "AND (LOWER(TASK_CLASSIFICATION_CATEGORY) LIKE #{item}) " + + "AND (LOWER(ATTACHMENT_CLASSIFICATION_KEY) LIKE #{item}) " + + "AND (LOWER(OLD_VALUE) LIKE #{item}) " + + "AND (LOWER(NEW_VALUE) LIKE #{item}) " + + "AND (LOWER(CUSTOM_1) LIKE #{item}) " + + "AND (LOWER(CUSTOM_2) LIKE #{item}) " + + "AND (LOWER(CUSTOM_3) LIKE #{item}) " + + "AND (LOWER(CUSTOM_4) LIKE #{item}) " + "" + "") long countHistoryEvents(TaskHistoryQueryImpl historyEventQuery); @@ -162,51 +162,51 @@ public interface TaskHistoryQueryMapper { + "" + "" // IN-Queries - + "AND UPPER(ID) IN (#{item}) " - + "AND UPPER(BUSINESS_PROCESS_ID) IN (#{item}) " - + "AND UPPER(PARENT_BUSINESS_PROCESS_ID) IN (#{item}) " - + "AND UPPER(TASK_ID) IN (#{item}) " - + "AND UPPER(EVENT_TYPE) IN (#{item}) " + + "AND LOWER(ID) IN (#{item}) " + + "AND LOWER(BUSINESS_PROCESS_ID) IN (#{item}) " + + "AND LOWER(PARENT_BUSINESS_PROCESS_ID) IN (#{item}) " + + "AND LOWER(TASK_ID) IN (#{item}) " + + "AND LOWER(EVENT_TYPE) IN (#{item}) " + " AND ( ( CREATED >= #{item.begin} AND CREATED <=#{item.end} )) " - + "AND UPPER(USER_ID) IN (#{item}) " - + "AND UPPER(DOMAIN) IN (#{item}) " - + "AND UPPER(WORKBASKET_KEY) IN (#{item}) " - + "AND UPPER(POR_COMPANY) IN (#{item}) " - + "AND UPPER(POR_SYSTEM) IN (#{item}) " - + "AND UPPER(POR_INSTANCE) IN (#{item}) " - + "AND UPPER(POR_TYPE) IN (#{item}) " - + "AND UPPER(POR_VALUE) IN (#{item}) " - + "AND UPPER(TASK_CLASSIFICATION_KEY) IN (#{item}) " - + "AND UPPER(TASK_CLASSIFICATION_CATEGORY) IN (#{item}) " - + "AND UPPER(ATTACHMENT_CLASSIFICATION_KEY) IN (#{item}) " - + "AND UPPER(OLD_VALUE) IN (#{item}) " - + "AND UPPER(NEW_VALUE) IN (#{item}) " - + "AND UPPER(CUSTOM_1) IN (#{item}) " - + "AND UPPER(CUSTOM_2) IN (#{item}) " - + "AND UPPER(CUSTOM_3) IN (#{item}) " - + "AND UPPER(CUSTOM_4) IN (#{item}) " + + "AND LOWER(USER_ID) IN (#{item}) " + + "AND LOWER(DOMAIN) IN (#{item}) " + + "AND LOWER(WORKBASKET_KEY) IN (#{item}) " + + "AND LOWER(POR_COMPANY) IN (#{item}) " + + "AND LOWER(POR_SYSTEM) IN (#{item}) " + + "AND LOWER(POR_INSTANCE) IN (#{item}) " + + "AND LOWER(POR_TYPE) IN (#{item}) " + + "AND LOWER(POR_VALUE) IN (#{item}) " + + "AND LOWER(TASK_CLASSIFICATION_KEY) IN (#{item}) " + + "AND LOWER(TASK_CLASSIFICATION_CATEGORY) IN (#{item}) " + + "AND LOWER(ATTACHMENT_CLASSIFICATION_KEY) IN (#{item}) " + + "AND LOWER(OLD_VALUE) IN (#{item}) " + + "AND LOWER(NEW_VALUE) IN (#{item}) " + + "AND LOWER(CUSTOM_1) IN (#{item}) " + + "AND LOWER(CUSTOM_2) IN (#{item}) " + + "AND LOWER(CUSTOM_3) IN (#{item}) " + + "AND LOWER(CUSTOM_4) IN (#{item}) " // LIKE-Queries - + "AND ( UPPER(BUSINESS_PROCESS_ID) LIKE #{item} ) " - + "AND (UPPER(PARENT_BUSINESS_PROCESS_ID) LIKE #{item}) " - + "AND (UPPER(TASK_ID) LIKE #{item}) " - + "AND (UPPER(EVENT_TYPE) LIKE #{item}) " - + "AND (UPPER(USER_ID) LIKE #{item}) " - + "AND (UPPER(DOMAIN) LIKE #{item}) " - + "AND (UPPER(WORKBASKET_KEY) LIKE #{item}) " - + "AND (UPPER(POR_COMPANY) LIKE #{item}) " - + "AND (UPPER(POR_SYSTEM) LIKE #{item}) " - + "AND (UPPER(POR_INSTANCE) LIKE #{item}) " - + "AND (UPPER(POR_TYPE) LIKE #{item}) " - + "AND (UPPER(POR_VALUE) LIKE #{item}) " - + "AND (UPPER(TASK_CLASSIFICATION_KEY) LIKE #{item}) " - + "AND (UPPER(TASK_CLASSIFICATION_CATEGORY) LIKE #{item}) " - + "AND (UPPER(ATTACHMENT_CLASSIFICATION_KEY) LIKE #{item}) " - + "AND (UPPER(OLD_VALUE) LIKE #{item}) " - + "AND (UPPER(NEW_VALUE) LIKE #{item}) " - + "AND (UPPER(CUSTOM_1) LIKE #{item}) " - + "AND (UPPER(CUSTOM_2) LIKE #{item}) " - + "AND (UPPER(CUSTOM_3) LIKE #{item}) " - + "AND (UPPER(CUSTOM_4) LIKE #{item}) " + + "AND ( LOWER(BUSINESS_PROCESS_ID) LIKE #{item} ) " + + "AND (LOWER(PARENT_BUSINESS_PROCESS_ID) LIKE #{item}) " + + "AND (LOWER(TASK_ID) LIKE #{item}) " + + "AND (LOWER(EVENT_TYPE) LIKE #{item}) " + + "AND (LOWER(USER_ID) LIKE #{item}) " + + "AND (LOWER(DOMAIN) LIKE #{item}) " + + "AND (LOWER(WORKBASKET_KEY) LIKE #{item}) " + + "AND (LOWER(POR_COMPANY) LIKE #{item}) " + + "AND (LOWER(POR_SYSTEM) LIKE #{item}) " + + "AND (LOWER(POR_INSTANCE) LIKE #{item}) " + + "AND (LOWER(POR_TYPE) LIKE #{item}) " + + "AND (LOWER(POR_VALUE) LIKE #{item}) " + + "AND (LOWER(TASK_CLASSIFICATION_KEY) LIKE #{item}) " + + "AND (LOWER(TASK_CLASSIFICATION_CATEGORY) LIKE #{item}) " + + "AND (LOWER(ATTACHMENT_CLASSIFICATION_KEY) LIKE #{item}) " + + "AND (LOWER(OLD_VALUE) LIKE #{item}) " + + "AND (LOWER(NEW_VALUE) LIKE #{item}) " + + "AND (LOWER(CUSTOM_1) LIKE #{item}) " + + "AND (LOWER(CUSTOM_2) LIKE #{item}) " + + "AND (LOWER(CUSTOM_3) LIKE #{item}) " + + "AND (LOWER(CUSTOM_4) LIKE #{item}) " + "" + "ORDER BY ${item} " + "") diff --git a/history/taskana-simplehistory-provider/src/main/java/pro/taskana/simplehistory/impl/workbasket/WorkbasketHistoryQueryMapper.java b/history/taskana-simplehistory-provider/src/main/java/pro/taskana/simplehistory/impl/workbasket/WorkbasketHistoryQueryMapper.java index 65546cf30..1c4ffa544 100644 --- a/history/taskana-simplehistory-provider/src/main/java/pro/taskana/simplehistory/impl/workbasket/WorkbasketHistoryQueryMapper.java +++ b/history/taskana-simplehistory-provider/src/main/java/pro/taskana/simplehistory/impl/workbasket/WorkbasketHistoryQueryMapper.java @@ -18,39 +18,39 @@ public interface WorkbasketHistoryQueryMapper { + "FROM WORKBASKET_HISTORY_EVENT" + "" // IN-Queries - + "AND UPPER(ID) IN (#{item}) " - + "AND UPPER(WORKBASKET_ID) IN (#{item}) " - + "AND UPPER(EVENT_TYPE) IN (#{item}) " + + "AND ID IN (#{item}) " + + "AND WORKBASKET_ID IN (#{item}) " + + "AND EVENT_TYPE IN (#{item}) " + " AND ( ( CREATED >= #{item.begin} AND CREATED <=#{item.end} )) " - + "AND UPPER(USER_ID) IN (#{item}) " - + "AND UPPER(DOMAIN) IN (#{item}) " - + "AND UPPER(KEY) IN (#{item}) " - + "AND UPPER(TYPE) IN (#{item}) " - + "AND UPPER(OWNER) IN (#{item}) " - + "AND UPPER(CUSTOM_1) IN (#{item}) " - + "AND UPPER(CUSTOM_2) IN (#{item}) " - + "AND UPPER(CUSTOM_3) IN (#{item}) " - + "AND UPPER(CUSTOM_4) IN (#{item}) " - + "AND UPPER(ORGLEVEL_1) IN (#{item}) " - + "AND UPPER(ORGLEVEL_2) IN (#{item}) " - + "AND UPPER(ORGLEVEL_3) IN (#{item}) " - + "AND UPPER(ORGLEVEL_4) IN (#{item}) " + + "AND USER_ID IN (#{item}) " + + "AND DOMAIN IN (#{item}) " + + "AND KEY IN (#{item}) " + + "AND TYPE IN (#{item}) " + + "AND OWNER IN (#{item}) " + + "AND CUSTOM_1 IN (#{item}) " + + "AND CUSTOM_2 IN (#{item}) " + + "AND CUSTOM_3 IN (#{item}) " + + "AND CUSTOM_4 IN (#{item}) " + + "AND ORGLEVEL_1 IN (#{item}) " + + "AND ORGLEVEL_2 IN (#{item}) " + + "AND ORGLEVEL_3 IN (#{item}) " + + "AND ORGLEVEL_4 IN (#{item}) " // LIKE-Queries - + "AND (UPPER(WORKBASKET_ID) LIKE #{item}) " - + "AND (UPPER(EVENT_TYPE) LIKE #{item}) " - + "AND (UPPER(USER_ID) LIKE #{item}) " - + "AND (UPPER(DOMAIN) LIKE #{item}) " - + "AND (UPPER(KEY) LIKE #{item}) " - + "AND (UPPER(TYPE) LIKE #{item}) " - + "AND (UPPER(OWNER) LIKE #{item}) " - + "AND (UPPER(CUSTOM_1) LIKE #{item}) " - + "AND (UPPER(CUSTOM_2) LIKE #{item}) " - + "AND (UPPER(CUSTOM_3) LIKE #{item}) " - + "AND (UPPER(CUSTOM_4) LIKE #{item}) " - + "AND (UPPER(ORGLEVEL_1) LIKE #{item}) " - + "AND (UPPER(ORGLEVEL_2) LIKE #{item}) " - + "AND (UPPER(ORGLEVEL_3) LIKE #{item}) " - + "AND (UPPER(ORGLEVEL_4) LIKE #{item}) " + + "AND (LOWER(WORKBASKET_ID) LIKE #{item}) " + + "AND (LOWER(EVENT_TYPE) LIKE #{item}) " + + "AND (LOWER(USER_ID) LIKE #{item}) " + + "AND (LOWER(DOMAIN) LIKE #{item}) " + + "AND (LOWER(KEY) LIKE #{item}) " + + "AND (LOWER(TYPE) LIKE #{item}) " + + "AND (LOWER(OWNER) LIKE #{item}) " + + "AND (LOWER(CUSTOM_1) LIKE #{item}) " + + "AND (LOWER(CUSTOM_2) LIKE #{item}) " + + "AND (LOWER(CUSTOM_3) LIKE #{item}) " + + "AND (LOWER(CUSTOM_4) LIKE #{item}) " + + "AND (LOWER(ORGLEVEL_1) LIKE #{item}) " + + "AND (LOWER(ORGLEVEL_2) LIKE #{item}) " + + "AND (LOWER(ORGLEVEL_3) LIKE #{item}) " + + "AND (LOWER(ORGLEVEL_4) LIKE #{item}) " + "" + "ORDER BY ${item} " + "") @@ -78,39 +78,39 @@ public interface WorkbasketHistoryQueryMapper { + "SELECT COUNT(ID) " + "FROM WORKBASKET_HISTORY_EVENT" + "" - + "AND UPPER(ID) IN (#{item}) " - + "AND UPPER(WORKBASKET_ID) IN (#{item}) " - + "AND UPPER(EVENT_TYPE) IN (#{item}) " + + "AND LOWER(ID) IN (#{item}) " + + "AND LOWER(WORKBASKET_ID) IN (#{item}) " + + "AND LOWER(EVENT_TYPE) IN (#{item}) " + " AND ( ( CREATED >= #{item.begin} AND CREATED <=#{item.end} )) " - + "AND UPPER(USER_ID) IN (#{item}) " - + "AND UPPER(DOMAIN) IN (#{item}) " - + "AND UPPER(KEY) IN (#{item}) " - + "AND UPPER(TYPE) IN (#{item}) " - + "AND UPPER(OWNER) IN (#{item}) " - + "AND UPPER(CUSTOM_1) IN (#{item}) " - + "AND UPPER(CUSTOM_2) IN (#{item}) " - + "AND UPPER(CUSTOM_3) IN (#{item}) " - + "AND UPPER(CUSTOM_4) IN (#{item}) " - + "AND UPPER(ORGLEVEL_1) IN (#{item}) " - + "AND UPPER(ORGLEVEL_2) IN (#{item}) " - + "AND UPPER(ORGLEVEL_3) IN (#{item}) " - + "AND UPPER(ORGLEVEL_4) IN (#{item}) " + + "AND LOWER(USER_ID) IN (#{item}) " + + "AND LOWER(DOMAIN) IN (#{item}) " + + "AND LOWER(KEY) IN (#{item}) " + + "AND LOWER(TYPE) IN (#{item}) " + + "AND LOWER(OWNER) IN (#{item}) " + + "AND LOWER(CUSTOM_1) IN (#{item}) " + + "AND LOWER(CUSTOM_2) IN (#{item}) " + + "AND LOWER(CUSTOM_3) IN (#{item}) " + + "AND LOWER(CUSTOM_4) IN (#{item}) " + + "AND LOWER(ORGLEVEL_1) IN (#{item}) " + + "AND LOWER(ORGLEVEL_2) IN (#{item}) " + + "AND LOWER(ORGLEVEL_3) IN (#{item}) " + + "AND LOWER(ORGLEVEL_4) IN (#{item}) " // LIKE-Queries - + "AND (UPPER(WORKBASKET_ID) LIKE #{item}) " - + "AND (UPPER(EVENT_TYPE) LIKE #{item}) " - + "AND (UPPER(USER_ID) LIKE #{item}) " - + "AND (UPPER(DOMAIN) LIKE #{item}) " - + "AND (UPPER(KEY) LIKE #{item}) " - + "AND (UPPER(TYPE) LIKE #{item}) " - + "AND (UPPER(OWNER) LIKE #{item}) " - + "AND (UPPER(CUSTOM_1) LIKE #{item}) " - + "AND (UPPER(CUSTOM_2) LIKE #{item}) " - + "AND (UPPER(CUSTOM_3) LIKE #{item}) " - + "AND (UPPER(CUSTOM_4) LIKE #{item}) " - + "AND (UPPER(ORGLEVEL_1) LIKE #{item}) " - + "AND (UPPER(ORGLEVEL_2) LIKE #{item}) " - + "AND (UPPER(ORGLEVEL_3) LIKE #{item}) " - + "AND (UPPER(ORGLEVEL_4) LIKE #{item}) " + + "AND (LOWER(WORKBASKET_ID) LIKE #{item}) " + + "AND (LOWER(EVENT_TYPE) LIKE #{item}) " + + "AND (LOWER(USER_ID) LIKE #{item}) " + + "AND (LOWER(DOMAIN) LIKE #{item}) " + + "AND (LOWER(KEY) LIKE #{item}) " + + "AND (LOWER(TYPE) LIKE #{item}) " + + "AND (LOWER(OWNER) LIKE #{item}) " + + "AND (LOWER(CUSTOM_1) LIKE #{item}) " + + "AND (LOWER(CUSTOM_2) LIKE #{item}) " + + "AND (LOWER(CUSTOM_3) LIKE #{item}) " + + "AND (LOWER(CUSTOM_4) LIKE #{item}) " + + "AND (LOWER(ORGLEVEL_1) LIKE #{item}) " + + "AND (LOWER(ORGLEVEL_2) LIKE #{item}) " + + "AND (LOWER(ORGLEVEL_3) LIKE #{item}) " + + "AND (LOWER(ORGLEVEL_4) LIKE #{item}) " + "" + "") long countHistoryEvents(WorkbasketHistoryQueryImpl historyEventQuery); @@ -119,39 +119,39 @@ public interface WorkbasketHistoryQueryMapper { "") diff --git a/history/taskana-simplehistory-provider/src/test/java/acceptance/query/QueryWorkbasketHistoryAccTest.java b/history/taskana-simplehistory-provider/src/test/java/acceptance/query/QueryWorkbasketHistoryAccTest.java index e70529f79..6e58caa64 100644 --- a/history/taskana-simplehistory-provider/src/test/java/acceptance/query/QueryWorkbasketHistoryAccTest.java +++ b/history/taskana-simplehistory-provider/src/test/java/acceptance/query/QueryWorkbasketHistoryAccTest.java @@ -12,6 +12,7 @@ import org.junit.jupiter.api.Test; import pro.taskana.common.api.BaseQuery.SortDirection; import pro.taskana.common.api.TimeInterval; +import pro.taskana.common.api.exceptions.InvalidArgumentException; import pro.taskana.simplehistory.impl.SimpleHistoryServiceImpl; import pro.taskana.simplehistory.impl.workbasket.WorkbasketHistoryQuery; import pro.taskana.simplehistory.impl.workbasket.WorkbasketHistoryQueryColumnName; @@ -166,6 +167,12 @@ class QueryWorkbasketHistoryAccTest extends AbstractAccTest { returnValues = historyService.createWorkbasketHistoryQuery().keyIn("soRt003").list(); assertThat(returnValues).hasSize(5); + returnValues = historyService.createWorkbasketHistoryQuery().ownerIn("admin").list(); + assertThat(returnValues).hasSize(10); + + returnValues = historyService.createWorkbasketHistoryQuery().typeIn("TOPIC").list(); + assertThat(returnValues).hasSize(10); + returnValues = historyService .createWorkbasketHistoryQuery() @@ -207,6 +214,114 @@ class QueryWorkbasketHistoryAccTest extends AbstractAccTest { assertThat(returnValues).hasSize(5); } + @Test + void should_ReturnHistoryEvents_In_DifferentOrders() throws InvalidArgumentException { + List results = + historyService + .createWorkbasketHistoryQuery() + .orderByWorkbasketId(SortDirection.ASCENDING) + .listPage(0, 3); + assertThat(results) + .extracting(WorkbasketHistoryEvent::getWorkbasketId) + .containsExactly( + "WBI:000000000000000000000000000000000803", + "WBI:000000000000000000000000000000000803", + "WBI:000000000000000000000000000000000803"); + + results = + historyService + .createWorkbasketHistoryQuery() + .orderByEventType(SortDirection.ASCENDING) + .listPage(0, 3); + assertThat(results) + .extracting(WorkbasketHistoryEvent::getEventType) + .containsExactly("CREATED", "CREATED", "CREATED"); + + results = + historyService + .createWorkbasketHistoryQuery() + .orderByOrgLevel(1, SortDirection.ASCENDING) + .listPage(0, 3); + assertThat(results) + .extracting(WorkbasketHistoryEvent::getOrgLevel1) + .containsExactly("orgLevel1", "orgLevel1", "orgLevel1"); + + results = + historyService + .createWorkbasketHistoryQuery() + .orderByOrgLevel(2, SortDirection.ASCENDING) + .listPage(0, 3); + assertThat(results) + .extracting(WorkbasketHistoryEvent::getOrgLevel2) + .containsExactly("orgLevel2", "orgLevel2", "orgLevel2"); + + results = + historyService + .createWorkbasketHistoryQuery() + .orderByOrgLevel(3, SortDirection.ASCENDING) + .listPage(0, 3); + assertThat(results) + .extracting(WorkbasketHistoryEvent::getOrgLevel3) + .containsExactly("orgLevel3", "orgLevel3", "orgLevel3"); + + results = + historyService + .createWorkbasketHistoryQuery() + .orderByOrgLevel(4, SortDirection.ASCENDING) + .listPage(0, 3); + assertThat(results) + .extracting(WorkbasketHistoryEvent::getOrgLevel4) + .containsExactly("orgLevel4", "orgLevel4", "orgLevel4"); + + results = + historyService + .createWorkbasketHistoryQuery() + .orderByCustomAttribute(1, SortDirection.ASCENDING) + .listPage(0, 3); + assertThat(results) + .extracting(WorkbasketHistoryEvent::getId) + .containsExactly( + "WHI:000000000000000000000000000000000000", + "WHI:000000000000000000000000000000000002", + "WHI:000000000000000000000000000000000004"); + + results = + historyService + .createWorkbasketHistoryQuery() + .orderByCustomAttribute(2, SortDirection.ASCENDING) + .listPage(0, 3); + assertThat(results) + .extracting(WorkbasketHistoryEvent::getId) + .containsExactly( + "WHI:000000000000000000000000000000000000", + "WHI:000000000000000000000000000000000002", + "WHI:000000000000000000000000000000000004"); + + results = + historyService + .createWorkbasketHistoryQuery() + .orderByCustomAttribute(3, SortDirection.ASCENDING) + .listPage(0, 3); + assertThat(results) + .extracting(WorkbasketHistoryEvent::getId) + .containsExactly( + "WHI:000000000000000000000000000000000000", + "WHI:000000000000000000000000000000000002", + "WHI:000000000000000000000000000000000004"); + + results = + historyService + .createWorkbasketHistoryQuery() + .orderByCustomAttribute(4, SortDirection.ASCENDING) + .listPage(0, 3); + assertThat(results) + .extracting(WorkbasketHistoryEvent::getId) + .containsExactly( + "WHI:000000000000000000000000000000000000", + "WHI:000000000000000000000000000000000002", + "WHI:000000000000000000000000000000000004"); + } + @Test void should_ReturnHistoryEvents_For_DifferentLikeAttributes() { @@ -238,11 +353,41 @@ class QueryWorkbasketHistoryAccTest extends AbstractAccTest { returnValues = historyService .createWorkbasketHistoryQuery() - .customAttributeLike(WorkbasketCustomField.CUSTOM_1, "other%") + .customAttributeLike(WorkbasketCustomField.CUSTOM_1, "other%1") .list(); assertThat(returnValues).hasSize(5); - returnValues = historyService.createWorkbasketHistoryQuery().orgLevel1Like("org%").list(); + returnValues = + historyService + .createWorkbasketHistoryQuery() + .customAttributeLike(WorkbasketCustomField.CUSTOM_2, "other%2") + .list(); + assertThat(returnValues).hasSize(5); + + returnValues = + historyService + .createWorkbasketHistoryQuery() + .customAttributeLike(WorkbasketCustomField.CUSTOM_3, "other%3") + .list(); + assertThat(returnValues).hasSize(5); + + returnValues = + historyService + .createWorkbasketHistoryQuery() + .customAttributeLike(WorkbasketCustomField.CUSTOM_4, "other%4") + .list(); + assertThat(returnValues).hasSize(5); + + returnValues = historyService.createWorkbasketHistoryQuery().orgLevel1Like("org%1").list(); + assertThat(returnValues).hasSize(5); + + returnValues = historyService.createWorkbasketHistoryQuery().orgLevel2Like("org%2").list(); + assertThat(returnValues).hasSize(5); + + returnValues = historyService.createWorkbasketHistoryQuery().orgLevel3Like("org%3").list(); + assertThat(returnValues).hasSize(5); + + returnValues = historyService.createWorkbasketHistoryQuery().orgLevel4Like("org%4").list(); assertThat(returnValues).hasSize(5); } diff --git a/history/taskana-simplehistory-provider/src/test/resources/log4j2-test.xml b/history/taskana-simplehistory-provider/src/test/resources/log4j2-test.xml deleted file mode 100644 index b2c806d68..000000000 --- a/history/taskana-simplehistory-provider/src/test/resources/log4j2-test.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/history/taskana-simplehistory-provider/src/test/resources/simplelogger.properties b/history/taskana-simplehistory-provider/src/test/resources/simplelogger.properties new file mode 100644 index 000000000..70d8c16b3 --- /dev/null +++ b/history/taskana-simplehistory-provider/src/test/resources/simplelogger.properties @@ -0,0 +1,35 @@ +# SLF4J's SimpleLogger configuration file +# Simple implementation of Logger that sends all enabled log messages, for all defined loggers, to System.err. + +# Default logging detail level for all instances of SimpleLogger. +# Must be one of ("trace", "debug", "info", "warn", or "error"). +# If not specified, defaults to "info". +org.slf4j.simpleLogger.defaultLogLevel=info + +# Logging detail level for a SimpleLogger instance named "xxxxx". +# Must be one of ("trace", "debug", "info", "warn", or "error"). +# If not specified, the default logging detail level is used. +org.slf4j.simpleLogger.log.pro.taskana=info +org.slf4j.simpleLogger.log.org.apache.ibatis=info + +# Set to true if you want the current date and time to be included in output messages. +# Default is false, and will output the number of milliseconds elapsed since startup. +org.slf4j.simpleLogger.showDateTime=true + +# The date and time format to be used in the output messages. +# The pattern describing the date and time format is the same that is used in java.text.SimpleDateFormat. +# If the format is not specified or is invalid, the default format is used. +# The default format is yyyy-MM-dd HH:mm:ss:SSS Z. +org.slf4j.simpleLogger.dateTimeFormat=yyyy-MM-dd HH:mm:ss:SSS Z + +# Set to true if you want to output the current thread name. +# Defaults to true. +org.slf4j.simpleLogger.showThreadName=true + +# Set to true if you want the Logger instance name to be included in output messages. +# Defaults to true. +#org.slf4j.simpleLogger.showLogName=true + +# Set to true if you want the last component of the name to be included in output messages. +# Defaults to false. +org.slf4j.simpleLogger.showShortLogName=false diff --git a/lib/taskana-core/src/main/java/pro/taskana/classification/internal/ClassificationQueryImpl.java b/lib/taskana-core/src/main/java/pro/taskana/classification/internal/ClassificationQueryImpl.java index 8a8698f19..688930cb8 100644 --- a/lib/taskana-core/src/main/java/pro/taskana/classification/internal/ClassificationQueryImpl.java +++ b/lib/taskana-core/src/main/java/pro/taskana/classification/internal/ClassificationQueryImpl.java @@ -142,13 +142,13 @@ public class ClassificationQueryImpl implements ClassificationQuery { @Override public ClassificationQuery nameLike(String... nameLike) { - this.nameLike = toUpperCopy(nameLike); + this.nameLike = toLowerCopy(nameLike); return this; } @Override public ClassificationQuery descriptionLike(String description) { - this.descriptionLike = description.toUpperCase(); + this.descriptionLike = description.toLowerCase(); return this; } @@ -166,7 +166,7 @@ public class ClassificationQueryImpl implements ClassificationQuery { @Override public ClassificationQuery serviceLevelLike(String... serviceLevelLike) { - this.serviceLevelLike = toUpperCopy(serviceLevelLike); + this.serviceLevelLike = toLowerCopy(serviceLevelLike); return this; } @@ -178,7 +178,7 @@ public class ClassificationQueryImpl implements ClassificationQuery { @Override public ClassificationQuery applicationEntryPointLike(String... applicationEntryPointLike) { - this.applicationEntryPointLike = toUpperCopy(applicationEntryPointLike); + this.applicationEntryPointLike = toLowerCopy(applicationEntryPointLike); return this; } @@ -232,28 +232,28 @@ public class ClassificationQueryImpl implements ClassificationQuery { switch (customField) { case CUSTOM_1: - this.custom1Like = toUpperCopy(customLike); + this.custom1Like = toLowerCopy(customLike); break; case CUSTOM_2: - this.custom2Like = toUpperCopy(customLike); + this.custom2Like = toLowerCopy(customLike); break; case CUSTOM_3: - this.custom3Like = toUpperCopy(customLike); + this.custom3Like = toLowerCopy(customLike); break; case CUSTOM_4: - this.custom4Like = toUpperCopy(customLike); + this.custom4Like = toLowerCopy(customLike); break; case CUSTOM_5: - this.custom5Like = toUpperCopy(customLike); + this.custom5Like = toLowerCopy(customLike); break; case CUSTOM_6: - this.custom6Like = toUpperCopy(customLike); + this.custom6Like = toLowerCopy(customLike); break; case CUSTOM_7: - this.custom7Like = toUpperCopy(customLike); + this.custom7Like = toLowerCopy(customLike); break; case CUSTOM_8: - this.custom8Like = toUpperCopy(customLike); + this.custom8Like = toLowerCopy(customLike); break; default: throw new SystemException("Unknown customField '" + customField + "'"); diff --git a/lib/taskana-core/src/main/java/pro/taskana/classification/internal/ClassificationQueryMapper.java b/lib/taskana-core/src/main/java/pro/taskana/classification/internal/ClassificationQueryMapper.java index 099f84258..71b3508e3 100644 --- a/lib/taskana-core/src/main/java/pro/taskana/classification/internal/ClassificationQueryMapper.java +++ b/lib/taskana-core/src/main/java/pro/taskana/classification/internal/ClassificationQueryMapper.java @@ -24,29 +24,29 @@ public interface ClassificationQueryMapper { + " AND ( ( CREATED >= #{item.begin} AND CREATED <=#{item.end} )) " + " AND ( ( MODIFIED >= #{item.begin} AND MODIFIED <=#{item.end} )) " + "AND NAME IN(#{item}) " - + "AND (UPPER(NAME) LIKE #{item}) " - + "AND UPPER(DESCRIPTION) like #{descriptionLike} " + + "AND (LOWER(NAME) LIKE #{item}) " + + "AND LOWER(DESCRIPTION) like #{descriptionLike} " + "AND PRIORITY IN(#{item}) " + "AND SERVICE_LEVEL IN(#{item}) " - + "AND (UPPER(SERVICE_LEVEL) LIKE #{item}) " + + "AND (LOWER(SERVICE_LEVEL) LIKE #{item}) " + "AND APPLICATION_ENTRY_POINT IN(#{item}) " - + "AND (UPPER(APPLICATION_ENTRY_POINT) LIKE #{item}) " + + "AND (LOWER(APPLICATION_ENTRY_POINT) LIKE #{item}) " + "AND CUSTOM_1 IN(#{item}) " - + "AND ( UPPER(CUSTOM_1) LIKE #{item}) " + + "AND ( LOWER(CUSTOM_1) LIKE #{item}) " + "AND CUSTOM_2 IN(#{item}) " - + "AND ( UPPER(CUSTOM_2) LIKE #{item}) " + + "AND ( LOWER(CUSTOM_2) LIKE #{item}) " + "AND CUSTOM_3 IN(#{item}) " - + "AND ( UPPER(CUSTOM_3) LIKE #{item}) " + + "AND ( LOWER(CUSTOM_3) LIKE #{item}) " + "AND CUSTOM_4 IN(#{item}) " - + "AND ( UPPER(CUSTOM_4) LIKE #{item}) " + + "AND ( LOWER(CUSTOM_4) LIKE #{item}) " + "AND CUSTOM_5 IN(#{item}) " - + "AND ( UPPER(CUSTOM_5) LIKE #{item}) " + + "AND ( LOWER(CUSTOM_5) LIKE #{item}) " + "AND CUSTOM_6 IN(#{item}) " - + "AND ( UPPER(CUSTOM_6) LIKE #{item}) " + + "AND ( LOWER(CUSTOM_6) LIKE #{item}) " + "AND CUSTOM_7 IN(#{item}) " - + "AND ( UPPER(CUSTOM_7) LIKE #{item}) " + + "AND ( LOWER(CUSTOM_7) LIKE #{item}) " + "AND CUSTOM_8 IN(#{item}) " - + "AND ( UPPER(CUSTOM_8) LIKE #{item}) " + + "AND ( LOWER(CUSTOM_8) LIKE #{item}) " + "" + "ORDER BY ${item} " + "with UR " diff --git a/lib/taskana-core/src/main/java/pro/taskana/monitor/internal/reports/TimeIntervalReportBuilderImpl.java b/lib/taskana-core/src/main/java/pro/taskana/monitor/internal/reports/TimeIntervalReportBuilderImpl.java index 293503ba0..e7bdb635c 100644 --- a/lib/taskana-core/src/main/java/pro/taskana/monitor/internal/reports/TimeIntervalReportBuilderImpl.java +++ b/lib/taskana-core/src/main/java/pro/taskana/monitor/internal/reports/TimeIntervalReportBuilderImpl.java @@ -299,52 +299,52 @@ abstract class TimeIntervalReportBuilderImpl< switch (customField) { case CUSTOM_1: - this.custom1Like = toUpperCopy(strings); + this.custom1Like = toLowerCopy(strings); break; case CUSTOM_2: - this.custom2Like = toUpperCopy(strings); + this.custom2Like = toLowerCopy(strings); break; case CUSTOM_3: - this.custom3Like = toUpperCopy(strings); + this.custom3Like = toLowerCopy(strings); break; case CUSTOM_4: - this.custom4Like = toUpperCopy(strings); + this.custom4Like = toLowerCopy(strings); break; case CUSTOM_5: - this.custom5Like = toUpperCopy(strings); + this.custom5Like = toLowerCopy(strings); break; case CUSTOM_6: - this.custom6Like = toUpperCopy(strings); + this.custom6Like = toLowerCopy(strings); break; case CUSTOM_7: - this.custom7Like = toUpperCopy(strings); + this.custom7Like = toLowerCopy(strings); break; case CUSTOM_8: - this.custom8Like = toUpperCopy(strings); + this.custom8Like = toLowerCopy(strings); break; case CUSTOM_9: - this.custom9Like = toUpperCopy(strings); + this.custom9Like = toLowerCopy(strings); break; case CUSTOM_10: - this.custom10Like = toUpperCopy(strings); + this.custom10Like = toLowerCopy(strings); break; case CUSTOM_11: - this.custom11Like = toUpperCopy(strings); + this.custom11Like = toLowerCopy(strings); break; case CUSTOM_12: - this.custom12Like = toUpperCopy(strings); + this.custom12Like = toLowerCopy(strings); break; case CUSTOM_13: - this.custom13Like = toUpperCopy(strings); + this.custom13Like = toLowerCopy(strings); break; case CUSTOM_14: - this.custom14Like = toUpperCopy(strings); + this.custom14Like = toLowerCopy(strings); break; case CUSTOM_15: - this.custom15Like = toUpperCopy(strings); + this.custom15Like = toLowerCopy(strings); break; case CUSTOM_16: - this.custom16Like = toUpperCopy(strings); + this.custom16Like = toLowerCopy(strings); break; default: throw new SystemException("Unknown custom field '" + customField + "'"); @@ -439,7 +439,7 @@ abstract class TimeIntervalReportBuilderImpl< return false; } - private String[] toUpperCopy(String... source) { + private String[] toLowerCopy(String... source) { if (source == null || source.length == 0) { // we are currently aware that this is a code smell. Unfortunately the resolution of this // would cause havoc in our queries, since we do not have a concept @@ -448,7 +448,7 @@ abstract class TimeIntervalReportBuilderImpl< } else { String[] target = new String[source.length]; for (int i = 0; i < source.length; i++) { - target[i] = source[i].toUpperCase(); + target[i] = source[i].toLowerCase(); } return target; } diff --git a/lib/taskana-core/src/main/java/pro/taskana/monitor/internal/reports/WorkbasketPriorityReportBuilderImpl.java b/lib/taskana-core/src/main/java/pro/taskana/monitor/internal/reports/WorkbasketPriorityReportBuilderImpl.java index b9fe7b981..0215989b3 100644 --- a/lib/taskana-core/src/main/java/pro/taskana/monitor/internal/reports/WorkbasketPriorityReportBuilderImpl.java +++ b/lib/taskana-core/src/main/java/pro/taskana/monitor/internal/reports/WorkbasketPriorityReportBuilderImpl.java @@ -302,52 +302,52 @@ public class WorkbasketPriorityReportBuilderImpl implements WorkbasketPriorityRe switch (customField) { case CUSTOM_1: - this.custom1Like = toUpperCopy(strings); + this.custom1Like = toLowerCopy(strings); break; case CUSTOM_2: - this.custom2Like = toUpperCopy(strings); + this.custom2Like = toLowerCopy(strings); break; case CUSTOM_3: - this.custom3Like = toUpperCopy(strings); + this.custom3Like = toLowerCopy(strings); break; case CUSTOM_4: - this.custom4Like = toUpperCopy(strings); + this.custom4Like = toLowerCopy(strings); break; case CUSTOM_5: - this.custom5Like = toUpperCopy(strings); + this.custom5Like = toLowerCopy(strings); break; case CUSTOM_6: - this.custom6Like = toUpperCopy(strings); + this.custom6Like = toLowerCopy(strings); break; case CUSTOM_7: - this.custom7Like = toUpperCopy(strings); + this.custom7Like = toLowerCopy(strings); break; case CUSTOM_8: - this.custom8Like = toUpperCopy(strings); + this.custom8Like = toLowerCopy(strings); break; case CUSTOM_9: - this.custom9Like = toUpperCopy(strings); + this.custom9Like = toLowerCopy(strings); break; case CUSTOM_10: - this.custom10Like = toUpperCopy(strings); + this.custom10Like = toLowerCopy(strings); break; case CUSTOM_11: - this.custom11Like = toUpperCopy(strings); + this.custom11Like = toLowerCopy(strings); break; case CUSTOM_12: - this.custom12Like = toUpperCopy(strings); + this.custom12Like = toLowerCopy(strings); break; case CUSTOM_13: - this.custom13Like = toUpperCopy(strings); + this.custom13Like = toLowerCopy(strings); break; case CUSTOM_14: - this.custom14Like = toUpperCopy(strings); + this.custom14Like = toLowerCopy(strings); break; case CUSTOM_15: - this.custom15Like = toUpperCopy(strings); + this.custom15Like = toLowerCopy(strings); break; case CUSTOM_16: - this.custom16Like = toUpperCopy(strings); + this.custom16Like = toLowerCopy(strings); break; default: throw new SystemException("Unknown custom field '" + customField + "'"); @@ -356,7 +356,7 @@ public class WorkbasketPriorityReportBuilderImpl implements WorkbasketPriorityRe return this; } - private String[] toUpperCopy(String... source) { + private String[] toLowerCopy(String... source) { if (source == null || source.length == 0) { // we are currently aware that this is a code smell. Unfortunately the resolution of this // would cause havoc in our queries, since we do not have a concept @@ -365,7 +365,7 @@ public class WorkbasketPriorityReportBuilderImpl implements WorkbasketPriorityRe } else { String[] target = new String[source.length]; for (int i = 0; i < source.length; i++) { - target[i] = source[i].toUpperCase(); + target[i] = source[i].toLowerCase(); } return target; } diff --git a/lib/taskana-core/src/main/java/pro/taskana/task/internal/TaskCommentQueryImpl.java b/lib/taskana-core/src/main/java/pro/taskana/task/internal/TaskCommentQueryImpl.java index debc66701..41c62f4e3 100644 --- a/lib/taskana-core/src/main/java/pro/taskana/task/internal/TaskCommentQueryImpl.java +++ b/lib/taskana-core/src/main/java/pro/taskana/task/internal/TaskCommentQueryImpl.java @@ -78,13 +78,13 @@ public class TaskCommentQueryImpl implements TaskCommentQuery { @Override public TaskCommentQuery idLike(String... taskCommentIds) { - this.idLike = toUpperCopy(taskCommentIds); + this.idLike = toLowerCopy(taskCommentIds); return this; } @Override public TaskCommentQuery idNotLike(String... taskCommentIds) { - this.idNotLike = toUpperCopy(taskCommentIds); + this.idNotLike = toLowerCopy(taskCommentIds); return this; } @@ -96,13 +96,13 @@ public class TaskCommentQueryImpl implements TaskCommentQuery { @Override public TaskCommentQuery textFieldLike(String... texts) { - this.textFieldLike = toUpperCopy(texts); + this.textFieldLike = toLowerCopy(texts); return this; } @Override public TaskCommentQuery textFieldNotLike(String... texts) { - this.textFieldNotLike = toUpperCopy(texts); + this.textFieldNotLike = toLowerCopy(texts); return this; } @@ -120,13 +120,13 @@ public class TaskCommentQueryImpl implements TaskCommentQuery { @Override public TaskCommentQuery creatorLike(String... creators) { - this.creatorLike = toUpperCopy(creators); + this.creatorLike = toLowerCopy(creators); return this; } @Override public TaskCommentQuery creatorNotLike(String... creators) { - this.creatorNotLike = toUpperCopy(creators); + this.creatorNotLike = toLowerCopy(creators); return this; } diff --git a/lib/taskana-core/src/main/java/pro/taskana/task/internal/TaskQueryImpl.java b/lib/taskana-core/src/main/java/pro/taskana/task/internal/TaskQueryImpl.java index a61007924..0b16f238b 100644 --- a/lib/taskana-core/src/main/java/pro/taskana/task/internal/TaskQueryImpl.java +++ b/lib/taskana-core/src/main/java/pro/taskana/task/internal/TaskQueryImpl.java @@ -599,13 +599,13 @@ public class TaskQueryImpl implements TaskQuery { @Override public TaskQuery nameLike(String... names) { - this.nameLike = toUpperCopy(names); + this.nameLike = toLowerCopy(names); return this; } @Override public TaskQuery nameNotLike(String... names) { - this.nameNotLike = toUpperCopy(names); + this.nameNotLike = toLowerCopy(names); return this; } @@ -631,13 +631,13 @@ public class TaskQueryImpl implements TaskQuery { @Override public TaskQuery creatorLike(String... creators) { - this.creatorLike = toUpperCopy(creators); + this.creatorLike = toLowerCopy(creators); return this; } @Override public TaskQuery creatorNotLike(String... creators) { - this.creatorNotLike = toUpperCopy(creators); + this.creatorNotLike = toLowerCopy(creators); return this; } @@ -651,13 +651,13 @@ public class TaskQueryImpl implements TaskQuery { @Override public TaskQuery noteLike(String... note) { - this.noteLike = toUpperCopy(note); + this.noteLike = toLowerCopy(note); return this; } @Override public TaskQuery noteNotLike(String... note) { - this.noteNotLike = toUpperCopy(note); + this.noteNotLike = toLowerCopy(note); return this; } @@ -671,13 +671,13 @@ public class TaskQueryImpl implements TaskQuery { @Override public TaskQuery descriptionLike(String... description) { - this.descriptionLike = toUpperCopy(description); + this.descriptionLike = toLowerCopy(description); return this; } @Override public TaskQuery descriptionNotLike(String... description) { - this.descriptionNotLike = toUpperCopy(description); + this.descriptionNotLike = toLowerCopy(description); return this; } @@ -753,13 +753,13 @@ public class TaskQueryImpl implements TaskQuery { @Override public TaskQuery classificationKeyLike(String... classificationKeys) { - this.classificationKeyLike = toUpperCopy(classificationKeys); + this.classificationKeyLike = toLowerCopy(classificationKeys); return this; } @Override public TaskQuery classificationKeyNotLike(String... classificationKeys) { - this.classificationKeyNotLike = toUpperCopy(classificationKeys); + this.classificationKeyNotLike = toLowerCopy(classificationKeys); return this; } @@ -787,13 +787,13 @@ public class TaskQueryImpl implements TaskQuery { @Override public TaskQuery classificationCategoryLike(String... classificationCategories) { - this.classificationCategoryLike = toUpperCopy(classificationCategories); + this.classificationCategoryLike = toLowerCopy(classificationCategories); return this; } @Override public TaskQuery classificationCategoryNotLike(String... classificationCategories) { - this.classificationCategoryNotLike = classificationCategories; + this.classificationCategoryNotLike = toLowerCopy(classificationCategories); return this; } @@ -817,14 +817,14 @@ public class TaskQueryImpl implements TaskQuery { @Override public TaskQuery classificationNameLike(String... classificationNames) { joinWithClassifications = true; - this.classificationNameLike = toUpperCopy(classificationNames); + this.classificationNameLike = toLowerCopy(classificationNames); return this; } @Override public TaskQuery classificationNameNotLike(String... classificationNames) { joinWithClassifications = true; - this.classificationNameNotLike = toUpperCopy(classificationNames); + this.classificationNameNotLike = toLowerCopy(classificationNames); return this; } @@ -889,13 +889,13 @@ public class TaskQueryImpl implements TaskQuery { @Override public TaskQuery businessProcessIdLike(String... businessProcessIds) { - this.businessProcessIdLike = businessProcessIds; + this.businessProcessIdLike = toLowerCopy(businessProcessIds); return this; } @Override public TaskQuery businessProcessIdNotLike(String... businessProcessIds) { - this.businessProcessIdNotLike = businessProcessIds; + this.businessProcessIdNotLike = toLowerCopy(businessProcessIds); return this; } @@ -921,13 +921,13 @@ public class TaskQueryImpl implements TaskQuery { @Override public TaskQuery parentBusinessProcessIdLike(String... businessProcessIds) { - this.parentBusinessProcessIdLike = businessProcessIds; + this.parentBusinessProcessIdLike = toLowerCopy(businessProcessIds); return this; } @Override public TaskQuery parentBusinessProcessIdNotLike(String... businessProcessIds) { - this.parentBusinessProcessIdNotLike = businessProcessIds; + this.parentBusinessProcessIdNotLike = toLowerCopy(businessProcessIds); return this; } @@ -953,13 +953,13 @@ public class TaskQueryImpl implements TaskQuery { @Override public TaskQuery ownerLike(String... owners) { - this.ownerLike = toUpperCopy(owners); + this.ownerLike = toLowerCopy(owners); return this; } @Override public TaskQuery ownerNotLike(String... owners) { - this.ownerNotLike = toUpperCopy(owners); + this.ownerNotLike = toLowerCopy(owners); return this; } @@ -986,14 +986,14 @@ public class TaskQueryImpl implements TaskQuery { @Override public TaskQuery ownerLongNameLike(String... longNames) { joinWithUserInfo = true; - this.ownerLongNameLike = toUpperCopy(longNames); + this.ownerLongNameLike = toLowerCopy(longNames); return this; } @Override public TaskQuery ownerLongNameNotLike(String... longNames) { joinWithUserInfo = true; - this.ownerLongNameNotLike = toUpperCopy(longNames); + this.ownerLongNameNotLike = toLowerCopy(longNames); return this; } @@ -1022,13 +1022,13 @@ public class TaskQueryImpl implements TaskQuery { @Override public TaskQuery primaryObjectReferenceCompanyLike(String... company) { - this.porCompanyLike = toUpperCopy(company); + this.porCompanyLike = toLowerCopy(company); return this; } @Override public TaskQuery primaryObjectReferenceCompanyNotLike(String... company) { - this.porCompanyNotLike = toUpperCopy(company); + this.porCompanyNotLike = toLowerCopy(company); return this; } @@ -1054,13 +1054,13 @@ public class TaskQueryImpl implements TaskQuery { @Override public TaskQuery primaryObjectReferenceSystemLike(String... system) { - this.porSystemLike = toUpperCopy(system); + this.porSystemLike = toLowerCopy(system); return this; } @Override public TaskQuery primaryObjectReferenceSystemNotLike(String... systems) { - this.porSystemNotLike = toUpperCopy(systems); + this.porSystemNotLike = toLowerCopy(systems); return this; } @@ -1086,13 +1086,13 @@ public class TaskQueryImpl implements TaskQuery { @Override public TaskQuery primaryObjectReferenceSystemInstanceLike(String... systemInstance) { - this.porSystemInstanceLike = toUpperCopy(systemInstance); + this.porSystemInstanceLike = toLowerCopy(systemInstance); return this; } @Override public TaskQuery primaryObjectReferenceSystemInstanceNotLike(String... systemInstances) { - this.porSystemInstanceNotLike = toUpperCopy(systemInstances); + this.porSystemInstanceNotLike = toLowerCopy(systemInstances); return this; } @@ -1118,13 +1118,13 @@ public class TaskQueryImpl implements TaskQuery { @Override public TaskQuery primaryObjectReferenceTypeLike(String... types) { - this.porTypeLike = toUpperCopy(types); + this.porTypeLike = toLowerCopy(types); return this; } @Override public TaskQuery primaryObjectReferenceTypeNotLike(String... types) { - this.porTypeNotLike = toUpperCopy(types); + this.porTypeNotLike = toLowerCopy(types); return this; } @@ -1150,13 +1150,13 @@ public class TaskQueryImpl implements TaskQuery { @Override public TaskQuery primaryObjectReferenceValueLike(String... values) { - this.porValueLike = toUpperCopy(values); + this.porValueLike = toLowerCopy(values); return this; } @Override public TaskQuery primaryObjectReferenceValueNotLike(String... values) { - this.porValueNotLike = toUpperCopy(values); + this.porValueNotLike = toLowerCopy(values); return this; } @@ -1229,14 +1229,14 @@ public class TaskQueryImpl implements TaskQuery { @Override public TaskQuery attachmentClassificationKeyLike(String... attachmentClassificationKey) { joinWithAttachments = true; - this.attachmentClassificationKeyLike = toUpperCopy(attachmentClassificationKey); + this.attachmentClassificationKeyLike = toLowerCopy(attachmentClassificationKey); return this; } @Override public TaskQuery attachmentClassificationKeyNotLike(String... attachmentClassificationKey) { joinWithAttachments = true; - this.attachmentClassificationKeyNotLike = toUpperCopy(attachmentClassificationKey); + this.attachmentClassificationKeyNotLike = toLowerCopy(attachmentClassificationKey); return this; } @@ -1269,14 +1269,14 @@ public class TaskQueryImpl implements TaskQuery { @Override public TaskQuery attachmentClassificationNameLike(String... attachmentClassificationName) { joinWithAttachmentClassifications = true; - this.attachmentClassificationNameLike = toUpperCopy(attachmentClassificationName); + this.attachmentClassificationNameLike = toLowerCopy(attachmentClassificationName); return this; } @Override public TaskQuery attachmentClassificationNameNotLike(String... attachmentClassificationName) { joinWithAttachmentClassifications = true; - this.attachmentClassificationNameNotLike = toUpperCopy(attachmentClassificationName); + this.attachmentClassificationNameNotLike = toLowerCopy(attachmentClassificationName); return this; } @@ -1309,14 +1309,14 @@ public class TaskQueryImpl implements TaskQuery { @Override public TaskQuery attachmentChannelLike(String... attachmentChannel) { joinWithAttachments = true; - this.attachmentChannelLike = toUpperCopy(attachmentChannel); + this.attachmentChannelLike = toLowerCopy(attachmentChannel); return this; } @Override public TaskQuery attachmentChannelNotLike(String... attachmentChannel) { joinWithAttachments = true; - this.attachmentChannelNotLike = toUpperCopy(attachmentChannel); + this.attachmentChannelNotLike = toLowerCopy(attachmentChannel); return this; } @@ -1347,14 +1347,14 @@ public class TaskQueryImpl implements TaskQuery { @Override public TaskQuery attachmentReferenceValueLike(String... referenceValue) { joinWithAttachments = true; - this.attachmentReferenceLike = toUpperCopy(referenceValue); + this.attachmentReferenceLike = toLowerCopy(referenceValue); return this; } @Override public TaskQuery attachmentReferenceValueNotLike(String... referenceValue) { joinWithAttachments = true; - this.attachmentReferenceNotLike = toUpperCopy(referenceValue); + this.attachmentReferenceNotLike = toLowerCopy(referenceValue); return this; } @@ -1430,7 +1430,7 @@ public class TaskQueryImpl implements TaskQuery { public TaskQuery sorCompanyLike(String... companyLike) { joinWithSecondaryObjectReferences = true; - sorCompanyLike = toUpperCopy(companyLike); + sorCompanyLike = toLowerCopy(companyLike); return this; } @@ -1444,7 +1444,7 @@ public class TaskQueryImpl implements TaskQuery { public TaskQuery sorSystemLike(String... systemLike) { joinWithSecondaryObjectReferences = true; - sorSystemLike = toUpperCopy(systemLike); + sorSystemLike = toLowerCopy(systemLike); return this; } @@ -1458,7 +1458,7 @@ public class TaskQueryImpl implements TaskQuery { public TaskQuery sorSystemInstanceLike(String... systemInstanceLike) { joinWithSecondaryObjectReferences = true; - sorSystemInstanceLike = toUpperCopy(systemInstanceLike); + sorSystemInstanceLike = toLowerCopy(systemInstanceLike); return this; } @@ -1472,7 +1472,7 @@ public class TaskQueryImpl implements TaskQuery { public TaskQuery sorTypeLike(String... typeLike) { joinWithSecondaryObjectReferences = true; - sorTypeLike = toUpperCopy(typeLike); + sorTypeLike = toLowerCopy(typeLike); return this; } @@ -1487,7 +1487,7 @@ public class TaskQueryImpl implements TaskQuery { public TaskQuery sorValueLike(String... valueLike) { joinWithSecondaryObjectReferences = true; - sorValueLike = toUpperCopy(valueLike); + sorValueLike = toLowerCopy(valueLike); return this; } @@ -1738,52 +1738,52 @@ public class TaskQueryImpl implements TaskQuery { switch (customField) { case CUSTOM_1: - this.custom1Like = toUpperCopy(strings); + this.custom1Like = toLowerCopy(strings); break; case CUSTOM_2: - this.custom2Like = toUpperCopy(strings); + this.custom2Like = toLowerCopy(strings); break; case CUSTOM_3: - this.custom3Like = toUpperCopy(strings); + this.custom3Like = toLowerCopy(strings); break; case CUSTOM_4: - this.custom4Like = toUpperCopy(strings); + this.custom4Like = toLowerCopy(strings); break; case CUSTOM_5: - this.custom5Like = toUpperCopy(strings); + this.custom5Like = toLowerCopy(strings); break; case CUSTOM_6: - this.custom6Like = toUpperCopy(strings); + this.custom6Like = toLowerCopy(strings); break; case CUSTOM_7: - this.custom7Like = toUpperCopy(strings); + this.custom7Like = toLowerCopy(strings); break; case CUSTOM_8: - this.custom8Like = toUpperCopy(strings); + this.custom8Like = toLowerCopy(strings); break; case CUSTOM_9: - this.custom9Like = toUpperCopy(strings); + this.custom9Like = toLowerCopy(strings); break; case CUSTOM_10: - this.custom10Like = toUpperCopy(strings); + this.custom10Like = toLowerCopy(strings); break; case CUSTOM_11: - this.custom11Like = toUpperCopy(strings); + this.custom11Like = toLowerCopy(strings); break; case CUSTOM_12: - this.custom12Like = toUpperCopy(strings); + this.custom12Like = toLowerCopy(strings); break; case CUSTOM_13: - this.custom13Like = toUpperCopy(strings); + this.custom13Like = toLowerCopy(strings); break; case CUSTOM_14: - this.custom14Like = toUpperCopy(strings); + this.custom14Like = toLowerCopy(strings); break; case CUSTOM_15: - this.custom15Like = toUpperCopy(strings); + this.custom15Like = toLowerCopy(strings); break; case CUSTOM_16: - this.custom16Like = toUpperCopy(strings); + this.custom16Like = toLowerCopy(strings); break; default: throw new SystemException("Unknown custom field '" + customField + "'"); @@ -1802,52 +1802,52 @@ public class TaskQueryImpl implements TaskQuery { switch (customField) { case CUSTOM_1: - this.custom1NotLike = toUpperCopy(strings); + this.custom1NotLike = toLowerCopy(strings); break; case CUSTOM_2: - this.custom2NotLike = toUpperCopy(strings); + this.custom2NotLike = toLowerCopy(strings); break; case CUSTOM_3: - this.custom3NotLike = toUpperCopy(strings); + this.custom3NotLike = toLowerCopy(strings); break; case CUSTOM_4: - this.custom4NotLike = toUpperCopy(strings); + this.custom4NotLike = toLowerCopy(strings); break; case CUSTOM_5: - this.custom5NotLike = toUpperCopy(strings); + this.custom5NotLike = toLowerCopy(strings); break; case CUSTOM_6: - this.custom6NotLike = toUpperCopy(strings); + this.custom6NotLike = toLowerCopy(strings); break; case CUSTOM_7: - this.custom7NotLike = toUpperCopy(strings); + this.custom7NotLike = toLowerCopy(strings); break; case CUSTOM_8: - this.custom8NotLike = toUpperCopy(strings); + this.custom8NotLike = toLowerCopy(strings); break; case CUSTOM_9: - this.custom9NotLike = toUpperCopy(strings); + this.custom9NotLike = toLowerCopy(strings); break; case CUSTOM_10: - this.custom10NotLike = toUpperCopy(strings); + this.custom10NotLike = toLowerCopy(strings); break; case CUSTOM_11: - this.custom11NotLike = toUpperCopy(strings); + this.custom11NotLike = toLowerCopy(strings); break; case CUSTOM_12: - this.custom12NotLike = toUpperCopy(strings); + this.custom12NotLike = toLowerCopy(strings); break; case CUSTOM_13: - this.custom13NotLike = toUpperCopy(strings); + this.custom13NotLike = toLowerCopy(strings); break; case CUSTOM_14: - this.custom14NotLike = toUpperCopy(strings); + this.custom14NotLike = toLowerCopy(strings); break; case CUSTOM_15: - this.custom15NotLike = toUpperCopy(strings); + this.custom15NotLike = toLowerCopy(strings); break; case CUSTOM_16: - this.custom16NotLike = toUpperCopy(strings); + this.custom16NotLike = toLowerCopy(strings); break; default: throw new SystemException("Unknown custom field '" + customField + "'"); @@ -1882,7 +1882,7 @@ public class TaskQueryImpl implements TaskQuery { @Override public TaskQuery wildcardSearchValueLike(String wildcardSearchValue) { - this.wildcardSearchValueLike = wildcardSearchValue.toUpperCase(); + this.wildcardSearchValueLike = wildcardSearchValue.toLowerCase(); return this; } // endregion diff --git a/lib/taskana-core/src/main/java/pro/taskana/task/internal/TaskQuerySqlProvider.java b/lib/taskana-core/src/main/java/pro/taskana/task/internal/TaskQuerySqlProvider.java index 7dd215c04..6f0599839 100644 --- a/lib/taskana-core/src/main/java/pro/taskana/task/internal/TaskQuerySqlProvider.java +++ b/lib/taskana-core/src/main/java/pro/taskana/task/internal/TaskQuerySqlProvider.java @@ -444,7 +444,7 @@ public class TaskQuerySqlProvider { sb.append( "AND (" + "" - + "UPPER(t.${item}) " + + "LOWER(t.${item}) " + "LIKE #{wildcardSearchValueLike}" + ")" + " "); diff --git a/lib/taskana-core/src/main/java/pro/taskana/workbasket/internal/WorkbasketAccessItemQueryImpl.java b/lib/taskana-core/src/main/java/pro/taskana/workbasket/internal/WorkbasketAccessItemQueryImpl.java index a677eed8a..341b33d87 100644 --- a/lib/taskana-core/src/main/java/pro/taskana/workbasket/internal/WorkbasketAccessItemQueryImpl.java +++ b/lib/taskana-core/src/main/java/pro/taskana/workbasket/internal/WorkbasketAccessItemQueryImpl.java @@ -60,7 +60,7 @@ public class WorkbasketAccessItemQueryImpl implements WorkbasketAccessItemQuery @Override public WorkbasketAccessItemQuery workbasketKeyLike(String... key) { - this.workbasketKeyLike = toUpperCopy(key); + this.workbasketKeyLike = toLowerCopy(key); return this; } @@ -73,7 +73,7 @@ public class WorkbasketAccessItemQueryImpl implements WorkbasketAccessItemQuery @Override public WorkbasketAccessItemQuery accessIdLike(String... ids) { - this.accessIdLike = toUpperCopy(ids); + this.accessIdLike = toLowerCopy(ids); return this; } diff --git a/lib/taskana-core/src/main/java/pro/taskana/workbasket/internal/WorkbasketQueryImpl.java b/lib/taskana-core/src/main/java/pro/taskana/workbasket/internal/WorkbasketQueryImpl.java index 5d5519744..8d8699789 100644 --- a/lib/taskana-core/src/main/java/pro/taskana/workbasket/internal/WorkbasketQueryImpl.java +++ b/lib/taskana-core/src/main/java/pro/taskana/workbasket/internal/WorkbasketQueryImpl.java @@ -82,37 +82,41 @@ public class WorkbasketQueryImpl implements WorkbasketQuery { @Override public WorkbasketQuery idIn(String... id) { - this.idIn = id; + if (id != null && id.length != 0) { + this.idIn = id; + } return this; } @Override public WorkbasketQuery keyIn(String... key) { - this.keyIn = toUpperCopy(key); + if (key != null && key.length != 0) { + this.keyIn = key; + } return this; } @Override public WorkbasketQuery keyLike(String... keys) { - this.keyLike = toUpperCopy(keys); + this.keyLike = toLowerCopy(keys); return this; } @Override public WorkbasketQuery nameIn(String... names) { - this.nameIn = toUpperCopy(names); + this.nameIn = names; return this; } @Override public WorkbasketQuery nameLike(String... names) { - this.nameLike = toUpperCopy(names); + this.nameLike = toLowerCopy(names); return this; } @Override public WorkbasketQuery keyOrNameLike(String... keysOrNames) { - this.keyOrNameLike = toUpperCopy(keysOrNames); + this.keyOrNameLike = toLowerCopy(keysOrNames); return this; } @@ -144,7 +148,7 @@ public class WorkbasketQueryImpl implements WorkbasketQuery { @Override public WorkbasketQuery descriptionLike(String... description) { - this.descriptionLike = toUpperCopy(description); + this.descriptionLike = toLowerCopy(description); return this; } @@ -156,7 +160,7 @@ public class WorkbasketQueryImpl implements WorkbasketQuery { @Override public WorkbasketQuery ownerLike(String... owners) { - this.ownerLike = toUpperCopy(owners); + this.ownerLike = toLowerCopy(owners); return this; } @@ -221,7 +225,7 @@ public class WorkbasketQueryImpl implements WorkbasketQuery { @Override public WorkbasketQuery domainLike(String... domain) { - this.domainLike = domain; + this.domainLike = toLowerCopy(domain); return this; } @@ -278,16 +282,16 @@ public class WorkbasketQueryImpl implements WorkbasketQuery { WorkbasketCustomField customField, String... searchArguments) { switch (customField) { case CUSTOM_1: - custom1Like = toUpperCopy(searchArguments); + custom1Like = toLowerCopy(searchArguments); break; case CUSTOM_2: - custom2Like = toUpperCopy(searchArguments); + custom2Like = toLowerCopy(searchArguments); break; case CUSTOM_3: - custom3Like = toUpperCopy(searchArguments); + custom3Like = toLowerCopy(searchArguments); break; case CUSTOM_4: - custom4Like = toUpperCopy(searchArguments); + custom4Like = toLowerCopy(searchArguments); break; default: throw new SystemException("Unknown customField '" + customField + "'"); @@ -303,7 +307,7 @@ public class WorkbasketQueryImpl implements WorkbasketQuery { @Override public WorkbasketQuery orgLevel1Like(String... orgLevel1) { - this.orgLevel1Like = toUpperCopy(orgLevel1); + this.orgLevel1Like = toLowerCopy(orgLevel1); return this; } @@ -315,7 +319,7 @@ public class WorkbasketQueryImpl implements WorkbasketQuery { @Override public WorkbasketQuery orgLevel2Like(String... orgLevel2) { - this.orgLevel2Like = toUpperCopy(orgLevel2); + this.orgLevel2Like = toLowerCopy(orgLevel2); return this; } @@ -327,7 +331,7 @@ public class WorkbasketQueryImpl implements WorkbasketQuery { @Override public WorkbasketQuery orgLevel3Like(String... orgLevel3) { - this.orgLevel3Like = toUpperCopy(orgLevel3); + this.orgLevel3Like = toLowerCopy(orgLevel3); return this; } @@ -339,7 +343,7 @@ public class WorkbasketQueryImpl implements WorkbasketQuery { @Override public WorkbasketQuery orgLevel4Like(String... orgLevel4) { - this.orgLevel4Like = toUpperCopy(orgLevel4); + this.orgLevel4Like = toLowerCopy(orgLevel4); return this; } diff --git a/lib/taskana-core/src/main/java/pro/taskana/workbasket/internal/WorkbasketQueryMapper.java b/lib/taskana-core/src/main/java/pro/taskana/workbasket/internal/WorkbasketQueryMapper.java index dfc468b70..e9addd1a7 100644 --- a/lib/taskana-core/src/main/java/pro/taskana/workbasket/internal/WorkbasketQueryMapper.java +++ b/lib/taskana-core/src/main/java/pro/taskana/workbasket/internal/WorkbasketQueryMapper.java @@ -36,35 +36,35 @@ public interface WorkbasketQueryMapper { + " " + " 1=1 " + "AND w.OWNER IN(#{item}) " - + "AND (UPPER(w.OWNER) LIKE #{item}) " + + "AND (LOWER(w.OWNER) LIKE #{item}) " + "AND w.ID IN(#{item}) " - + "AND UPPER(w.KEY) IN(#{item}) " - + "AND (UPPER(w.KEY) LIKE #{item}) " - + "AND UPPER(w.NAME) IN(#{item}) " - + "AND (UPPER(w.NAME) LIKE #{item}) " - + "AND (UPPER(w.NAME) LIKE #{item} OR UPPER(w.KEY) LIKE #{item}) " + + "AND w.KEY IN(#{item}) " + + "AND (LOWER(w.KEY) LIKE #{item}) " + + "AND w.NAME IN(#{item}) " + + "AND (LOWER(w.NAME) LIKE #{item}) " + + "AND (LOWER(w.NAME) LIKE #{item} OR LOWER(w.KEY) LIKE #{item}) " + "AND w.DOMAIN IN(#{item}) " - + "AND (UPPER(w.DOMAIN) LIKE #{item}) " + + "AND (LOWER(w.DOMAIN) LIKE #{item}) " + "AND w.TYPE IN(#{item}) " + " AND ( ( w.CREATED >= #{item.begin} AND w.CREATED <=#{item.end} )) " + " AND ( ( w.MODIFIED >= #{item.begin} AND w.MODIFIED <=#{item.end} )) " - + "AND (UPPER(w.DESCRIPTION) LIKE #{item}) " + + "AND (LOWER(w.DESCRIPTION) LIKE #{item}) " + "AND w.CUSTOM_1 IN(#{item}) " - + "AND (UPPER(w.CUSTOM_1) LIKE #{item}) " + + "AND (LOWER(w.CUSTOM_1) LIKE #{item}) " + "AND w.CUSTOM_2 IN(#{item}) " - + "AND (UPPER(w.CUSTOM_2) LIKE #{item}) " + + "AND (LOWER(w.CUSTOM_2) LIKE #{item}) " + "AND w.CUSTOM_3 IN(#{item}) " - + "AND (UPPER(w.CUSTOM_3) LIKE #{item}) " + + "AND (LOWER(w.CUSTOM_3) LIKE #{item}) " + "AND w.CUSTOM_4 IN(#{item}) " - + "AND (UPPER(w.CUSTOM_4) LIKE #{item}) " + + "AND (LOWER(w.CUSTOM_4) LIKE #{item}) " + "AND w.ORG_LEVEL_1 IN(#{item}) " - + "AND (UPPER(w.ORG_LEVEL_1) LIKE #{item}) " + + "AND (LOWER(w.ORG_LEVEL_1) LIKE #{item}) " + "AND w.ORG_LEVEL_2 IN(#{item}) " - + "AND (UPPER(w.ORG_LEVEL_2) LIKE #{item}) " + + "AND (LOWER(w.ORG_LEVEL_2) LIKE #{item}) " + "AND w.ORG_LEVEL_3 IN(#{item}) " - + "AND (UPPER(w.ORG_LEVEL_3) LIKE #{item}) " + + "AND (LOWER(w.ORG_LEVEL_3) LIKE #{item}) " + "AND w.ORG_LEVEL_4 IN(#{item}) " - + "AND (UPPER(w.ORG_LEVEL_4) LIKE #{item}) " + + "AND (LOWER(w.ORG_LEVEL_4) LIKE #{item}) " + " " + " " + "AND (a.MAX_READ = 1 " @@ -124,7 +124,7 @@ public interface WorkbasketQueryMapper { + "AND WBA.ID IN(#{item}) " + "AND WORKBASKET_ID IN(#{item}) " + "AND WB.KEY IN(#{item}) " - + "AND (UPPER(WB.KEY) LIKE #{item}) " + + "AND (LOWER(WB.KEY) LIKE #{item}) " + "AND ACCESS_ID IN(#{item}) " + "" + "ORDER BY ${orderItem} " @@ -178,35 +178,35 @@ public interface WorkbasketQueryMapper { + " " + " 1=1 " + "AND w.OWNER IN(#{item}) " - + "AND (UPPER(w.OWNER) LIKE #{item}) " + + "AND (LOWER(w.OWNER) LIKE #{item}) " + "AND w.ID IN(#{item}) " - + "AND UPPER(w.KEY) IN(#{item}) " - + "AND (UPPER(w.KEY) LIKE #{item}) " - + "AND UPPER(w.NAME) IN(#{item}) " - + "AND (UPPER(w.NAME) LIKE #{item}) " - + "AND (UPPER(w.NAME) LIKE #{item} OR UPPER(w.KEY) LIKE #{item}) " + + "AND LOWER(w.KEY) IN(#{item}) " + + "AND (LOWER(w.KEY) LIKE #{item}) " + + "AND LOWER(w.NAME) IN(#{item}) " + + "AND (LOWER(w.NAME) LIKE #{item}) " + + "AND (LOWER(w.NAME) LIKE #{item} OR LOWER(w.KEY) LIKE #{item}) " + "AND w.DOMAIN IN(#{item}) " - + "AND (UPPER(w.DOMAIN) LIKE #{item}) " + + "AND (LOWER(w.DOMAIN) LIKE #{item}) " + "AND w.TYPE IN(#{item}) " + " AND ( ( w.CREATED >= #{item.begin} AND w.CREATED <=#{item.end} )) " + " AND ( ( w.MODIFIED >= #{item.begin} AND w.MODIFIED <=#{item.end} )) " - + "AND (UPPER(w.DESCRIPTION) LIKE #{item}) " - + "AND UPPER(w.CUSTOM_1) IN(#{item}) " - + "AND (UPPER(w.CUSTOM_1) LIKE #{item}) " - + "AND UPPER(w.CUSTOM_2) IN(#{item}) " - + "AND (UPPER(w.CUSTOM_2) LIKE #{item}) " - + "AND UPPER(w.CUSTOM_3) IN(#{item}) " - + "AND (UPPER(w.CUSTOM_3) LIKE #{item}) " - + "AND UPPER(w.CUSTOM_4) IN(#{item}) " - + "AND (UPPER(w.CUSTOM_4) LIKE #{item}) " - + "AND UPPER(w.ORG_LEVEL_1) IN(#{item}) " - + "AND (UPPER(w.ORG_LEVEL_1) LIKE #{item}) " - + "AND UPPER(w.ORG_LEVEL_2) IN(#{item}) " - + "AND (UPPER(w.ORG_LEVEL_2) LIKE #{item}) " - + "AND UPPER(w.ORG_LEVEL_3) IN(#{item}) " - + "AND (UPPER(w.ORG_LEVEL_3) LIKE #{item}) " - + "AND UPPER(w.ORG_LEVEL_4) IN(#{item}) " - + "AND (UPPER(w.ORG_LEVEL_4) LIKE #{item}) " + + "AND (LOWER(w.DESCRIPTION) LIKE #{item}) " + + "AND LOWER(w.CUSTOM_1) IN(#{item}) " + + "AND (LOWER(w.CUSTOM_1) LIKE #{item}) " + + "AND LOWER(w.CUSTOM_2) IN(#{item}) " + + "AND (LOWER(w.CUSTOM_2) LIKE #{item}) " + + "AND LOWER(w.CUSTOM_3) IN(#{item}) " + + "AND (LOWER(w.CUSTOM_3) LIKE #{item}) " + + "AND LOWER(w.CUSTOM_4) IN(#{item}) " + + "AND (LOWER(w.CUSTOM_4) LIKE #{item}) " + + "AND LOWER(w.ORG_LEVEL_1) IN(#{item}) " + + "AND (LOWER(w.ORG_LEVEL_1) LIKE #{item}) " + + "AND LOWER(w.ORG_LEVEL_2) IN(#{item}) " + + "AND (LOWER(w.ORG_LEVEL_2) LIKE #{item}) " + + "AND LOWER(w.ORG_LEVEL_3) IN(#{item}) " + + "AND (LOWER(w.ORG_LEVEL_3) LIKE #{item}) " + + "AND LOWER(w.ORG_LEVEL_4) IN(#{item}) " + + "AND (LOWER(w.ORG_LEVEL_4) LIKE #{item}) " + " " + " " + "AND (a.MAX_READ = 1 " @@ -273,34 +273,34 @@ public interface WorkbasketQueryMapper { + "" + "1=1 " + "AND w.OWNER IN(#{item}) " - + "AND (UPPER(w.OWNER) LIKE #{item}) " + + "AND (LOWER(w.OWNER) LIKE #{item}) " + "AND w.ID IN(#{item}) " - + "AND UPPER(w.KEY) IN(#{item}) " - + "AND (UPPER(w.KEY) LIKE #{item}) " - + "AND UPPER(w.NAME) IN(#{item}) " - + "AND (UPPER(w.NAME) LIKE #{item}) " - + "AND (UPPER(w.NAME) LIKE #{item} OR UPPER(w.KEY) LIKE #{item}) " + + "AND LOWER(w.KEY) IN(#{item}) " + + "AND (LOWER(w.KEY) LIKE #{item}) " + + "AND LOWER(w.NAME) IN(#{item}) " + + "AND (LOWER(w.NAME) LIKE #{item}) " + + "AND (LOWER(w.NAME) LIKE #{item} OR LOWER(w.KEY) LIKE #{item}) " + "AND w.DOMAIN IN(#{item}) " - + "AND (UPPER(w.DOMAIN) LIKE #{item}) " + + "AND (LOWER(w.DOMAIN) LIKE #{item}) " + "AND w.TYPE IN(#{item}) " + " AND ( ( w.CREATED >= #{item.begin} AND w.CREATED <=#{item.end} )) " + " AND ( ( w.MODIFIED >= #{item.begin} AND w.MODIFIED <=#{item.end} )) " - + "AND (UPPER(w.DESCRIPTION) LIKE #{item}) " + + "AND (LOWER(w.DESCRIPTION) LIKE #{item}) " + "AND w.CUSTOM_1 IN(#{item}) " - + "AND (UPPER(w.CUSTOM_1) LIKE #{item}) " + + "AND (LOWER(w.CUSTOM_1) LIKE #{item}) " + "AND w.CUSTOM_2 IN(#{item}) " + "AND w.CUSTOM_3 IN(#{item}) " - + "AND (UPPER(w.CUSTOM_3) LIKE #{item}) " + + "AND (LOWER(w.CUSTOM_3) LIKE #{item}) " + "AND w.CUSTOM_4 IN(#{item}) " - + "AND (UPPER(w.CUSTOM_4) LIKE #{item}) " + + "AND (LOWER(w.CUSTOM_4) LIKE #{item}) " + "AND w.ORG_LEVEL_1 IN(#{item}) " - + "AND (UPPER(w.ORG_LEVEL_1) LIKE #{item}) " + + "AND (LOWER(w.ORG_LEVEL_1) LIKE #{item}) " + "AND w.ORG_LEVEL_2 IN(#{item}) " - + "AND (UPPER(w.ORG_LEVEL_2) LIKE #{item}) " + + "AND (LOWER(w.ORG_LEVEL_2) LIKE #{item}) " + "AND w.ORG_LEVEL_3 IN(#{item}) " - + "AND (UPPER(w.ORG_LEVEL_3) LIKE #{item}) " + + "AND (LOWER(w.ORG_LEVEL_3) LIKE #{item}) " + "AND w.ORG_LEVEL_4 IN(#{item}) " - + "AND (UPPER(w.ORG_LEVEL_4) LIKE #{item}) " + + "AND (LOWER(w.ORG_LEVEL_4) LIKE #{item}) " + "AND w.MARKED_FOR_DELETION = #{markedForDeletion} " + " " + " " @@ -350,7 +350,7 @@ public interface WorkbasketQueryMapper { + "AND ID IN(#{item}) " + "AND WORKBASKET_ID IN(#{item}) " + "AND WB.KEY IN(#{item}) " - + "AND (UPPER(WB.KEY) LIKE #{item}) " + + "AND (LOWER(WB.KEY) LIKE #{item}) " + "AND ACCESS_ID IN(#{item}) " + "" + "ORDER BY ${orderItem} " diff --git a/lib/taskana-core/src/test/java/acceptance/jobs/WorkbasketCleanupJobAccTest.java b/lib/taskana-core/src/test/java/acceptance/jobs/WorkbasketCleanupJobAccTest.java index e3cbc15fb..0ce3f030b 100644 --- a/lib/taskana-core/src/test/java/acceptance/jobs/WorkbasketCleanupJobAccTest.java +++ b/lib/taskana-core/src/test/java/acceptance/jobs/WorkbasketCleanupJobAccTest.java @@ -37,7 +37,7 @@ class WorkbasketCleanupJobAccTest extends AbstractAccTest { @Test void shouldCleanWorkbasketMarkedForDeletionWithoutTasks() throws Exception { long totalWorkbasketCount = workbasketService.createWorkbasketQuery().count(); - assertThat(totalWorkbasketCount).isEqualTo(25); + assertThat(totalWorkbasketCount).isEqualTo(26); List workbaskets = workbasketService .createWorkbasketQuery() @@ -61,14 +61,14 @@ class WorkbasketCleanupJobAccTest extends AbstractAccTest { workbasketCleanupJob.run(); totalWorkbasketCount = workbasketService.createWorkbasketQuery().count(); - assertThat(totalWorkbasketCount).isEqualTo(24); + assertThat(totalWorkbasketCount).isEqualTo(25); } @WithAccessId(user = "admin") @Test void shouldNotCleanWorkbasketMarkedForDeletionIfWorkbasketHasTasks() throws Exception { long totalWorkbasketCount = workbasketService.createWorkbasketQuery().count(); - assertThat(totalWorkbasketCount).isEqualTo(25); + assertThat(totalWorkbasketCount).isEqualTo(26); List workbaskets = workbasketService .createWorkbasketQuery() @@ -85,7 +85,7 @@ class WorkbasketCleanupJobAccTest extends AbstractAccTest { job.run(); totalWorkbasketCount = workbasketService.createWorkbasketQuery().count(); - assertThat(totalWorkbasketCount).isEqualTo(25); + assertThat(totalWorkbasketCount).isEqualTo(26); } @WithAccessId(user = "admin") diff --git a/lib/taskana-core/src/test/java/acceptance/workbasket/QueryWorkbasketAccTest.java b/lib/taskana-core/src/test/java/acceptance/workbasket/QueryWorkbasketAccTest.java index 79ab2f2da..57c862b6d 100644 --- a/lib/taskana-core/src/test/java/acceptance/workbasket/QueryWorkbasketAccTest.java +++ b/lib/taskana-core/src/test/java/acceptance/workbasket/QueryWorkbasketAccTest.java @@ -49,7 +49,7 @@ class QueryWorkbasketAccTest extends AbstractAccTest { void testQueryAllForBusinessAdminMultipleTimes() { WorkbasketQuery query = WORKBASKET_SERVICE.createWorkbasketQuery(); int count = (int) query.count(); - assertThat(count).isEqualTo(25); + assertThat(count).isEqualTo(26); List workbaskets = query.list(); assertThat(workbaskets).hasSize(count); workbaskets = query.list(); @@ -61,7 +61,7 @@ class QueryWorkbasketAccTest extends AbstractAccTest { void testQueryAllForAdminMultipleTimes() { WorkbasketQuery query = WORKBASKET_SERVICE.createWorkbasketQuery(); int count = (int) query.count(); - assertThat(count).isEqualTo(25); + assertThat(count).isEqualTo(26); List workbaskets = query.list(); assertThat(workbaskets).hasSize(count); workbaskets = query.list(); @@ -106,7 +106,7 @@ class QueryWorkbasketAccTest extends AbstractAccTest { @WithAccessId(user = "teamlead-1", groups = GROUP_1_DN) @Test - void testQueryWorkbasketByName() { + void should_ReturnWorkbasketsMatchingName_When_QueriedWithNameIn() { List results = WORKBASKET_SERVICE.createWorkbasketQuery().nameIn("Gruppenpostkorb KSC").list(); assertThat(results) @@ -116,6 +116,18 @@ class QueryWorkbasketAccTest extends AbstractAccTest { .isEqualTo("GPK_KSC"); } + @WithAccessId(user = "admin", groups = GROUP_1_DN) + @Test + void should_ReturnWorkbasketsMatchingName_When_QueriedWithNameLikeWithEszett() { + List results = + WORKBASKET_SERVICE.createWorkbasketQuery().nameLike("%ß%").list(); + assertThat(results) + .hasSize(1) + .first() + .extracting(WorkbasketSummary::getKey) + .isEqualTo("MASSNAHMEN"); + } + @WithAccessId(user = "teamlead-1", groups = GROUP_1_DN) @Test void testQueryWorkbasketByNameStartsWith() { @@ -190,7 +202,7 @@ class QueryWorkbasketAccTest extends AbstractAccTest { List results = WORKBASKET_SERVICE .createWorkbasketQuery() - .keyIn("GPK_KSC_1", "GPK_Ksc", "GPK_KSC_3") + .keyIn("GPK_KSC_1", "GPK_KSC", "GPK_KSC_3") .list(); assertThat(results).hasSize(2); } @@ -297,7 +309,7 @@ class QueryWorkbasketAccTest extends AbstractAccTest { List results = WORKBASKET_SERVICE.createWorkbasketQuery().nameLike("%").orderByName(DESCENDING).list(); assertThat(results) - .hasSize(25) + .hasSize(26) .extracting(WorkbasketSummary::getName) .isSortedAccordingTo(CASE_INSENSITIVE_ORDER.reversed()); @@ -449,7 +461,7 @@ class QueryWorkbasketAccTest extends AbstractAccTest { void testQueryForOrgLevl1In() { List results = WORKBASKET_SERVICE.createWorkbasketQuery().orgLevel1In("orgl1", "").list(); - assertThat(results).hasSize(24); + assertThat(results).hasSize(25); } @WithAccessId(user = "admin") @@ -505,7 +517,7 @@ class QueryWorkbasketAccTest extends AbstractAccTest { void testQueryForOrgLevel4Like() { List results = WORKBASKET_SERVICE.createWorkbasketQuery().orgLevel4Like("%").list(); - assertThat(results).hasSize(25); + assertThat(results).hasSize(26); } @WithAccessId(user = "admin") diff --git a/lib/taskana-core/src/test/java/acceptance/workbasket/QueryWorkbasketByPermissionAccTest.java b/lib/taskana-core/src/test/java/acceptance/workbasket/QueryWorkbasketByPermissionAccTest.java index 242c7b7ae..4b9b33e30 100644 --- a/lib/taskana-core/src/test/java/acceptance/workbasket/QueryWorkbasketByPermissionAccTest.java +++ b/lib/taskana-core/src/test/java/acceptance/workbasket/QueryWorkbasketByPermissionAccTest.java @@ -157,6 +157,6 @@ class QueryWorkbasketByPermissionAccTest extends AbstractAccTest { .createWorkbasketQuery() .callerHasPermission(WorkbasketPermission.OPEN) .list(); - assertThat(results).hasSize(25); + assertThat(results).hasSize(26); } } diff --git a/lib/taskana-core/src/test/java/acceptance/workbasket/WorkbasketQueryAccTest.java b/lib/taskana-core/src/test/java/acceptance/workbasket/WorkbasketQueryAccTest.java index 59552a503..79ce829d6 100644 --- a/lib/taskana-core/src/test/java/acceptance/workbasket/WorkbasketQueryAccTest.java +++ b/lib/taskana-core/src/test/java/acceptance/workbasket/WorkbasketQueryAccTest.java @@ -67,7 +67,7 @@ class WorkbasketQueryAccTest extends AbstractAccTest { WorkbasketService workbasketService = taskanaEngine.getWorkbasketService(); List results = workbasketService.createWorkbasketQuery().nameLike("%").list(); - assertThat(results).hasSize(25); + assertThat(results).hasSize(26); results = workbasketService @@ -86,7 +86,7 @@ class WorkbasketQueryAccTest extends AbstractAccTest { WorkbasketService workbasketService = taskanaEngine.getWorkbasketService(); List results = workbasketService.createWorkbasketQuery().nameLike("%").list(); - assertThat(results).hasSize(25); + assertThat(results).hasSize(26); results = workbasketService