Skip to content

Commit

Permalink
Add support for OR query filter for PlanItemInstanceQueries (#3922)
Browse files Browse the repository at this point in the history
Co-authored-by: Christopher Welsch <[email protected]>
  • Loading branch information
WelschChristopher and Christopher Welsch committed Aug 28, 2024
1 parent c06a097 commit 97a241d
Show file tree
Hide file tree
Showing 12 changed files with 2,246 additions and 65 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,16 @@ public interface PlanItemInstanceQuery extends Query<PlanItemInstanceQuery, Plan
PlanItemInstanceQuery planItemDefinitionType(String planItemDefinitionType);
PlanItemInstanceQuery planItemDefinitionTypes(List<String> planItemDefinitionType);

/**
* Begin an OR statement. Make sure you invoke the endOr method at the end of your OR statement.
*/
PlanItemInstanceQuery or();

/**
* End an OR statement.
*/
PlanItemInstanceQuery endOr();

/**
* @return The query will only return ended (completed/terminated/occurred/exited) plan item instances.
* No runtime instances will be returned.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,5 +189,11 @@ protected void setSafeInValueLists(PlanItemInstanceQueryImpl planItemInstanceQue
if (planItemInstanceQuery.getInvolvedGroups() != null) {
planItemInstanceQuery.setSafeInvolvedGroups(createSafeInValuesList(planItemInstanceQuery.getInvolvedGroups()));
}

if (planItemInstanceQuery.getOrQueryObjects() != null && !planItemInstanceQuery.getOrQueryObjects().isEmpty()) {
for (PlanItemInstanceQueryImpl oInstanceQuery : planItemInstanceQuery.getOrQueryObjects()) {
setSafeInValueLists(oInstanceQuery);
}
}
}
}
Loading

0 comments on commit 97a241d

Please sign in to comment.