Package org.camunda.bpm.engine.impl
Class ExternalTaskQueryImpl
- java.lang.Object
- 
- org.camunda.bpm.engine.impl.db.ListQueryParameterObject
- 
- org.camunda.bpm.engine.impl.AbstractQuery<ExternalTaskQuery,ExternalTask>
- 
- 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, Christopher Zell
- See Also:
- Serialized Form
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class org.camunda.bpm.engine.impl.AbstractQueryAbstractQuery.ResultType
 
- 
 - 
Field SummaryFields Modifier and Type Field Description protected StringactivityIdprotected String[]activityIdInprotected StringexecutionIdprotected StringexternalTaskIdprotected Set<String>externalTaskIdsprotected Booleanlockedprotected DatelockExpirationAfterprotected DatelockExpirationBeforeprotected BooleannotLockedprotected LongpriorityHigherThanOrEqualsprotected LongpriorityLowerThanOrEqualsprotected StringprocessDefinitionIdprotected StringprocessInstanceIdprotected String[]processInstanceIdInprotected BooleanretriesLeftprotected SuspensionStatesuspensionStateprotected String[]tenantIdsprotected StringtopicNameprotected StringworkerId- 
Fields inherited from class org.camunda.bpm.engine.impl.AbstractQuerycommandExecutor, expressions, maxResultsLimitEnabled, resultType, SORTORDER_ASC, SORTORDER_DESC, validators
 - 
Fields inherited from class org.camunda.bpm.engine.impl.db.ListQueryParameterObjectauthCheck, databaseType, firstResult, maxResults, orderingProperties, parameter, tenantCheck
 
- 
 - 
Constructor SummaryConstructors Constructor Description ExternalTaskQueryImpl()ExternalTaskQueryImpl(CommandExecutor commandExecutor)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description ExternalTaskQueryactive()Only select external tasks that are currently not suspendedExternalTaskQueryactivityId(String activityId)Only select external tasks that belong to an instance of the given activityExternalTaskQueryactivityIdIn(String... activityIdIn)Only select external tasks that belong to an instances of the given activities.longexecuteCount(CommandContext commandContext)List<ImmutablePair<String,String>>executeDeploymentIdMappingsList(CommandContext commandContext)List<String>executeIdsList(CommandContext commandContext)List<ExternalTask>executeList(CommandContext commandContext, Page page)Executes the actual query to retrieve the list of results.ExternalTaskQueryexecutionId(String executionId)Only select external tasks created in the context of the given executionExternalTaskQueryexternalTaskId(String externalTaskId)Only select the external task with the given idExternalTaskQueryexternalTaskIdIn(Set<String> externalTaskIds)Only select external tasks with any of the given idsStringgetActivityId()StringgetExecutionId()StringgetExternalTaskId()BooleangetLocked()DategetLockExpirationAfter()DategetLockExpirationBefore()BooleangetNotLocked()DategetNow()StringgetProcessDefinitionId()StringgetProcessInstanceId()BooleangetRetriesLeft()SuspensionStategetSuspensionState()StringgetTopicName()StringgetWorkerId()protected booleanhasExcludingConditions()Whether or not the query has excluding conditions.ExternalTaskQuerylocked()Only select external tasks that are currently locked, i.e.ExternalTaskQuerylockExpirationAfter(Date lockExpirationDate)Only select external tasks that have a lock expiring after the given dateExternalTaskQuerylockExpirationBefore(Date lockExpirationDate)Only select external tasks that have a lock expiring before the given dateExternalTaskQuerynoRetriesLeft()Only select external tasks that have retries = 0ExternalTaskQuerynotLocked()Only select external tasks that are not currently locked, i.e.ExternalTaskQueryorderById()Order by external task id (needs to be followed byQuery.asc()orQuery.desc()).ExternalTaskQueryorderByLockExpirationTime()Order by lock expiration time (needs to be followed byQuery.asc()orQuery.desc()).ExternalTaskQueryorderByPriority()Order by priority (needs to be followed byQuery.asc()orQuery.desc()).ExternalTaskQueryorderByProcessDefinitionId()Order by process definition id (needs to be followed byQuery.asc()orQuery.desc()).ExternalTaskQueryorderByProcessDefinitionKey()Order by process definition key (needs to be followed byQuery.asc()orQuery.desc()).ExternalTaskQueryorderByProcessInstanceId()Order by process instance id (needs to be followed byQuery.asc()orQuery.desc()).ExternalTaskQueryorderByTenantId()Order by tenant id (needs to be followed byQuery.asc()orQuery.desc()).ExternalTaskQuerypriorityHigherThanOrEquals(long priority)Only select external tasks with a priority that is higher than or equal to the given priority.ExternalTaskQuerypriorityLowerThanOrEquals(long priority)Only select external tasks with a priority that is lower than or equal to the given priority.ExternalTaskQueryprocessDefinitionId(String processDefinitionId)Only select external tasks that belong to an instance of the given process definitionExternalTaskQueryprocessInstanceId(String processInstanceId)Only select external tasks created in the context of the given process instanceExternalTaskQueryprocessInstanceIdIn(String... processInstanceIdIn)Only select external tasks created in the context of the given process instancesExternalTaskQuerysuspended()Only select external tasks that are currently suspendedExternalTaskQuerytenantIdIn(String... tenantIds)Only select external tasks that belong to one of the given tenant ids.ExternalTaskQuerytopicName(String topicName)Only select external tasks of the given topicExternalTaskQuerywithRetriesLeft()Only select external tasks that have retries > 0ExternalTaskQueryworkerId(String workerId)Only select external tasks that was most recently locked by the given worker- 
Methods inherited from class org.camunda.bpm.engine.impl.AbstractQueryaddExpression, addValidator, asc, checkMaxResultsLimit, checkQueryOk, count, desc, direction, disableMaxResultsLimit, enableMaxResultsLimit, evaluateExpressions, evaluateExpressionsAndExecuteCount, evaluateExpressionsAndExecuteDeploymentIdMappingsList, evaluateExpressionsAndExecuteIdsList, evaluateExpressionsAndExecuteList, execute, executeResult, executeSingleResult, extend, getExpressions, getMethod, list, listDeploymentIdMappings, listIds, listPage, mergeExpressions, mergeOrdering, orderBy, orderBy, removeValidator, setCommandExecutor, setExpressions, singleResult, unlimitedList, validate, validate
 - 
