Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| jBPM :: Distribution 6.2.1-SNAPSHOT
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jbpm.services.task.impl
Class TaskQueryServiceImpl

    java.lang.Object
      org.jbpm.services.task.impl.TaskQueryServiceImpl

All Implemented Interfaces:
  org.kie.internal.task.api.TaskQueryService

    public class TaskQueryServiceImpl

extends Object
implements org.kie.internal.task.api.TaskQueryService

Field Summary
`static Map<String,Class<?>>` | `criteriaFieldClasses` The following fields and methods provide a lookup table for the information needed to create a query based on parameters in the `QueryData`.
`static Map<String,String>` | `criteriaFieldJoinClauses`
`static Map<String,String>` | `criteriaFields`
`static String` | `TASKSUMMARY_FROM`
`static String` | `TASKSUMMARY_SELECT`
`static String` | `TASKSUMMARY_WHERE`

Constructor Summary
`TaskQueryServiceImpl()`
`TaskQueryServiceImpl(org.kie.internal.task.api.TaskPersistenceContext persistenceContext, UserGroupCallback userGroupCallback)`

Method Summary
`static void` | `addJoinTables(StringBuilder queryBuilder, org.kie.internal.query.data.QueryData queryData, boolean addLeftJoinTablesForAllRoles)` Adds the join table clauses ("JOIN" for intersecting parameters and "LEFT JOIN" for union parameters) to the query.
`protected List<?>` | `adoptList(List<?> source, List<?> values)`
`protected void` | `applyQueryContext(Map<String,Object> params, org.kie.internal.query.QueryContext queryContext)`
`protected void` | `applyQueryFilter(Map<String,Object> params, org.kie.internal.query.QueryFilter queryFilter)`
`protected List<TaskSummary>` | `collectTasksByPotentialOwners(List<Object[]> tasksByGroups)`
`int` | `getCompletedTaskByUserId(String userId)`
`int` | `getPendingSubTasksByParent(long parentId)`
`int` | `getPendingTaskByUserId(String userId)`
`Map<Long,List<OrganizationalEntity>>` | `getPotentialOwnersForTaskIds(List<Long> taskIds)`
`List<TaskSummary>` | `getSubTasksAssignedAsPotentialOwner(long parentId, String userId)`
`List<TaskSummary>` | `getSubTasksByParent(long parentId)`
`Task` | `getTaskByWorkItemId(long workItemId)`
`Task` | `getTaskInstanceById(long taskId)`
`List<TaskSummary>` | `getTasksAssignedAsBusinessAdministrator(String userId)`
`List<TaskSummary>` | `getTasksAssignedAsExcludedOwner(String userId)`
`List<TaskSummary>` | `getTasksAssignedAsPotentialOwner(String userId)`
`List<TaskSummary>` | `getTasksAssignedAsPotentialOwner(String userId, List<String> groupIds)`
`List<TaskSummary>` | `getTasksAssignedAsPotentialOwner(String userId, List<String> groupIds, int firstResult, int maxResults)`
`List<TaskSummary>` | `getTasksAssignedAsPotentialOwner(String userId, List<String> groupIds, List<Status> status, org.kie.internal.query.QueryFilter filter)`
`List<TaskSummary>` | `getTasksAssignedAsPotentialOwnerByExpirationDate(String userId, List<Status> status, Date expirationDate)`
`List<TaskSummary>` | `getTasksAssignedAsPotentialOwnerByExpirationDate(String userId, List<String> groupIds, List<Status> status, Date expirationDate)`
`List<TaskSummary>` | `getTasksAssignedAsPotentialOwnerByExpirationDateOptional(String userId, List<Status> status, Date expirationDate)`
`List<TaskSummary>` | `getTasksAssignedAsPotentialOwnerByExpirationDateOptional(String userId, List<String> groupIds, List<Status> status, Date expirationDate)`
`List<TaskSummary>` | `getTasksAssignedAsPotentialOwnerByStatus(String userId, List<Status> status)`
`List<TaskSummary>` | `getTasksAssignedAsPotentialOwnerByStatusByGroup(String userId, List<String> groupIds, List<Status> status)`
`List<TaskSummary>` | `getTasksAssignedAsRecipient(String userId)`
`List<TaskSummary>` | `getTasksAssignedAsTaskInitiator(String userId)`
`List<TaskSummary>` | `getTasksAssignedAsTaskStakeholder(String userId)`
`List<TaskSummary>` | `getTasksAssignedByGroup(String groupId)`
`List<TaskSummary>` | `getTasksAssignedByGroups(List<String> groupIds)`
`List<TaskSummary>` | `getTasksAssignedByGroupsByExpirationDate(List<String> groupIds, Date expirationDate)`
`List<TaskSummary>` | `getTasksAssignedByGroupsByExpirationDateOptional(List<String> groupIds, Date expirationDate)`
`List<Long>` | `getTasksByProcessInstanceId(long processInstanceId)`
`List<TaskSummary>` | `getTasksByStatusByProcessInstanceId(long processInstanceId, List<Status> status)`
`List<TaskSummary>` | `getTasksByStatusByProcessInstanceIdByTaskName(long processInstanceId, List<Status> status, String taskName)`
`List<TaskSummary>` | `getTasksByVariousFields(String userId, List<Long> workItemIds, List<Long> taskIds, List<Long> procInstIds, List<String> busAdmins, List<String> potOwners, List<String> taskOwners, List<Status> status, boolean union, Integer maxResults)` Deprecated.
`List<TaskSummary>` | `getTasksByVariousFields(String userId, Map<String,List<?>> parameters, boolean union)` Deprecated.
`List<TaskSummary>` | `getTasksOwned(String userId)`
`List<TaskSummary>` | `getTasksOwned(String userId, List<Status> status, org.kie.internal.query.QueryFilter filter)`
`List<TaskSummary>` | `getTasksOwnedByExpirationDate(String userId, List<Status> status, Date expirationDate)`
`List<TaskSummary>` | `getTasksOwnedByExpirationDateBeforeSpecifiedDate(String userId, List<Status> status, Date date)`
`List<TaskSummary>` | `getTasksOwnedByExpirationDateOptional(String userId, List<Status> status, Date expirationDate)`
`List<TaskSummary>` | `getTasksOwnedByStatus(String userId, List<Status> status)`
`List<TaskSummary>` | `query(String userId, org.kie.internal.query.data.QueryData queryData)`
`void` | `setPersistenceContext(org.kie.internal.task.api.TaskPersistenceContext persistenceContext)`
`void` | `setUserGroupCallback(UserGroupCallback userGroupCallback)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### criteriaFieldClasses

    public static Map<String,Class<?>> criteriaFieldClasses

  The following fields and methods provide a lookup table for the information needed to create a query based on parameters in the `QueryData`.

### criteriaFields

    public static Map<String,String> criteriaFields

### criteriaFieldJoinClauses

    public static Map<String,String> criteriaFieldJoinClauses

### TASKSUMMARY_SELECT

    public static String TASKSUMMARY_SELECT

### TASKSUMMARY_FROM

    public static String TASKSUMMARY_FROM

### TASKSUMMARY_WHERE

    public static String TASKSUMMARY_WHERE

Constructor Detail

### TaskQueryServiceImpl

    public TaskQueryServiceImpl()

### TaskQueryServiceImpl

    public TaskQueryServiceImpl(org.kie.internal.task.api.TaskPersistenceContext persistenceContext,
                                UserGroupCallback userGroupCallback)

Method Detail

### adoptList

    protected List<?> adoptList(List<?> source,
                                List<?> values)

### applyQueryFilter

    protected void applyQueryFilter(Map<String,Object> params,
                                    org.kie.internal.query.QueryFilter queryFilter)

### applyQueryContext

    protected void applyQueryContext(Map<String,Object> params,
                                     org.kie.internal.query.QueryContext queryContext)

### setPersistenceContext

    public void setPersistenceContext(org.kie.internal.task.api.TaskPersistenceContext persistenceContext)

### setUserGroupCallback

    public void setUserGroupCallback(UserGroupCallback userGroupCallback)

### getTasksAssignedAsBusinessAdministrator

    public List<TaskSummary> getTasksAssignedAsBusinessAdministrator(String userId)

  Specified by:
    `getTasksAssignedAsBusinessAdministrator` in interface `org.kie.internal.task.api.TaskQueryService`

### getTasksAssignedAsExcludedOwner

    public List<TaskSummary> getTasksAssignedAsExcludedOwner(String userId)

  Specified by:
    `getTasksAssignedAsExcludedOwner` in interface `org.kie.internal.task.api.TaskQueryService`

### getTasksAssignedAsPotentialOwner

    public List<TaskSummary> getTasksAssignedAsPotentialOwner(String userId)

### getTasksAssignedAsPotentialOwner

    public List<TaskSummary> getTasksAssignedAsPotentialOwner(String userId,
                                                              List<String> groupIds)

  Specified by:
    `getTasksAssignedAsPotentialOwner` in interface `org.kie.internal.task.api.TaskQueryService`

### getTasksAssignedByGroup

    public List<TaskSummary> getTasksAssignedByGroup(String groupId)

  Specified by:
    `getTasksAssignedByGroup` in interface `org.kie.internal.task.api.TaskQueryService`

### getTasksAssignedByGroupsByExpirationDateOptional

    public List<TaskSummary> getTasksAssignedByGroupsByExpirationDateOptional(List<String> groupIds,
                                                                              Date expirationDate)

  Specified by:
    `getTasksAssignedByGroupsByExpirationDateOptional` in interface `org.kie.internal.task.api.TaskQueryService`

### collectTasksByPotentialOwners

    protected List<TaskSummary> collectTasksByPotentialOwners(List<Object[]> tasksByGroups)

### getTasksAssignedByGroupsByExpirationDate

    public List<TaskSummary> getTasksAssignedByGroupsByExpirationDate(List<String> groupIds,
                                                                      Date expirationDate)

  Specified by:
    `getTasksAssignedByGroupsByExpirationDate` in interface `org.kie.internal.task.api.TaskQueryService`

### getTasksAssignedByGroups

    public List<TaskSummary> getTasksAssignedByGroups(List<String> groupIds)

  Specified by:
    `getTasksAssignedByGroups` in interface `org.kie.internal.task.api.TaskQueryService`

### getPotentialOwnersForTaskIds

    public Map<Long,List<OrganizationalEntity>> getPotentialOwnersForTaskIds(List<Long> taskIds)

  Specified by:
    `getPotentialOwnersForTaskIds` in interface `org.kie.internal.task.api.TaskQueryService`

### getTasksAssignedAsPotentialOwner

    public List<TaskSummary> getTasksAssignedAsPotentialOwner(String userId,
                                                              List<String> groupIds,
                                                              int firstResult,
                                                              int maxResults)

  Specified by:
    `getTasksAssignedAsPotentialOwner` in interface `org.kie.internal.task.api.TaskQueryService`

### getTasksAssignedAsRecipient

    public List<TaskSummary> getTasksAssignedAsRecipient(String userId)

  Specified by:
    `getTasksAssignedAsRecipient` in interface `org.kie.internal.task.api.TaskQueryService`

### getTasksAssignedAsTaskInitiator

    public List<TaskSummary> getTasksAssignedAsTaskInitiator(String userId)

  Specified by:
    `getTasksAssignedAsTaskInitiator` in interface `org.kie.internal.task.api.TaskQueryService`

### getTasksAssignedAsTaskStakeholder

    public List<TaskSummary> getTasksAssignedAsTaskStakeholder(String userId)

  Specified by:
    `getTasksAssignedAsTaskStakeholder` in interface `org.kie.internal.task.api.TaskQueryService`

### getTasksOwned

    public List<TaskSummary> getTasksOwned(String userId)

  Specified by:
    `getTasksOwned` in interface `org.kie.internal.task.api.TaskQueryService`

### getTasksOwnedByStatus

    public List<TaskSummary> getTasksOwnedByStatus(String userId,
                                                   List<Status> status)

  Specified by:
    `getTasksOwnedByStatus` in interface `org.kie.internal.task.api.TaskQueryService`

### getTasksAssignedAsPotentialOwnerByStatus

    public List<TaskSummary> getTasksAssignedAsPotentialOwnerByStatus(String userId,
                                                                      List<Status> status)

  Specified by:
    `getTasksAssignedAsPotentialOwnerByStatus` in interface `org.kie.internal.task.api.TaskQueryService`

### getTasksAssignedAsPotentialOwner

    public List<TaskSummary> getTasksAssignedAsPotentialOwner(String userId,
                                                              List<String> groupIds,
                                                              List<Status> status,
                                                              org.kie.internal.query.QueryFilter filter)

  Specified by:
    `getTasksAssignedAsPotentialOwner` in interface `org.kie.internal.task.api.TaskQueryService`

### getTasksOwned

    public List<TaskSummary> getTasksOwned(String userId,
                                           List<Status> status,
                                           org.kie.internal.query.QueryFilter filter)

  Specified by:
    `getTasksOwned` in interface `org.kie.internal.task.api.TaskQueryService`

### getSubTasksAssignedAsPotentialOwner

    public List<TaskSummary> getSubTasksAssignedAsPotentialOwner(long parentId,
                                                                 String userId)

  Specified by:
    `getSubTasksAssignedAsPotentialOwner` in interface `org.kie.internal.task.api.TaskQueryService`

### getSubTasksByParent

    public List<TaskSummary> getSubTasksByParent(long parentId)

  Specified by:
    `getSubTasksByParent` in interface `org.kie.internal.task.api.TaskQueryService`

### getPendingSubTasksByParent

    public int getPendingSubTasksByParent(long parentId)

  Specified by:
    `getPendingSubTasksByParent` in interface `org.kie.internal.task.api.TaskQueryService`

### getTaskInstanceById

    public Task getTaskInstanceById(long taskId)

  Specified by:
    `getTaskInstanceById` in interface `org.kie.internal.task.api.TaskQueryService`

### getTaskByWorkItemId

    public Task getTaskByWorkItemId(long workItemId)

  Specified by:
    `getTaskByWorkItemId` in interface `org.kie.internal.task.api.TaskQueryService`

### getTasksAssignedAsPotentialOwnerByExpirationDate

    public List<TaskSummary> getTasksAssignedAsPotentialOwnerByExpirationDate(String userId,
                                                                              List<String> groupIds,
                                                                              List<Status> status,
                                                                              Date expirationDate)

  Specified by:
    `getTasksAssignedAsPotentialOwnerByExpirationDate` in interface `org.kie.internal.task.api.TaskQueryService`

### getTasksAssignedAsPotentialOwnerByExpirationDateOptional

    public List<TaskSummary> getTasksAssignedAsPotentialOwnerByExpirationDateOptional(String userId,
                                                                                      List<String> groupIds,
                                                                                      List<Status> status,
                                                                                      Date expirationDate)

  Specified by:
    `getTasksAssignedAsPotentialOwnerByExpirationDateOptional` in interface `org.kie.internal.task.api.TaskQueryService`

### getTasksOwnedByExpirationDate

    public List<TaskSummary> getTasksOwnedByExpirationDate(String userId,
                                                           List<Status> status,
                                                           Date expirationDate)

  Specified by:
    `getTasksOwnedByExpirationDate` in interface `org.kie.internal.task.api.TaskQueryService`

### getTasksOwnedByExpirationDateOptional

    public List<TaskSummary> getTasksOwnedByExpirationDateOptional(String userId,
                                                                   List<Status> status,
                                                                   Date expirationDate)

  Specified by:
    `getTasksOwnedByExpirationDateOptional` in interface `org.kie.internal.task.api.TaskQueryService`

### getTasksOwnedByExpirationDateBeforeSpecifiedDate

    public List<TaskSummary> getTasksOwnedByExpirationDateBeforeSpecifiedDate(String userId,
                                                                              List<Status> status,
                                                                              Date date)

  Specified by:
    `getTasksOwnedByExpirationDateBeforeSpecifiedDate` in interface `org.kie.internal.task.api.TaskQueryService`

### getTasksByStatusByProcessInstanceId

    public List<TaskSummary> getTasksByStatusByProcessInstanceId(long processInstanceId,
                                                                 List<Status> status)

  Specified by:
    `getTasksByStatusByProcessInstanceId` in interface `org.kie.internal.task.api.TaskQueryService`

### getTasksByStatusByProcessInstanceIdByTaskName

    public List<TaskSummary> getTasksByStatusByProcessInstanceIdByTaskName(long processInstanceId,
                                                                           List<Status> status,
                                                                           String taskName)

  Specified by:
    `getTasksByStatusByProcessInstanceIdByTaskName` in interface `org.kie.internal.task.api.TaskQueryService`

### getTasksByProcessInstanceId

    public List<Long> getTasksByProcessInstanceId(long processInstanceId)

  Specified by:
    `getTasksByProcessInstanceId` in interface `org.kie.internal.task.api.TaskQueryService`

### getTasksAssignedAsPotentialOwnerByExpirationDate

    public List<TaskSummary> getTasksAssignedAsPotentialOwnerByExpirationDate(String userId,
                                                                              List<Status> status,
                                                                              Date expirationDate)

  Specified by:
    `getTasksAssignedAsPotentialOwnerByExpirationDate` in interface `org.kie.internal.task.api.TaskQueryService`

### getTasksAssignedAsPotentialOwnerByExpirationDateOptional

    public List<TaskSummary> getTasksAssignedAsPotentialOwnerByExpirationDateOptional(String userId,
                                                                                      List<Status> status,
                                                                                      Date expirationDate)

  Specified by:
    `getTasksAssignedAsPotentialOwnerByExpirationDateOptional` in interface `org.kie.internal.task.api.TaskQueryService`

### getTasksByVariousFields

    @Deprecated
    public List<TaskSummary> getTasksByVariousFields(String userId,
                                                                List<Long> workItemIds,
                                                                List<Long> taskIds,
                                                                List<Long> procInstIds,
                                                                List<String> busAdmins,
                                                                List<String> potOwners,
                                                                List<String> taskOwners,
                                                                List<Status> status,
                                                                boolean union,
                                                                Integer maxResults)

  Deprecated.

### getTasksByVariousFields

    @Deprecated
    public List<TaskSummary> getTasksByVariousFields(String userId,
                                                                Map<String,List<?>> parameters,
                                                                boolean union)

  Deprecated.

  Specified by:
    `getTasksByVariousFields` in interface `org.kie.internal.task.api.TaskQueryService`

### getCompletedTaskByUserId

    public int getCompletedTaskByUserId(String userId)

  Specified by:
    `getCompletedTaskByUserId` in interface `org.kie.internal.task.api.TaskQueryService`

### getPendingTaskByUserId

    public int getPendingTaskByUserId(String userId)

  Specified by:
    `getPendingTaskByUserId` in interface `org.kie.internal.task.api.TaskQueryService`

### getTasksAssignedAsPotentialOwnerByStatusByGroup

    public List<TaskSummary> getTasksAssignedAsPotentialOwnerByStatusByGroup(String userId,
                                                                             List<String> groupIds,
                                                                             List<Status> status)

  Specified by:
    `getTasksAssignedAsPotentialOwnerByStatusByGroup` in interface `org.kie.internal.task.api.TaskQueryService`

### query

    public List<TaskSummary> query(String userId,
                                   org.kie.internal.query.data.QueryData queryData)

  Specified by:
    `query` in interface `org.kie.internal.task.api.TaskQueryService`

### addJoinTables

    public static void addJoinTables(StringBuilder queryBuilder,
                                     org.kie.internal.query.data.QueryData queryData,
                                     boolean addLeftJoinTablesForAllRoles)

  Adds the join table clauses ("JOIN" for intersecting parameters and "LEFT JOIN" for union parameters) to the query.

  Parameters:
    `queryBuilder` - The string representation of the query
    `queryData` - The object containint the parameters to process

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| jBPM :: Distribution 6.2.1-SNAPSHOT
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2015 JBoss by Red Hat. All Rights Reserved.