Class TaskAuditQueryModificationService
- java.lang.Object
-
- org.jbpm.services.task.audit.service.TaskAuditQueryModificationService
-
- All Implemented Interfaces:
org.jbpm.query.jpa.service.QueryModificationService
public class TaskAuditQueryModificationService extends Object implements org.jbpm.query.jpa.service.QueryModificationService
AQueryModificationService
instace for the jbpm-human-task-audit module
-
-
Constructor Summary
Constructors Constructor Description TaskAuditQueryModificationService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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 intersectingTaskVariableImpl
criteria in order to make sure that the number of (TaskVariableImpl
) subqueries created is minimal.void
optimizeCriteria(org.jbpm.query.jpa.data.QueryWhere queryWhere)
-
-
-
Method Detail
-
accepts
public boolean accepts(String listId)
- Specified by:
accepts
in interfaceorg.jbpm.query.jpa.service.QueryModificationService
-
optimizeCriteria
public void optimizeCriteria(org.jbpm.query.jpa.data.QueryWhere queryWhere)
- Specified by:
optimizeCriteria
in interfaceorg.jbpm.query.jpa.service.QueryModificationService
-
optimizeCriteria
public void optimizeCriteria(List<org.jbpm.query.jpa.data.QueryCriteria> criteriaList)
This method combines multiple intersectingTaskVariableImpl
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 ofQueryCriteria
and if an intersecting group or criteria contains multipleTaskVariableImpl
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.- Parameters:
criteriaList
- The list ofQueryCriteria
to process
-
createPredicate
public <R> javax.persistence.criteria.Predicate createPredicate(org.jbpm.query.jpa.data.QueryCriteria criteria, javax.persistence.criteria.CriteriaQuery<R> query, javax.persistence.criteria.CriteriaBuilder builder)
- Specified by:
createPredicate
in interfaceorg.jbpm.query.jpa.service.QueryModificationService
-
-