Methods inherited from class org.camunda.bpm.engine.impl.db.ListQueryParameterObjectgetAuthCheck, getDatabaseType, getFirstResult, getFirstRow, getLastRow, getMaxResults, getOrderingProperties, getParameter, getTenantCheck, setAuthCheck, setDatabaseType, setFirstResult, setMaxResults, setOrderingProperties, setParameter, setTenantCheck
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.camunda.bpm.engine.impl.interceptor.CommandisRetryable
 - 
Methods inherited from interface org.camunda.bpm.engine.query.Queryasc, count, desc, list, listPage, singleResult, unlimitedList
 
- 
 
- 
- 
- 
Field Detail- 
externalTaskIdprotected String externalTaskId 
 - 
workerIdprotected String workerId 
 - 
lockExpirationBeforeprotected Date lockExpirationBefore 
 - 
lockExpirationAfterprotected Date lockExpirationAfter 
 - 
topicNameprotected String topicName 
 - 
lockedprotected Boolean locked 
 - 
notLockedprotected Boolean notLocked 
 - 
executionIdprotected String executionId 
 - 
processInstanceIdprotected String processInstanceId 
 - 
processInstanceIdInprotected String[] processInstanceIdIn 
 - 
processDefinitionIdprotected String processDefinitionId 
 - 
activityIdprotected String activityId 
 - 
activityIdInprotected String[] activityIdIn 
 - 
suspensionStateprotected SuspensionState suspensionState 
 - 
priorityHigherThanOrEqualsprotected Long priorityHigherThanOrEquals 
 - 
priorityLowerThanOrEqualsprotected Long priorityLowerThanOrEquals 
 - 
retriesLeftprotected Boolean retriesLeft 
 - 
tenantIdsprotected String[] tenantIds 
 
- 
 - 
Constructor Detail- 
ExternalTaskQueryImplpublic ExternalTaskQueryImpl() 
 - 
ExternalTaskQueryImplpublic ExternalTaskQueryImpl(CommandExecutor commandExecutor) 
 
- 
 - 
Method Detail- 
externalTaskIdpublic ExternalTaskQuery externalTaskId(String externalTaskId) Description copied from interface:ExternalTaskQueryOnly select the external task with the given id- Specified by:
- externalTaskIdin interface- ExternalTaskQuery
 
 - 
externalTaskIdInpublic ExternalTaskQuery externalTaskIdIn(Set<String> externalTaskIds) Description copied from interface:ExternalTaskQueryOnly select external tasks with any of the given ids- Specified by:
- externalTaskIdInin interface- ExternalTaskQuery
 
 - 
workerIdpublic ExternalTaskQuery workerId(String workerId) Description copied from interface:ExternalTaskQueryOnly select external tasks that was most recently locked by the given worker- Specified by:
- workerIdin interface- ExternalTaskQuery
 
 - 
lockExpirationBeforepublic ExternalTaskQuery lockExpirationBefore(Date lockExpirationDate) Description copied from interface:ExternalTaskQueryOnly select external tasks that have a lock expiring before the given date- Specified by:
- lockExpirationBeforein interface- ExternalTaskQuery
 
 - 
