org.jbpm.api
Interface TaskQuery


public interface TaskQuery

query for tasks.

Author:
Tom Baeyens, Heiko Braun

Field Summary
static java.lang.String PROPERTY_ASSIGNEE
          assignee property to be used as property in orderAsc(String) and orderDesc(String)
static java.lang.String PROPERTY_CREATEDATE
          createdate property to be used as property in orderAsc(String) and orderDesc(String)
static java.lang.String PROPERTY_DUEDATE
          duedate property to be used as property in orderAsc(String) and orderDesc(String)
static java.lang.String PROPERTY_NAME
          name property to be used as property in orderAsc(String) and orderDesc(String)
static java.lang.String PROPERTY_PRIORITY
          priority property to be used as property in orderAsc(String) and orderDesc(String)
static java.lang.String PROPERTY_PROGRESS
          progress property to be used as property in orderAsc(String) and orderDesc(String)
 
Method Summary
 TaskQuery activityName(java.lang.String activityName)
          only select tasks that are associated to the given activity name.
 TaskQuery assignee(java.lang.String userId)
          only select tasks for which the given user is the assignee
 TaskQuery candidate(java.lang.String userId)
          only query for tasks for which the given user is a candidate.
 long count()
          execute a count(*) query and returns number of results
 TaskQuery executionId(java.lang.String executionId)
          only select tasks that are associated to the given execution
 java.util.List<Task> list()
          execute the query and obtain the list of Tasks
 TaskQuery notSuspended()
          only select tasks that are not suspended
 TaskQuery orderAsc(java.lang.String property)
          order selected tasks ascending for certain properties
 TaskQuery orderDesc(java.lang.String property)
          order selected tasks descending for certain properties
 TaskQuery page(int firstResult, int maxResults)
          select a specific page in the result set
 TaskQuery processDefinitionId(java.lang.String processDefinitionId)
          only select tasks that are associated to the given process definition
 TaskQuery processInstanceId(java.lang.String processInstanceId)
          only select tasks that are associated to the given process instance
 TaskQuery suspended()
          only select suspended tasks
 TaskQuery unassigned()
          only select tasks that are unassigned.
 Task uniqueResult()
          execute the query and obtain the unique Task
 

Field Detail

PROPERTY_NAME

static final java.lang.String PROPERTY_NAME
name property to be used as property in orderAsc(String) and orderDesc(String)

See Also:
Constant Field Values

PROPERTY_ASSIGNEE

static final java.lang.String PROPERTY_ASSIGNEE
assignee property to be used as property in orderAsc(String) and orderDesc(String)

See Also:
Constant Field Values

PROPERTY_CREATEDATE

static final java.lang.String PROPERTY_CREATEDATE
createdate property to be used as property in orderAsc(String) and orderDesc(String)

See Also:
Constant Field Values

PROPERTY_DUEDATE

static final java.lang.String PROPERTY_DUEDATE
duedate property to be used as property in orderAsc(String) and orderDesc(String)

See Also:
Constant Field Values

PROPERTY_PRIORITY

static final java.lang.String PROPERTY_PRIORITY
priority property to be used as property in orderAsc(String) and orderDesc(String)

See Also:
Constant Field Values

PROPERTY_PROGRESS

static final java.lang.String PROPERTY_PROGRESS
progress property to be used as property in orderAsc(String) and orderDesc(String)

See Also:
Constant Field Values
Method Detail

assignee

TaskQuery assignee(java.lang.String userId)
only select tasks for which the given user is the assignee


unassigned

TaskQuery unassigned()
only select tasks that are unassigned. These tasks can still potentially have candidates.


candidate

TaskQuery candidate(java.lang.String userId)
only query for tasks for which the given user is a candidate. The user could be associated directly as a candidate participant to the task or the user could be a member of a group that is associated as a candidate group to the task.


executionId

TaskQuery executionId(java.lang.String executionId)
only select tasks that are associated to the given execution


processInstanceId

TaskQuery processInstanceId(java.lang.String processInstanceId)
only select tasks that are associated to the given process instance


processDefinitionId

TaskQuery processDefinitionId(java.lang.String processDefinitionId)
only select tasks that are associated to the given process definition


activityName

TaskQuery activityName(java.lang.String activityName)
only select tasks that are associated to the given activity name. This can be used in combination with the processDefinitionId(String)


suspended

TaskQuery suspended()
only select suspended tasks


notSuspended

TaskQuery notSuspended()
only select tasks that are not suspended


page

TaskQuery page(int firstResult,
               int maxResults)
select a specific page in the result set


orderAsc

TaskQuery orderAsc(java.lang.String property)
order selected tasks ascending for certain properties


orderDesc

TaskQuery orderDesc(java.lang.String property)
order selected tasks descending for certain properties


count

long count()
execute a count(*) query and returns number of results


list

java.util.List<Task> list()
execute the query and obtain the list of Tasks


uniqueResult

Task uniqueResult()
execute the query and obtain the unique Task



Copyright © 2010 JBoss Community. All Rights Reserved.