public class TaskQueryCriteriaUtil
extends org.jbpm.query.jpa.impl.QueryCriteriaUtil
| Modifier and Type | Field and Description |
|---|---|
static Map<Class,Map<String,javax.persistence.metamodel.Attribute>> |
criteriaAttributes |
static org.slf4j.Logger |
logger |
| Modifier | Constructor and Description |
|---|---|
|
TaskQueryCriteriaUtil(JPATaskPersistenceContext persistenceContext) |
protected |
TaskQueryCriteriaUtil(Map<Class,Map<String,javax.persistence.metamodel.Attribute>> criteriaAttributes)
This protected constructor (and the following persistence-related) protected methods are used in the
kie-remote-services module
|
| Modifier and Type | Method and Description |
|---|---|
protected <T> List<T> |
createQueryAndCallApplyMetaCriteriaAndGetResult(org.jbpm.query.jpa.data.QueryWhere queryWhere,
javax.persistence.criteria.CriteriaQuery<T> criteriaQuery,
javax.persistence.criteria.CriteriaBuilder builder) |
List<TaskSummaryImpl> |
doCriteriaQuery(String userId,
org.kie.api.task.UserGroupCallback userGroupCallback,
org.jbpm.query.jpa.data.QueryWhere queryWhere) |
protected javax.persistence.criteria.CriteriaBuilder |
getCriteriaBuilder() |
protected <T> javax.persistence.criteria.Expression |
getEntityField(javax.persistence.criteria.CriteriaQuery<T> query,
String listId,
javax.persistence.metamodel.Attribute attr) |
protected javax.persistence.EntityManager |
getEntityManager() |
static <F,T> javax.persistence.criteria.Expression |
getJoinedEntityField(javax.persistence.criteria.From<?,F> grandparentJoin,
javax.persistence.metamodel.Attribute<?,T> parentJoinAttr,
javax.persistence.metamodel.SingularAttribute fieldAttr)
This retrieves the correct field (
Expression) that should be used when building the Predicate. |
protected <T,R> javax.persistence.criteria.Expression |
getOrderByExpression(javax.persistence.criteria.CriteriaQuery<R> query,
Class<T> queryType,
String orderByListId) |
protected <R,T> javax.persistence.criteria.Predicate |
implSpecificCreatePredicateFromSingleCriteria(javax.persistence.criteria.CriteriaQuery<R> query,
javax.persistence.criteria.CriteriaBuilder builder,
Class queryType,
org.jbpm.query.jpa.data.QueryCriteria criteria,
org.jbpm.query.jpa.data.QueryWhere queryWhere) |
protected boolean |
initializeCriteriaAttributes() |
protected void |
joinTransaction() |
static <T> javax.persistence.criteria.Expression |
taskImplSpecificGetEntityField(javax.persistence.criteria.CriteriaQuery<T> query,
javax.persistence.criteria.Root<TaskImpl> taskRoot,
javax.persistence.criteria.Join<TaskImpl,TaskDataImpl> taskDataJoin,
javax.persistence.criteria.Join<TaskImpl,PeopleAssignmentsImpl> peopleAssignJoin,
String listId,
javax.persistence.metamodel.Attribute attr) |
static <Q,T> javax.persistence.criteria.Predicate |
taskSpecificCreatePredicateFromSingleCriteria(javax.persistence.criteria.CriteriaQuery<Q> query,
javax.persistence.criteria.CriteriaBuilder builder,
org.jbpm.query.jpa.data.QueryCriteria criteria) |
addCriteria, addCriteria, applyMetaCriteriaToQuery, basicCreatePredicateFromSingleCriteria, convertListToInterfaceList, convertRegexToJPALikeExpression, defaultGetEntityField, doCriteriaQuery, fillCriteriaQuery, getCriteriaAttributes, getRootpublic TaskQueryCriteriaUtil(JPATaskPersistenceContext persistenceContext)
protected boolean initializeCriteriaAttributes()
initializeCriteriaAttributes in class org.jbpm.query.jpa.impl.QueryCriteriaUtilprotected javax.persistence.EntityManager getEntityManager()
protected void joinTransaction()
protected javax.persistence.criteria.CriteriaBuilder getCriteriaBuilder()
getCriteriaBuilder in class org.jbpm.query.jpa.impl.QueryCriteriaUtilpublic List<TaskSummaryImpl> doCriteriaQuery(String userId, org.kie.api.task.UserGroupCallback userGroupCallback, org.jbpm.query.jpa.data.QueryWhere queryWhere)
protected <T> javax.persistence.criteria.Expression getEntityField(javax.persistence.criteria.CriteriaQuery<T> query,
String listId,
javax.persistence.metamodel.Attribute attr)
getEntityField in class org.jbpm.query.jpa.impl.QueryCriteriaUtilpublic static <T> javax.persistence.criteria.Expression taskImplSpecificGetEntityField(javax.persistence.criteria.CriteriaQuery<T> query,
javax.persistence.criteria.Root<TaskImpl> taskRoot,
javax.persistence.criteria.Join<TaskImpl,TaskDataImpl> taskDataJoin,
javax.persistence.criteria.Join<TaskImpl,PeopleAssignmentsImpl> peopleAssignJoin,
String listId,
javax.persistence.metamodel.Attribute attr)
public static <F,T> javax.persistence.criteria.Expression getJoinedEntityField(javax.persistence.criteria.From<?,F> grandparentJoin,
javax.persistence.metamodel.Attribute<?,T> parentJoinAttr,
javax.persistence.metamodel.SingularAttribute fieldAttr)
Expression) that should be used when building the Predicate.
This field is necessary because of the amount of joins and the complexity in the human-task schema.grandparentJoin - This is the parent join,
for example the join between TaskDataImpl -> PeopleAssignmentsparentJoinAttr - This is the Attribute with the information over the join (from the parent) that we need to create,
for example the SingularAttribute<PeopleAssignmentsImpl, OrganizationalEntityImpl> Attribute.fieldAttr - This is the Attribute with the actual attribute that we create an Expression to build a Predicate for,
for example the OrganizationalEntityImpl_.id field.Expression that can be used in a predicate with the values/parameters from a QueryCriteria instanceprotected <R,T> javax.persistence.criteria.Predicate implSpecificCreatePredicateFromSingleCriteria(javax.persistence.criteria.CriteriaQuery<R> query,
javax.persistence.criteria.CriteriaBuilder builder,
Class queryType,
org.jbpm.query.jpa.data.QueryCriteria criteria,
org.jbpm.query.jpa.data.QueryWhere queryWhere)
implSpecificCreatePredicateFromSingleCriteria in class org.jbpm.query.jpa.impl.QueryCriteriaUtilpublic static <Q,T> javax.persistence.criteria.Predicate taskSpecificCreatePredicateFromSingleCriteria(javax.persistence.criteria.CriteriaQuery<Q> query,
javax.persistence.criteria.CriteriaBuilder builder,
org.jbpm.query.jpa.data.QueryCriteria criteria)
protected <T> List<T> createQueryAndCallApplyMetaCriteriaAndGetResult(org.jbpm.query.jpa.data.QueryWhere queryWhere, javax.persistence.criteria.CriteriaQuery<T> criteriaQuery, javax.persistence.criteria.CriteriaBuilder builder)
createQueryAndCallApplyMetaCriteriaAndGetResult in class org.jbpm.query.jpa.impl.QueryCriteriaUtilCopyright © 2001–2015 JBoss by Red Hat. All rights reserved.