public class TaskAuditQueryModificationService extends Object implements org.jbpm.query.jpa.service.QueryModificationService
QueryModificationService instace for the jbpm-human-task-audit module| Constructor and Description |
|---|
TaskAuditQueryModificationService() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accepts(String listId) |
<R> javax.persistence.criteria.Predicate |
createPredicate(org.jbpm.query.jpa.data.QueryCriteria criteria,
javax.persistence.criteria.CriteriaQuery<R> query,
javax.persistence.criteria.CriteriaBuilder builder) |
void |
optimizeCriteria(List<org.jbpm.query.jpa.data.QueryCriteria> criteriaList)
This method combines multiple intersecting
TaskVariableImpl criteria in order
to make sure that the number of (TaskVariableImpl) subqueries created is minimal. |
void |
optimizeCriteria(org.jbpm.query.jpa.data.QueryWhere queryWhere) |
public boolean accepts(String listId)
accepts in interface org.jbpm.query.jpa.service.QueryModificationServicepublic void optimizeCriteria(org.jbpm.query.jpa.data.QueryWhere queryWhere)
optimizeCriteria in interface org.jbpm.query.jpa.service.QueryModificationServicepublic void optimizeCriteria(List<org.jbpm.query.jpa.data.QueryCriteria> criteriaList)
TaskVariableImpl criteria in order
to make sure that the number of (TaskVariableImpl) subqueries created is minimal.
The following logic is applied:
Go through the given list of QueryCriteria and if an intersecting group or criteria
contains multiple TaskVariableImpl criteria, then replace those task variable criteria
with a single "combined" task variable criteria. This is then later processed correctly so as to create
only one subquery.
Obviously, if we run into a group criteria, recurse.
Continue to go through the criteria list until we've reached the end of the list: the loop
might have broken off earlier because it hit a union criteria and stopped to process group of intersecting
task variable criteria that had already been found. With the successive loops, all intersecting groups
containing task variable criteria will have been removed, allowing the last loop to reach the end
of the list.criteriaList - The list of QueryCriteria to processpublic <R> javax.persistence.criteria.Predicate createPredicate(org.jbpm.query.jpa.data.QueryCriteria criteria,
javax.persistence.criteria.CriteriaQuery<R> query,
javax.persistence.criteria.CriteriaBuilder builder)
createPredicate in interface org.jbpm.query.jpa.service.QueryModificationServiceCopyright © 2001–2021 JBoss by Red Hat. All rights reserved.