org.jbpm.services.task.persistence

## Class TaskSummaryQueryCriteriaUtil

- java.lang.Object
- - org.jbpm.query.jpa.impl.QueryCriteriaUtil
  - - org.jbpm.services.task.persistence.AbstractTaskQueryCriteriaUtil
    - - org.jbpm.services.task.persistence.TaskSummaryQueryCriteriaUtil

-     public class TaskSummaryQueryCriteriaUtil
      extends AbstractTaskQueryCriteriaUtil

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static Map<Class,Map<String,javax.persistence.metamodel.Attribute>>` | `criteriaAttributes`
    `static org.slf4j.Logger` | `logger`

    - ### Fields inherited from class org.jbpm.services.task.persistence.AbstractTaskQueryCriteriaUtil

      `persistenceContext`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TaskSummaryQueryCriteriaUtil()`
    `TaskSummaryQueryCriteriaUtil(org.kie.internal.task.api.TaskPersistenceContext persistenceContext)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `List<org.kie.api.task.model.TaskSummary>` | `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)`
    `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()`
    `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, org.jbpm.query.jpa.data.QueryWhere queryWhere)`

    - ### Methods inherited from class org.jbpm.services.task.persistence.AbstractTaskQueryCriteriaUtil

      `closeEntityManager, createQueryAndCallApplyMetaCriteriaAndGetResult, getCriteriaBuilder, getEntityManager, joinTransaction`

    - ### Methods inherited from class org.jbpm.query.jpa.impl.QueryCriteriaUtil

      `addCriteria, addCriteria, applyMetaCriteriaToQuery, basicCreatePredicateFromSingleCriteria, convertListToInterfaceList, convertRegexToJPALikeExpression, defaultGetEntityField, doCriteriaQuery, fillCriteriaQuery, getCriteriaAttributes, getRoot, initialize`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 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

    - #### initializeCriteriaAttributes

          protected boolean initializeCriteriaAttributes()

      Overrides:
        `initializeCriteriaAttributes` in class `AbstractTaskQueryCriteriaUtil`

    - #### 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)

Copyright © 2001–2020 JBoss by Red Hat. All rights reserved.