public class ExternalTaskQueryImpl extends AbstractQuery<ExternalTaskQuery,ExternalTask> implements ExternalTaskQuery
AbstractQuery.ResultType
Modifier and Type | Field and Description |
---|---|
protected String |
activityId |
protected String[] |
activityIdIn |
protected String |
executionId |
protected String |
externalTaskId |
protected Boolean |
locked |
protected Date |
lockExpirationAfter |
protected Date |
lockExpirationBefore |
protected Boolean |
notLocked |
protected Long |
priorityHigherThanOrEquals |
protected Long |
priorityLowerThanOrEquals |
protected String |
processDefinitionId |
protected String |
processInstanceId |
protected Boolean |
retriesLeft |
protected SuspensionState |
suspensionState |
protected String[] |
tenantIds |
protected String |
topicName |
protected String |
workerId |
commandExecutor, expressions, resultType, SORTORDER_ASC, SORTORDER_DESC, validators
authCheck, databaseType, firstResult, maxResults, orderingProperties, parameter, tenantCheck
Constructor and Description |
---|
ExternalTaskQueryImpl() |
ExternalTaskQueryImpl(CommandExecutor commandExecutor) |
Modifier and Type | Method and Description |
---|---|
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
|
ExternalTaskQuery |
activityIdIn(String... activityIdIn)
Only select external tasks that belong to an instances of the given activities.
|
long |
executeCount(CommandContext commandContext) |
List<String> |
executeIdsList(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() |
protected boolean |
hasExcludingConditions()
Whether or not the query has excluding conditions.
|
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 |
orderByPriority()
Order by priority (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 |
orderByTenantId()
Order by tenant id (needs to be followed by
Query.asc() or Query.desc() ). |
ExternalTaskQuery |
priorityHigherThanOrEquals(long priority)
Only select external tasks with a priority that is higher than or equal to the given priority.
|
ExternalTaskQuery |
priorityLowerThanOrEquals(long priority)
Only select external tasks with a priority that is lower than or equal to the given priority.
|
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 |
tenantIdIn(String... tenantIds)
Only select external tasks that belong to one of the given tenant ids.
|
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
|
addExpression, addValidator, asc, checkQueryOk, count, desc, direction, evaluateExpressions, evaluateExpressionsAndExecuteCount, evaluateExpressionsAndExecuteIdsList, evaluateExpressionsAndExecuteList, execute, executeSingleResult, extend, getExpressions, getMethod, list, listIds, listPage, mergeExpressions, mergeOrdering, orderBy, orderBy, removeValidator, setCommandExecutor, setExpressions, singleResult, validate, validate
getAuthCheck, getDatabaseType, getFirstResult, getFirstRow, getLastRow, getMaxResults, getOrderingProperties, getParameter, getTenantCheck, setAuthCheck, setDatabaseType, setFirstResult, setMaxResults, setOrderingProperties, setParameter, setTenantCheck
protected String externalTaskId
protected String workerId
protected Date lockExpirationBefore
protected Date lockExpirationAfter
protected String topicName
protected Boolean locked
protected Boolean notLocked
protected String executionId
protected String processInstanceId
protected String processDefinitionId
protected String activityId
protected String[] activityIdIn
protected SuspensionState suspensionState
protected Long priorityHigherThanOrEquals
protected Long priorityLowerThanOrEquals
protected Boolean retriesLeft
protected String[] tenantIds
public ExternalTaskQueryImpl()
public ExternalTaskQueryImpl(CommandExecutor commandExecutor)
public ExternalTaskQuery externalTaskId(String externalTaskId)
ExternalTaskQuery
externalTaskId
in interface ExternalTaskQuery
public ExternalTaskQuery workerId(String workerId)
ExternalTaskQuery
workerId
in interface ExternalTaskQuery
public ExternalTaskQuery lockExpirationBefore(Date lockExpirationDate)
ExternalTaskQuery
lockExpirationBefore
in interface ExternalTaskQuery
public ExternalTaskQuery lockExpirationAfter(Date lockExpirationDate)
ExternalTaskQuery
lockExpirationAfter
in interface ExternalTaskQuery
public ExternalTaskQuery topicName(String topicName)
ExternalTaskQuery
topicName
in interface ExternalTaskQuery
public ExternalTaskQuery locked()
ExternalTaskQuery
locked
in interface ExternalTaskQuery
public ExternalTaskQuery notLocked()
ExternalTaskQuery
notLocked
in interface ExternalTaskQuery
public ExternalTaskQuery executionId(String executionId)
ExternalTaskQuery
executionId
in interface ExternalTaskQuery
public ExternalTaskQuery processInstanceId(String processInstanceId)
ExternalTaskQuery
processInstanceId
in interface ExternalTaskQuery
public ExternalTaskQuery processDefinitionId(String processDefinitionId)
ExternalTaskQuery
processDefinitionId
in interface ExternalTaskQuery
public ExternalTaskQuery activityId(String activityId)
ExternalTaskQuery
activityId
in interface ExternalTaskQuery
public ExternalTaskQuery activityIdIn(String... activityIdIn)
ExternalTaskQuery
activityIdIn
in interface ExternalTaskQuery
public ExternalTaskQuery priorityHigherThanOrEquals(long priority)
ExternalTaskQuery
priorityHigherThanOrEquals
in interface ExternalTaskQuery
priority
- the priority which is used for the querypublic ExternalTaskQuery priorityLowerThanOrEquals(long priority)
ExternalTaskQuery
priorityLowerThanOrEquals
in interface ExternalTaskQuery
priority
- the priority which is used for the querypublic ExternalTaskQuery suspended()
ExternalTaskQuery
suspended
in interface ExternalTaskQuery
public ExternalTaskQuery active()
ExternalTaskQuery
active
in interface ExternalTaskQuery
public ExternalTaskQuery withRetriesLeft()
ExternalTaskQuery
withRetriesLeft
in interface ExternalTaskQuery
public ExternalTaskQuery noRetriesLeft()
ExternalTaskQuery
noRetriesLeft
in interface ExternalTaskQuery
protected boolean hasExcludingConditions()
AbstractQuery
hasExcludingConditions
in class AbstractQuery<ExternalTaskQuery,ExternalTask>
true
if the query does have excluding conditions, false
otherwisepublic ExternalTaskQuery tenantIdIn(String... tenantIds)
ExternalTaskQuery
tenantIdIn
in interface ExternalTaskQuery
public ExternalTaskQuery orderById()
ExternalTaskQuery
Query.asc()
or Query.desc()
).orderById
in interface ExternalTaskQuery
public ExternalTaskQuery orderByLockExpirationTime()
ExternalTaskQuery
Query.asc()
or Query.desc()
).
Ordering of tasks with no lock expiration time is database-dependent.orderByLockExpirationTime
in interface ExternalTaskQuery
public ExternalTaskQuery orderByProcessInstanceId()
ExternalTaskQuery
Query.asc()
or Query.desc()
).orderByProcessInstanceId
in interface ExternalTaskQuery
public ExternalTaskQuery orderByProcessDefinitionId()
ExternalTaskQuery
Query.asc()
or Query.desc()
).orderByProcessDefinitionId
in interface ExternalTaskQuery
public ExternalTaskQuery orderByProcessDefinitionKey()
ExternalTaskQuery
Query.asc()
or Query.desc()
).orderByProcessDefinitionKey
in interface ExternalTaskQuery
public ExternalTaskQuery orderByTenantId()
ExternalTaskQuery
Query.asc()
or Query.desc()
).
Note that the ordering of external tasks without tenant id is database-specific.orderByTenantId
in interface ExternalTaskQuery
public ExternalTaskQuery orderByPriority()
ExternalTaskQuery
Query.asc()
or Query.desc()
).orderByPriority
in interface ExternalTaskQuery
public long executeCount(CommandContext commandContext)
executeCount
in class AbstractQuery<ExternalTaskQuery,ExternalTask>
public List<ExternalTask> executeList(CommandContext commandContext, Page page)
AbstractQuery
executeList
in class AbstractQuery<ExternalTaskQuery,ExternalTask>
page
- used if the results must be paged. If null, no paging will be applied.public List<String> executeIdsList(CommandContext commandContext)
executeIdsList
in class AbstractQuery<ExternalTaskQuery,ExternalTask>
public String getExternalTaskId()
public String getWorkerId()
public Date getLockExpirationBefore()
public Date getLockExpirationAfter()
public String getTopicName()
public Boolean getLocked()
public Boolean getNotLocked()
public String getExecutionId()
public String getProcessInstanceId()
public String getProcessDefinitionId()
public String getActivityId()
public SuspensionState getSuspensionState()
public Boolean getRetriesLeft()
public Date getNow()
Copyright © 2017. All rights reserved.