Skip to content

Commit

Permalink
Add more query options with like and like ignore case for case and pr…
Browse files Browse the repository at this point in the history
…ocess instances
  • Loading branch information
tijsrademakers committed Jun 21, 2024
1 parent 78674a9 commit e90e987
Show file tree
Hide file tree
Showing 35 changed files with 2,912 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,16 @@ public interface HistoricCaseInstanceQuery extends Query<HistoricCaseInstanceQue
* Only select historic case instances with the given business key.
*/
HistoricCaseInstanceQuery caseInstanceBusinessKey(String caseInstanceBusinessKey);

/**
* Only select historic case instances with a business key like the given value.
*/
HistoricCaseInstanceQuery caseInstanceBusinessKeyLike(String caseInstanceBusinessKeyLike);

/**
* Only select historic case instances with a business key like the given value, ignoring upper/lower case.
*/
HistoricCaseInstanceQuery caseInstanceBusinessKeyLikeIgnoreCase(String caseInstanceBusinessKeyLikeIgnoreCase);

/**
* Only select historic case instances with the given case instance root scope id.
Expand All @@ -76,6 +86,16 @@ public interface HistoricCaseInstanceQuery extends Query<HistoricCaseInstanceQue
*/
HistoricCaseInstanceQuery caseInstanceBusinessStatus(String caseInstanceBusinessStatus);

/**
* Only select historic case instances with a business status like the given value.
*/
HistoricCaseInstanceQuery caseInstanceBusinessStatusLike(String caseInstanceBusinessStatusLike);

/**
* Only select historic case instances with a business status like the given value, ignoring upper/lower case.
*/
HistoricCaseInstanceQuery caseInstanceBusinessStatusLikeIgnoreCase(String caseInstanceBusinessStatusLikeIgnoreCase);

/**
* Only select historic case instances with the parent identifier.
*/
Expand All @@ -91,6 +111,16 @@ public interface HistoricCaseInstanceQuery extends Query<HistoricCaseInstanceQue
*/
HistoricCaseInstanceQuery caseDefinitionKey(String caseDefinitionKey);

/**
* Only select historic case instances with a definition key like the given value.
*/
HistoricCaseInstanceQuery caseDefinitionKeyLike(String caseDefinitionKeyLike);

/**
* Only select historic case instances with a definition key like the given value, ignoring upper/lower case.
*/
HistoricCaseInstanceQuery caseDefinitionKeyLikeIgnoreCase(String caseDefinitionKeyLikeIgnoreCase);

/**
* Only select historic case instances with the given keys.
*/
Expand All @@ -111,11 +141,31 @@ public interface HistoricCaseInstanceQuery extends Query<HistoricCaseInstanceQue
*/
HistoricCaseInstanceQuery caseDefinitionCategory(String caseDefinitionCategory);

/**
* Only select historic case instances with a case definition category like the given value.
*/
HistoricCaseInstanceQuery caseDefinitionCategoryLike(String caseDefinitionCategoryLike);

/**
* Only select historic case instances with a case definition category like the given value, ignoring upper/lower case.
*/
HistoricCaseInstanceQuery caseDefinitionCategoryLikeIgnoreCase(String caseDefinitionCategoryLikeIgnoreCase);

/**
* Only select historic case instances with the given case definition name.
*/
HistoricCaseInstanceQuery caseDefinitionName(String caseDefinitionName);

/**
* Only select historic case instances with a case definition name like the given value.
*/
HistoricCaseInstanceQuery caseDefinitionNameLike(String caseDefinitionNameLike);

/**
* Only select historic case instances with a case definition name like the given value, ignoring upper/lower case.
*/
HistoricCaseInstanceQuery caseDefinitionNameLikeIgnoreCase(String caseDefinitionNameLikeIgnoreCase);

/**
* Only select historic case instances with the given case definition version.
*/
Expand Down Expand Up @@ -221,6 +271,16 @@ public interface HistoricCaseInstanceQuery extends Query<HistoricCaseInstanceQue
*/
HistoricCaseInstanceQuery caseInstanceTenantId(String tenantId);