lockExpirationAfterpublic ExternalTaskQuery lockExpirationAfter(Date lockExpirationDate) Description copied from interface:ExternalTaskQueryOnly select external tasks that have a lock expiring after the given date- Specified by:
- lockExpirationAfterin interface- ExternalTaskQuery
 
 - 
topicNamepublic ExternalTaskQuery topicName(String topicName) Description copied from interface:ExternalTaskQueryOnly select external tasks of the given topic- Specified by:
- topicNamein interface- ExternalTaskQuery
 
 - 
lockedpublic ExternalTaskQuery locked() Description copied from interface:ExternalTaskQueryOnly select external tasks that are currently locked, i.e. that have a lock expiration time that is in the future- Specified by:
- lockedin interface- ExternalTaskQuery
 
 - 
notLockedpublic ExternalTaskQuery notLocked() Description copied from interface:ExternalTaskQueryOnly select external tasks that are not currently locked, i.e. that have no lock expiration time or one that is overdue- Specified by:
- notLockedin interface- ExternalTaskQuery
 
 - 
executionIdpublic ExternalTaskQuery executionId(String executionId) Description copied from interface:ExternalTaskQueryOnly select external tasks created in the context of the given execution- Specified by:
- executionIdin interface- ExternalTaskQuery
 
 - 
processInstanceIdpublic ExternalTaskQuery processInstanceId(String processInstanceId) Description copied from interface:ExternalTaskQueryOnly select external tasks created in the context of the given process instance- Specified by:
- processInstanceIdin interface- ExternalTaskQuery
 
 - 
processInstanceIdInpublic ExternalTaskQuery processInstanceIdIn(String... processInstanceIdIn) Description copied from interface:ExternalTaskQueryOnly select external tasks created in the context of the given process instances- Specified by:
- processInstanceIdInin interface- ExternalTaskQuery
 
 - 
processDefinitionIdpublic ExternalTaskQuery processDefinitionId(String processDefinitionId) Description copied from interface:ExternalTaskQueryOnly select external tasks that belong to an instance of the given process definition- Specified by:
- processDefinitionIdin interface- ExternalTaskQuery
 
 - 
activityIdpublic ExternalTaskQuery activityId(String activityId) Description copied from interface:ExternalTaskQueryOnly select external tasks that belong to an instance of the given activity- Specified by:
- activityIdin interface- ExternalTaskQuery
 
 - 
activityIdInpublic ExternalTaskQuery activityIdIn(String... activityIdIn) Description copied from interface:ExternalTaskQueryOnly select external tasks that belong to an instances of the given activities.- Specified by:
- activityIdInin interface- ExternalTaskQuery
 
 - 
priorityHigherThanOrEqualspublic ExternalTaskQuery priorityHigherThanOrEquals(long priority) Description copied from interface:ExternalTaskQueryOnly select external tasks with a priority that is higher than or equal to the given priority.- Specified by:
- priorityHigherThanOrEqualsin interface- ExternalTaskQuery
- Parameters:
- priority- the priority which is used for the query
- Returns:
- the builded external task query
 
 - 
priorityLowerThanOrEqualspublic ExternalTaskQuery priorityLowerThanOrEquals(long priority) Description copied from interface:ExternalTaskQueryOnly select external tasks with a priority that is lower than or equal to the given priority.- Specified by:
- priorityLowerThanOrEqualsin interface- ExternalTaskQuery
- Parameters:
- priority- the priority which is used for the query
- Returns:
- the builded external task query
 
 - 
suspendedpublic ExternalTaskQuery suspended() Description copied from interface:ExternalTaskQueryOnly select external tasks that are currently suspended- Specified by:
- suspendedin interface- ExternalTaskQuery
 
 - 
activepublic ExternalTaskQuery active() Description copied from interface:ExternalTaskQueryOnly select external tasks that are currently not suspended- Specified by:
- activein interface- ExternalTaskQuery
 
 - 
withRetriesLeftpublic ExternalTaskQuery withRetriesLeft() Description copied from interface:ExternalTaskQueryOnly select external tasks that have retries > 0- Specified by:
- withRetriesLeftin interface- ExternalTaskQuery
 
 - 
noRetriesLeftpublic ExternalTaskQuery noRetriesLeft() Description copied from interface:ExternalTaskQueryOnly select external tasks that have retries = 0- Specified by:
- noRetriesLeftin interface- ExternalTaskQuery
 
 - 
hasExcludingConditionsprotected boolean hasExcludingConditions() Description copied from class:AbstractQueryWhether or not the query has excluding conditions. If the query has excluding conditions, (e.g. task due date before and after are excluding), the SQL query is avoided and a default result is returned. The returned result is the same as if the SQL was executed and there were no entries.- Overrides:
- hasExcludingConditionsin class- AbstractQuery<ExternalTaskQuery,ExternalTask>
- Returns:
- trueif the query does have excluding conditions,- falseotherwise
 
 - 
