org.camunda.bpm.engine.impl
Class ExternalTaskQueryImpl

java.lang.Object
  extended by org.camunda.bpm.engine.impl.db.AuthorizationCheck
      extended by org.camunda.bpm.engine.impl.db.ListQueryParameterObject
          extended by org.camunda.bpm.engine.impl.AbstractQuery<ExternalTaskQuery,ExternalTask>
              extended by org.camunda.bpm.engine.impl.ExternalTaskQueryImpl
All Implemented Interfaces:
Serializable, ExternalTaskQuery, Command<Object>, Query<ExternalTaskQuery,ExternalTask>

public class ExternalTaskQueryImpl
extends AbstractQuery<ExternalTaskQuery,ExternalTask>
implements ExternalTaskQuery

Author:
Thorben Lindhauer
See Also:
Serialized Form

Field Summary
protected  String activityId
           
protected  String executionId
           
protected  String externalTaskId
           
protected  Boolean locked
           
protected  Date lockExpirationAfter
           
protected  Date lockExpirationBefore
           
protected  Boolean notLocked
           
protected  String processDefinitionId
           
protected  String processInstanceId
           
protected  Boolean retriesLeft
           
protected  SuspensionState suspensionState
           
protected  String topicName
           
protected  String workerId
           
 
Fields inherited from class org.camunda.bpm.engine.impl.AbstractQuery
commandExecutor, expressions, orderingProperties, resultType, SORTORDER_ASC, SORTORDER_DESC, validators
 
Fields inherited from class org.camunda.bpm.engine.impl.db.ListQueryParameterObject
databaseType, DEFAULT_ORDER_BY, firstResult, maxResults, orderBy, parameter
 
Fields inherited from class org.camunda.bpm.engine.impl.db.AuthorizationCheck
authDefaultPerm, authGroupIds, authUserId, isAuthorizationCheckEnabled, permissionChecks
 
Constructor Summary
ExternalTaskQueryImpl()
           
ExternalTaskQueryImpl(CommandExecutor commandExecutor)
           
 
Method Summary
 ExternalTaskQuery active()
          Only select external tasks that are currently not suspended
 ExternalTaskQuery activityId(String activityId)
          Only select external tasks that belong to an instance of the given activity
 long executeCount(CommandContext commandContext)
           
 List<ExternalTask> executeList(CommandContext commandContext, Page page)
          Executes the actual query to retrieve the list of results.
 ExternalTaskQuery executionId(String executionId)
          Only select external tasks created in the context of the given execution
 ExternalTaskQuery externalTaskId(String externalTaskId)
          Only select the external task with the given id
 String getActivityId()
           
 String getExecutionId()
           
 String getExternalTaskId()
           
 Boolean getLocked()
           
 Date getLockExpirationAfter()
           
 Date getLockExpirationBefore()
           
 Boolean getNotLocked()
           
 Date getNow()
           
 String getProcessDefinitionId()
           
 String getProcessInstanceId()
           
 Boolean getRetriesLeft()
           
 SuspensionState getSuspensionState()
           
 String getTopicName()
           
 String getWorkerId()
           
 ExternalTaskQuery locked()
          Only select external tasks that are currently locked, i.e.
 ExternalTaskQuery lockExpirationAfter(Date lockExpirationDate)
          Only select external tasks that have a lock expiring after the given date
 ExternalTaskQuery lockExpirationBefore(Date lockExpirationDate)
          Only select external tasks that have a lock expiring before the given date
 ExternalTaskQuery noRetriesLeft()
          Only select external tasks that have retries = 0
 ExternalTaskQuery notLocked()
          Only select external tasks that are not currently locked, i.e.
 ExternalTaskQuery orderById()
          Order by external task id (needs to be followed by Query.asc() or Query.desc()).
 ExternalTaskQuery orderByLockExpirationTime()
          Order by lock expiration time (needs to be followed by Query.asc() or Query.desc()).
 ExternalTaskQuery orderByProcessDefinitionId()
          Order by process definition id (needs to be followed by Query.asc() or Query.desc()).
 ExternalTaskQuery orderByProcessDefinitionKey()
          Order by process definition key (needs to be followed by Query.asc() or Query.desc()).
 ExternalTaskQuery orderByProcessInstanceId()
          Order by process instance id (needs to be followed by Query.asc() or Query.desc()).
 ExternalTaskQuery processDefinitionId(String processDefinitionId)
          Only select external tasks that belong to an instance of the given process definition
 ExternalTaskQuery processInstanceId(String processInstanceId)
          Only select external tasks created in the context of the given process instance
 ExternalTaskQuery suspended()
          Only select external tasks that are currently suspended
 ExternalTaskQuery topicName(String topicName)
          Only select external tasks of the given topic
 ExternalTaskQuery withRetriesLeft()
          Only select external tasks that have retries > 0
 ExternalTaskQuery workerId(String workerId)
          Only select external tasks that was most recently locked by the given worker
 