/**
* Only select historic case instances with a tenant identifier like the given value.
*/
HistoricCaseInstanceQuery caseInstanceTenantIdLike(String tenantIdLike);

/**
* Only select historic case instances with a tenant identifier like the given value, ignoring upper/lower case.
*/
HistoricCaseInstanceQuery caseInstanceTenantIdLikeIgnoreCase(String tenantIdLikeIgnoreCase);

/**
* Only select historic case instances that have no tenant identifier.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,17 @@
public interface CaseInstanceQuery extends Query<CaseInstanceQuery, CaseInstance> {

CaseInstanceQuery caseDefinitionKey(String caseDefinitionKey);
CaseInstanceQuery caseDefinitionKeyLike(String caseDefinitionKeyLike);
CaseInstanceQuery caseDefinitionKeyLikeIgnoreCase(String caseDefinitionKeyLikeIgnoreCase);
CaseInstanceQuery caseDefinitionKeys(Set<String> caseDefinitionKeys);
CaseInstanceQuery caseDefinitionId(String caseDefinitionId);
CaseInstanceQuery caseDefinitionIds(Set<String> caseDefinitionIds);
CaseInstanceQuery caseDefinitionCategory(String caseDefinitionCategory);
CaseInstanceQuery caseDefinitionCategoryLike(String caseDefinitionCategoryLike);
CaseInstanceQuery caseDefinitionCategoryLikeIgnoreCase(String caseDefinitionCategoryLikeIgnoreCase);
CaseInstanceQuery caseDefinitionName(String caseDefinitionName);
CaseInstanceQuery caseDefinitionNameLike(String caseDefinitionNameLike);
CaseInstanceQuery caseDefinitionNameLikeIgnoreCase(String caseDefinitionNameLikeIgnoreCase);
CaseInstanceQuery caseDefinitionVersion(Integer caseDefinitionVersion);
CaseInstanceQuery caseInstanceId(String caseInstanceId);
CaseInstanceQuery caseInstanceIds(Set<String> caseInstanceIds);
Expand All @@ -39,7 +45,11 @@ public interface CaseInstanceQuery extends Query<CaseInstanceQuery, CaseInstance
CaseInstanceQuery caseInstanceRootScopeId(String rootScopeId);
CaseInstanceQuery caseInstanceParentScopeId(String parentScopeId);
CaseInstanceQuery caseInstanceBusinessKey(String caseInstanceBusinessKey);
CaseInstanceQuery caseInstanceBusinessKeyLike(String caseInstanceBusinessKeyLike);
CaseInstanceQuery caseInstanceBusinessKeyLikeIgnoreCase(String caseInstanceBusinessKeyLikeIgnoreCase);
CaseInstanceQuery caseInstanceBusinessStatus(String caseInstanceBusinessStatus);
CaseInstanceQuery caseInstanceBusinessStatusLike(String caseInstanceBusinessStatusLike);
CaseInstanceQuery caseInstanceBusinessStatusLikeIgnoreCase(String caseInstanceBusinessStatusLikeIgnoreCase);
CaseInstanceQuery caseInstanceParentId(String parentId);
CaseInstanceQuery caseInstanceStartedBefore(Date beforeTime);
CaseInstanceQuery caseInstanceStartedAfter(Date afterTime);
Expand All @@ -55,6 +65,7 @@ public interface CaseInstanceQuery extends Query<CaseInstanceQuery, CaseInstance
CaseInstanceQuery caseInstanceIsCompleteable();
CaseInstanceQuery caseInstanceTenantId(String tenantId);
CaseInstanceQuery caseInstanceTenantIdLike(String tenantIdLike);
CaseInstanceQuery caseInstanceTenantIdLikeIgnoreCase(String tenantIdLikeIgnoreCase);
CaseInstanceQuery caseInstanceWithoutTenantId();

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,16 @@ protected void populateQueryNode(ObjectNode queryNode, HistoricCaseInstanceQuery

putIfNotNull(queryNode, "caseDefinitionId", query.getCaseDefinitionId());
putIfNotNull(queryNode, "caseDefinitionKey", query.getCaseDefinitionKey());
putIfNotNull(queryNode, "caseDefinitionKeyLike", query.getCaseDefinitionKeyLike());
putIfNotNull(queryNode, "caseDefinitionKeyLikeIgnoreCase", query.getCaseDefinitionKeyLikeIgnoreCase());
putIfNotNullOrEmpty(queryNode, "caseDefinitionKeys", query.getCaseDefinitionKeys());
putIfNotNullOrEmpty(queryNode, "caseDefinitionIds", query.getCaseDefinitionIds());
putIfNotNull(queryNode, "caseDefinitionName", query.getCaseDefinitionName());
putIfNotNull(queryNode, "caseDefinitionNameLike", query.getCaseDefinitionNameLike());
putIfNotNull(queryNode, "caseDefinitionNameLikeIgnoreCase", query.getCaseDefinitionNameLikeIgnoreCase());
putIfNotNull(queryNode, "caseDefinitionCategory", query.getCaseDefinitionCategory());
putIfNotNull(queryNode, "caseDefinitionCategoryLike", query.getCaseDefinitionCategoryLike());
putIfNotNull(queryNode, "caseDefinitionCategoryLikeIgnoreCase", query.getCaseDefinitionCategoryLikeIgnoreCase());
putIfNotNull(queryNode, "caseDefinitionVersion", query.getCaseDefinitionVersion());
putIfNotNull(queryNode, "caseInstanceId", query.getCaseInstanceId());
putIfNotNullOrEmpty(queryNode, "caseInstanceIds", query.getCaseInstanceIds());
Expand All @@ -194,7 +200,11 @@ protected void populateQueryNode(ObjectNode queryNode, HistoricCaseInstanceQuery
putIfNotNull(queryNode, "caseInstanceRootScopeId", query.getRootScopeId());
putIfNotNull(queryNode, "caseInstanceParentScopeId", query.getParentScopeId());
putIfNotNull(queryNode, "businessKey", query.getBusinessKey());
putIfNotNull(queryNode, "businessKeyLike", query.getBusinessKeyLike());
putIfNotNull(queryNode, "businessKeyLikeIgnoreCase", query.getBusinessKeyLikeIgnoreCase());
putIfNotNull(queryNode, "businessStatus", query.getBusinessStatus());
putIfNotNull(queryNode, "businessStatusLike", query.getBusinessStatusLike());
putIfNotNull(queryNode, "businessStatusLikeIgnoreCase", query.getBusinessStatusLikeIgnoreCase());
putIfNotNull(queryNode, "state", query.getState());
putIfNotNull(queryNode, "caseInstanceParentId", query.getCaseInstanceParentId());
putIfTrue(queryNode, "withoutCaseInstanceParentId", query.isWithoutCaseInstanceParentId());
Expand All @@ -216,6 +226,8 @@ protected void populateQueryNode(ObjectNode queryNode, HistoricCaseInstanceQuery
putIfNotNull(queryNode, "referenceId", query.getReferenceId());
putIfNotNull(queryNode, "referenceType", query.getReferenceType());
putIfNotNull(queryNode, "tenantId", query.getTenantId());
putIfNotNull(queryNode, "tenantIdLike", query.getTenantIdLike());
putIfNotNull(queryNode, "tenantIdLikeIgnoreCase", query.getTenantIdLikeIgnoreCase());
putIfTrue(queryNode, "withoutTenantId", query.isWithoutTenantId());
putIfNotNull(queryNode, "activePlanItemDefinitionId", query.getActivePlanItemDefinitionId());
putIfNotNullOrEmpty(queryNode, "activePlanItemDefinitionIds", query.getActivePlanItemDefinitionIds());
Expand Down
Loading

0 comments on commit e90e987

Please sign in to comment.