tenantIdInpublic ExternalTaskQuery tenantIdIn(String... tenantIds) Description copied from interface:ExternalTaskQueryOnly select external tasks that belong to one of the given tenant ids.- Specified by:
- tenantIdInin interface- ExternalTaskQuery
 
 - 
orderByIdpublic ExternalTaskQuery orderById() Description copied from interface:ExternalTaskQueryOrder by external task id (needs to be followed byQuery.asc()orQuery.desc()).- Specified by:
- orderByIdin interface- ExternalTaskQuery
 
 - 
orderByLockExpirationTimepublic ExternalTaskQuery orderByLockExpirationTime() Description copied from interface:ExternalTaskQueryOrder by lock expiration time (needs to be followed byQuery.asc()orQuery.desc()). Ordering of tasks with no lock expiration time is database-dependent.- Specified by:
- orderByLockExpirationTimein interface- ExternalTaskQuery
 
 - 
orderByProcessInstanceIdpublic ExternalTaskQuery orderByProcessInstanceId() Description copied from interface:ExternalTaskQueryOrder by process instance id (needs to be followed byQuery.asc()orQuery.desc()).- Specified by:
- orderByProcessInstanceIdin interface- ExternalTaskQuery
 
 - 
orderByProcessDefinitionIdpublic ExternalTaskQuery orderByProcessDefinitionId() Description copied from interface:ExternalTaskQueryOrder by process definition id (needs to be followed byQuery.asc()orQuery.desc()).- Specified by:
- orderByProcessDefinitionIdin interface- ExternalTaskQuery
 
 - 
orderByProcessDefinitionKeypublic ExternalTaskQuery orderByProcessDefinitionKey() Description copied from interface:ExternalTaskQueryOrder by process definition key (needs to be followed byQuery.asc()orQuery.desc()).- Specified by:
- orderByProcessDefinitionKeyin interface- ExternalTaskQuery
 
 - 
orderByTenantIdpublic ExternalTaskQuery orderByTenantId() Description copied from interface:ExternalTaskQueryOrder by tenant id (needs to be followed byQuery.asc()orQuery.desc()). Note that the ordering of external tasks without tenant id is database-specific.- Specified by:
- orderByTenantIdin interface- ExternalTaskQuery
 
 - 
orderByPrioritypublic ExternalTaskQuery orderByPriority() Description copied from interface:ExternalTaskQueryOrder by priority (needs to be followed byQuery.asc()orQuery.desc()).- Specified by:
- orderByPriorityin interface- ExternalTaskQuery
 
 - 
executeCountpublic long executeCount(CommandContext commandContext) - Specified by:
- executeCountin class- AbstractQuery<ExternalTaskQuery,ExternalTask>
 
 - 
executeListpublic List<ExternalTask> executeList(CommandContext commandContext, Page page) Description copied from class:AbstractQueryExecutes the actual query to retrieve the list of results.- Specified by:
- executeListin class- AbstractQuery<ExternalTaskQuery,ExternalTask>
- page- used if the results must be paged. If null, no paging will be applied.
 
 - 
executeIdsListpublic List<String> executeIdsList(CommandContext commandContext) - Overrides:
- executeIdsListin class- AbstractQuery<ExternalTaskQuery,ExternalTask>
 
 - 
executeDeploymentIdMappingsListpublic List<ImmutablePair<String,String>> executeDeploymentIdMappingsList(CommandContext commandContext) - Overrides:
- executeDeploymentIdMappingsListin class- AbstractQuery<ExternalTaskQuery,ExternalTask>
 
 - 
getExternalTaskIdpublic String getExternalTaskId() 
 - 
getWorkerIdpublic String getWorkerId() 
 - 
getLockExpirationBeforepublic Date getLockExpirationBefore() 
 - 
getLockExpirationAfterpublic Date getLockExpirationAfter() 
 - 
getTopicNamepublic String getTopicName() 
 - 
getLockedpublic Boolean getLocked() 
 - 
getNotLockedpublic Boolean getNotLocked() 
 - 
getExecutionIdpublic String getExecutionId() 
 - 
getProcessInstanceIdpublic String getProcessInstanceId() 
 - 
getProcessDefinitionIdpublic String getProcessDefinitionId() 
 - 
getActivityIdpublic String getActivityId() 
 - 
getSuspensionStatepublic SuspensionState getSuspensionState() 
 - 
getRetriesLeftpublic Boolean getRetriesLeft() 
 - 
getNowpublic Date getNow() 
 
- 
 
-