Methods inherited from class org.camunda.bpm.engine.impl.AbstractQuery
addExpression, addValidator, asc, checkQueryOk, count, desc, direction, evaluateExpressions, evaluateExpressionsAndExecuteCount, evaluateExpressionsAndExecuteList, execute, executeSingleResult, extend, getExpressions, getMethod, getOrderBy, getOrderingProperties, hasExcludingConditions, list, listPage, mergeExpressions, mergeOrdering, orderBy, orderBy, removeValidator, setCommandExecutor, setExpressions, setOrderingProperties, singleResult, validate, validate
 
Methods inherited from class org.camunda.bpm.engine.impl.db.ListQueryParameterObject
getDatabaseType, getFirstResult, getFirstRow, getLastRow, getMaxResults, getParameter, setDatabaseType, setFirstResult, setMaxResults, setOrderBy, setParameter
 
Methods inherited from class org.camunda.bpm.engine.impl.db.AuthorizationCheck
addAtomicPermissionCheck, getAuthDefaultPerm, getAuthGroupIds, getAuthUserId, getPermissionChecks, isAuthorizationCheckEnabled, setAtomicPermissionChecks, setAuthDefaultPerm, setAuthGroupIds, setAuthorizationCheckEnabled, setAuthUserId, setPermissionChecks
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.camunda.bpm.engine.query.Query
asc, count, desc, list, listPage, singleResult
 

Field Detail

externalTaskId

protected String externalTaskId

workerId

protected String workerId

lockExpirationBefore

protected Date lockExpirationBefore

lockExpirationAfter

protected Date lockExpirationAfter

topicName

protected String topicName

locked

protected Boolean locked

notLocked

protected Boolean notLocked

executionId

protected String executionId

processInstanceId

protected String processInstanceId

processDefinitionId

protected String processDefinitionId

activityId

protected String activityId

suspensionState

protected SuspensionState suspensionState

retriesLeft

protected Boolean retriesLeft
Constructor Detail

ExternalTaskQueryImpl

public ExternalTaskQueryImpl()

ExternalTaskQueryImpl

public ExternalTaskQueryImpl(CommandExecutor commandExecutor)
Method Detail

externalTaskId

public ExternalTaskQuery externalTaskId(String externalTaskId)
Description copied from interface: ExternalTaskQuery
Only select the external task with the given id

Specified by:
externalTaskId in interface ExternalTaskQuery

workerId

public ExternalTaskQuery workerId(String workerId)
Description copied from interface: ExternalTaskQuery
Only select external tasks that was most recently locked by the given worker

Specified by:
workerId in interface ExternalTaskQuery

lockExpirationBefore

public ExternalTaskQuery lockExpirationBefore(Date lockExpirationDate)
Description copied from interface: ExternalTaskQuery
Only select external tasks that have a lock expiring before the given date

Specified by:
lockExpirationBefore in interface ExternalTaskQuery

lockExpirationAfter

public ExternalTaskQuery lockExpirationAfter(Date lockExpirationDate)
Description copied from interface: ExternalTaskQuery
Only select external tasks that have a lock expiring after the given date

Specified by:
lockExpirationAfter in interface ExternalTaskQuery

topicName

public ExternalTaskQuery topicName(String topicName)
Description copied from interface: ExternalTaskQuery
Only select external tasks of the given topic

Specified by:
topicName in interface ExternalTaskQuery

locked

public ExternalTaskQuery locked()
Description copied from interface: ExternalTaskQuery
Only select external tasks that are currently locked, i.e. that have a lock expiration time that is in the future

Specified by:
locked in interface ExternalTaskQuery

notLocked

public ExternalTaskQuery notLocked()
Description copied from interface: ExternalTaskQuery
Only select external tasks that are not currently locked, i.e. that have no lock expiration time or one that is overdue

Specified by:
notLocked in interface ExternalTaskQuery

executionId

