Class TaskSummaryQueryCriteriaUtil

    • Field Detail

      • logger

        public static final org.slf4j.Logger logger
      • criteriaAttributes

        public static final Map<Class,​Map<String,​javax.persistence.metamodel.Attribute>> criteriaAttributes
    • Constructor Detail

      • TaskSummaryQueryCriteriaUtil

        public TaskSummaryQueryCriteriaUtil​(org.kie.internal.task.api.TaskPersistenceContext persistenceContext)
      • TaskSummaryQueryCriteriaUtil

        public TaskSummaryQueryCriteriaUtil()
    • Method Detail

      • doCriteriaQuery

        public List<org.kie.api.task.model.TaskSummary> doCriteriaQuery​(String userId,
                                                                        org.kie.api.task.UserGroupCallback userGroupCallback,
                                                                        org.jbpm.query.jpa.data.QueryWhere queryWhere)
      • getEntityField

        protected <T> javax.persistence.criteria.Expression getEntityField​(javax.persistence.criteria.CriteriaQuery<T> query,
                                                                           String listId,
                                                                           javax.persistence.metamodel.Attribute attr)
        Overrides:
        getEntityField in class org.jbpm.query.jpa.impl.QueryCriteriaUtil
      • taskImplSpecificGetEntityField

        public 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)
      • getJoinedEntityField

        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)
        This retrieves the correct field (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.
        Parameters:
        grandparentJoin - This is the parent join, for example the join between TaskDataImpl -> PeopleAssignments
        parentJoinAttr - 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.
        Returns:
        an Expression that can be used in a predicate with the values/parameters from a QueryCriteria instance
      • implSpecificCreatePredicateFromSingleCriteria

        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)
        Overrides:
        implSpecificCreatePredicateFromSingleCriteria in class AbstractTaskQueryCriteriaUtil
      • getOrderByExpression

        protected <T,​R> javax.persistence.criteria.Expression getOrderByExpression​(javax.persistence.criteria.CriteriaQuery<R> query,
                                                                                         Class<T> queryType,
                                                                                         String orderByListId)
        Overrides:
        getOrderByExpression in class org.jbpm.query.jpa.impl.QueryCriteriaUtil
      • taskSpecificCreatePredicateFromSingleCriteria

        public 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,
                                                                                                                     org.jbpm.query.jpa.data.QueryWhere queryWhere)