public ExternalTaskQuery executionId(String executionId)
Description copied from interface: ExternalTaskQuery
Only select external tasks created in the context of the given execution

Specified by:
executionId in interface ExternalTaskQuery

processInstanceId

public ExternalTaskQuery processInstanceId(String processInstanceId)
Description copied from interface: ExternalTaskQuery
Only select external tasks created in the context of the given process instance

Specified by:
processInstanceId in interface ExternalTaskQuery

processDefinitionId

public ExternalTaskQuery processDefinitionId(String processDefinitionId)
Description copied from interface: ExternalTaskQuery
Only select external tasks that belong to an instance of the given process definition

Specified by:
processDefinitionId in interface ExternalTaskQuery

activityId

public ExternalTaskQuery activityId(String activityId)
Description copied from interface: ExternalTaskQuery
Only select external tasks that belong to an instance of the given activity

Specified by:
activityId in interface ExternalTaskQuery

suspended

public ExternalTaskQuery suspended()
Description copied from interface: ExternalTaskQuery
Only select external tasks that are currently suspended

Specified by:
suspended in interface ExternalTaskQuery

active

public ExternalTaskQuery active()
Description copied from interface: ExternalTaskQuery
Only select external tasks that are currently not suspended

Specified by:
active in interface ExternalTaskQuery

withRetriesLeft

public ExternalTaskQuery withRetriesLeft()
Description copied from interface: ExternalTaskQuery
Only select external tasks that have retries > 0

Specified by:
withRetriesLeft in interface ExternalTaskQuery

noRetriesLeft

public ExternalTaskQuery noRetriesLeft()
Description copied from interface: ExternalTaskQuery
Only select external tasks that have retries = 0

Specified by:
noRetriesLeft in interface ExternalTaskQuery

orderById

public ExternalTaskQuery orderById()
Description copied from interface: ExternalTaskQuery
Order by external task id (needs to be followed by Query.asc() or Query.desc()).

Specified by:
orderById in interface ExternalTaskQuery

orderByLockExpirationTime

public ExternalTaskQuery orderByLockExpirationTime()
Description copied from interface: ExternalTaskQuery
Order by lock expiration time (needs to be followed by Query.asc() or Query.desc()). Ordering of tasks with no lock expiration time is database-dependent.

Specified by:
orderByLockExpirationTime in interface ExternalTaskQuery

orderByProcessInstanceId

public ExternalTaskQuery orderByProcessInstanceId()
Description copied from interface: ExternalTaskQuery
Order by process instance id (needs to be followed by Query.asc() or Query.desc()).

Specified by:
orderByProcessInstanceId in interface ExternalTaskQuery

orderByProcessDefinitionId

public ExternalTaskQuery orderByProcessDefinitionId()
Description copied from interface: ExternalTaskQuery
Order by process definition id (needs to be followed by Query.asc() or Query.desc()).

Specified by:
orderByProcessDefinitionId in interface ExternalTaskQuery

orderByProcessDefinitionKey

public ExternalTaskQuery orderByProcessDefinitionKey()
Description copied from interface: ExternalTaskQuery
Order by process definition key (needs to be followed by Query.asc() or Query.desc()).

Specified by:
orderByProcessDefinitionKey in interface ExternalTaskQuery

executeCount

public long executeCount(CommandContext commandContext)
Specified by:
executeCount in class AbstractQuery<ExternalTaskQuery,ExternalTask>

executeList

public List<ExternalTask> executeList(CommandContext commandContext,
                                      Page page)
Description copied from class: AbstractQuery
Executes the actual query to retrieve the list of results.

Specified by:
executeList in class AbstractQuery<ExternalTaskQuery,ExternalTask>
page - used if the results must be paged. If null, no paging will be applied.

getExternalTaskId

public String getExternalTaskId()

getWorkerId

public String getWorkerId()

getLockExpirationBefore

public Date getLockExpirationBefore()

getLockExpirationAfter

public Date getLockExpirationAfter()

getTopicName

public String getTopicName()

getLocked

public Boolean getLocked()

getNotLocked

public Boolean getNotLocked()

getExecutionId

public String getExecutionId()

getProcessInstanceId

public String getProcessInstanceId()

getProcessDefinitionId

public String getProcessDefinitionId()

getActivityId

public String getActivityId()

getSuspensionState

public SuspensionState getSuspensionState()

getRetriesLeft

public Boolean getRetriesLeft()

getNow

public Date getNow()


Copyright © 2015 camunda services GmbH. All rights reserved.