Package org.camunda.bpm.engine.impl
Class JobQueryImpl
- Author:
- Joram Barrez, Tom Baeyens, Falko Menge
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.camunda.bpm.engine.impl.AbstractQuery
AbstractQuery.ResultType -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected Dateprotected Dateprotected Dateprotected Dateprotected Dateprotected Dateprotected Stringprotected booleanprotected Stringprotected Stringprotected Stringprotected booleanprotected booleanprotected Stringprotected booleanprotected booleanprotected booleanprotected Longprotected Longprotected Stringprotected Stringprotected Stringprotected booleanprotected Stringprotected SuspensionStateprotected String[]protected booleanFields inherited from class org.camunda.bpm.engine.impl.AbstractQuery
commandExecutor, expressions, maxResultsLimitEnabled, resultType, SORTORDER_ASC, SORTORDER_DESC, validatorsFields inherited from class org.camunda.bpm.engine.impl.db.ListQueryParameterObject
authCheck, databaseType, firstResult, maxResults, orderingProperties, parameter, tenantCheck -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionactive()Only select jobs that are not suspended.activityId(String activityId) Only select jobs which are defined on an activity with the given id.createdAfter(Date date) Only select jobs created after the given date.createdBefore(Date date) Only select jobs created before the given date.duedateHigherThan(Date date) Only select jobs where the duedate is higher then the given date.duedateHigherThen(Date date) Only select jobs where the duedate is higher then the given date.Only select jobs where the duedate is higher then or equals the given date.duedateLowerThan(Date date) Only select jobs where the duedate is lower than the given date.duedateLowerThen(Date date) Only select jobs where the duedate is lower then the given date.duedateLowerThenOrEquals(Date date) Only select jobs where the duedate is lower then or equals the given date.exceptionMessage(String exceptionMessage) Only select jobs that failed due to an exception with the given message.Only select jobs which are executable, ie.longexecuteCount(CommandContext commandContext) executeDeploymentIdMappingsList(CommandContext commandContext) executeList(CommandContext commandContext, Page page) Executes the actual query to retrieve the list of results.executionId(String executionId) Only select jobs which exist for the given executionfailedActivityId(String activityId) Only select jobs that failed due to an exception at an activity with the given id.booleangetIds()getNow()booleanprotected booleanWhether or not the query has excluding conditions.Select jobs which have no tenant id.booleanjobDefinitionId(String jobDefinitionId) Only select jobs which exist for the given job definition id.Only select jobs with the given idOnly select jobs whose id is in the given set of idsmessages()Only select jobs that are messages.Only select jobs which have no retries leftOrder by execution id (needs to be followed byQuery.asc()orQuery.desc()).Order by duedate (needs to be followed byQuery.asc()orQuery.desc()).Order by job id (needs to be followed byQuery.asc()orQuery.desc()).Order by priority for execution (needs to be followed byQuery.asc()orQuery.desc()).Order by retries (needs to be followed byQuery.asc()orQuery.desc()).Order by process definition id (needs to be followed byQuery.asc()orQuery.desc()).Order by process definition key (needs to be followed byQuery.asc()orQuery.desc()).Order by process instance id (needs to be followed byQuery.asc()orQuery.desc()).Order by tenant id (needs to be followed byQuery.asc()orQuery.desc()).priorityHigherThanOrEquals(long priority) Only select jobs with a priority that is higher than or equal to the given priority.priorityLowerThanOrEquals(long priority) Only select jobs with a priority that is lower than or equal to the given priority.processDefinitionId(String processDefinitionId) Only select jobs which exist for the given process definition id.processDefinitionKey(String processDefinitionKey) Only select jobs which exist for the given process definition key.processInstanceId(String processInstanceId) Only select jobs which exist for the given process instance.processInstanceIds(Set<String> processInstanceIds) Only select jobs which exist for any of the given process instance idsrootProcessInstanceId(String rootProcessInstanceId) Only select jobs which exist for the given root process instance.Only select jobs that are suspended.tenantIdIn(String... tenantIds) Only select jobs that belong to one of the given tenant ids.timers()Only select jobs that are timers.Only select jobs that failed due to an exception.Only select jobs which have no tenant id.Only select jobs which have retries leftMethods inherited from class org.camunda.bpm.engine.impl.AbstractQuery
addExpression, addValidator, asc, checkMaxResultsLimit, checkQueryOk, count, desc, direction, disableMaxResultsLimit, enableMaxResultsLimit, evaluateExpressions, evaluateExpressionsAndExecuteCount, evaluateExpressionsAndExecuteDeploymentIdMappingsList, evaluateExpressionsAndExecuteIdsList, evaluateExpressionsAndExecuteList, execute, executeIdsList, executeResult, executeSingleResult, extend, getExpressions, getMethod, list, listDeploymentIdMappings, listIds, listPage, mergeExpressions, mergeOrdering, orderBy, orderBy, removeValidator, setCommandExecutor, setExpressions, singleResult, unlimitedList, validate, validateMethods inherited from class org.camunda.bpm.engine.impl.db.ListQueryParameterObject
getAuthCheck, getDatabaseType, getFirstResult, getFirstRow, getLastRow, getMaxResults, getOrderingProperties, getParameter, getTenantCheck, setAuthCheck, setDatabaseType, setFirstResult, setMaxResults, setOrderingProperties, setParameter, setTenantCheckMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.camunda.bpm.engine.query.Query
asc, count, desc, list, listPage, singleResult, unlimitedList
-
Field Details
-
activityId
-
id
-
ids
-
jobDefinitionId
-
rootProcessInstanceId
-
processInstanceId
-
processInstanceIds
-
executionId
-
processDefinitionId
-
processDefinitionKey
-
retriesLeft
protected boolean retriesLeft -
executable
protected boolean executable -
onlyTimers
protected boolean onlyTimers -
onlyMessages
protected boolean onlyMessages -
duedateHigherThan
-
duedateLowerThan
-
duedateHigherThanOrEqual
-
duedateLowerThanOrEqual
-
createdBefore
-
createdAfter
-
priorityHigherThanOrEqual
-
priorityLowerThanOrEqual
-
withException
protected boolean withException -
exceptionMessage
-
failedActivityId
-
noRetriesLeft
protected boolean noRetriesLeft -
suspensionState
-
isTenantIdSet
protected boolean isTenantIdSet -
tenantIds
-
includeJobsWithoutTenantId
protected boolean includeJobsWithoutTenantId
-
-
Constructor Details
-
JobQueryImpl
public JobQueryImpl() -
JobQueryImpl
-
-
Method Details
-
jobId
Description copied from interface:JobQueryOnly select jobs with the given id -
jobIds
Description copied from interface:JobQueryOnly select jobs whose id is in the given set of ids -
jobDefinitionId
Description copied from interface:JobQueryOnly select jobs which exist for the given job definition id.- Specified by:
jobDefinitionIdin interfaceJobQuery
-
rootProcessInstanceId
Description copied from interface:JobQueryOnly select jobs which exist for the given root process instance.- Specified by:
rootProcessInstanceIdin interfaceJobQuery
-
processInstanceId
Description copied from interface:JobQueryOnly select jobs which exist for the given process instance.- Specified by:
processInstanceIdin interfaceJobQuery
-
processInstanceIds
Description copied from interface:JobQueryOnly select jobs which exist for any of the given process instance ids- Specified by:
processInstanceIdsin interfaceJobQuery
-
executionId
Description copied from interface:JobQueryOnly select jobs which exist for the given execution- Specified by:
executionIdin interfaceJobQuery
-
processDefinitionId
Description copied from interface:JobQueryOnly select jobs which exist for the given process definition id.- Specified by:
processDefinitionIdin interfaceJobQuery
-
processDefinitionKey
Description copied from interface:JobQueryOnly select jobs which exist for the given process definition key.- Specified by:
processDefinitionKeyin interfaceJobQuery
-
activityId
Description copied from interface:JobQueryOnly select jobs which are defined on an activity with the given id.- Specified by:
activityIdin interfaceJobQuery
-
withRetriesLeft
Description copied from interface:JobQueryOnly select jobs which have retries left- Specified by:
withRetriesLeftin interfaceJobQuery
-
executable
Description copied from interface:JobQueryOnly select jobs which are executable, ie. retries > 0 and duedate is null or duedate is in the past- Specified by:
executablein interfaceJobQuery
-
timers
Description copied from interface:JobQueryOnly select jobs that are timers. Cannot be used together withJobQuery.messages() -
messages
Description copied from interface:JobQueryOnly select jobs that are messages. Cannot be used together withJobQuery.timers() -
duedateHigherThan
Description copied from interface:JobQueryOnly select jobs where the duedate is higher then the given date.- Specified by:
duedateHigherThanin interfaceJobQuery
-
duedateLowerThan
Description copied from interface:JobQueryOnly select jobs where the duedate is lower than the given date.- Specified by:
duedateLowerThanin interfaceJobQuery
-
duedateHigherThen
Description copied from interface:JobQueryOnly select jobs where the duedate is higher then the given date.- Specified by:
duedateHigherThenin interfaceJobQuery
-
duedateHigherThenOrEquals
Description copied from interface:JobQueryOnly select jobs where the duedate is higher then or equals the given date.- Specified by:
duedateHigherThenOrEqualsin interfaceJobQuery
-
duedateLowerThen
Description copied from interface:JobQueryOnly select jobs where the duedate is lower then the given date.- Specified by:
duedateLowerThenin interfaceJobQuery
-
duedateLowerThenOrEquals
Description copied from interface:JobQueryOnly select jobs where the duedate is lower then or equals the given date.- Specified by:
duedateLowerThenOrEqualsin interfaceJobQuery
-
createdBefore
Description copied from interface:JobQueryOnly select jobs created before the given date.- Specified by:
createdBeforein interfaceJobQuery
-
createdAfter
Description copied from interface:JobQueryOnly select jobs created after the given date.- Specified by:
createdAfterin interfaceJobQuery
-
priorityHigherThanOrEquals
Description copied from interface:JobQueryOnly select jobs with a priority that is higher than or equal to the given priority.- Specified by:
priorityHigherThanOrEqualsin interfaceJobQuery
-
priorityLowerThanOrEquals
Description copied from interface:JobQueryOnly select jobs with a priority that is lower than or equal to the given priority.- Specified by:
priorityLowerThanOrEqualsin interfaceJobQuery
-
withException
Description copied from interface:JobQueryOnly select jobs that failed due to an exception.- Specified by:
withExceptionin interfaceJobQuery
-
exceptionMessage
Description copied from interface:JobQueryOnly select jobs that failed due to an exception with the given message.- Specified by:
exceptionMessagein interfaceJobQuery
-
failedActivityId
Description copied from interface:JobQueryOnly select jobs that failed due to an exception at an activity with the given id.- Specified by:
failedActivityIdin interfaceJobQuery
-
noRetriesLeft
Description copied from interface:JobQueryOnly select jobs which have no retries left- Specified by:
noRetriesLeftin interfaceJobQuery
-
active
Description copied from interface:JobQueryOnly select jobs that are not suspended. -
suspended
Description copied from interface:JobQueryOnly select jobs that are suspended. -
hasExcludingConditions
protected 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 classAbstractQuery<JobQuery,Job> - Returns:
trueif the query does have excluding conditions,falseotherwise
-
tenantIdIn
Description copied from interface:JobQueryOnly select jobs that belong to one of the given tenant ids.- Specified by:
tenantIdInin interfaceJobQuery
-
withoutTenantId
Description copied from interface:JobQueryOnly select jobs which have no tenant id.- Specified by:
withoutTenantIdin interfaceJobQuery
-
includeJobsWithoutTenantId
Description copied from interface:JobQuerySelect jobs which have no tenant id. Can be used in combination withJobQuery.tenantIdIn(String...).- Specified by:
includeJobsWithoutTenantIdin interfaceJobQuery
-
orderByJobDuedate
Description copied from interface:JobQueryOrder by duedate (needs to be followed byQuery.asc()orQuery.desc()).- Specified by:
orderByJobDuedatein interfaceJobQuery
-
orderByExecutionId
Description copied from interface:JobQueryOrder by execution id (needs to be followed byQuery.asc()orQuery.desc()).- Specified by:
orderByExecutionIdin interfaceJobQuery
-
orderByJobId
Description copied from interface:JobQueryOrder by job id (needs to be followed byQuery.asc()orQuery.desc()).- Specified by:
orderByJobIdin interfaceJobQuery
-
orderByProcessInstanceId
Description copied from interface:JobQueryOrder by process instance id (needs to be followed byQuery.asc()orQuery.desc()).- Specified by:
orderByProcessInstanceIdin interfaceJobQuery
-
orderByProcessDefinitionId
Description copied from interface:JobQueryOrder by process definition id (needs to be followed byQuery.asc()orQuery.desc()).- Specified by:
orderByProcessDefinitionIdin interfaceJobQuery
-
orderByProcessDefinitionKey
Description copied from interface:JobQueryOrder by process definition key (needs to be followed byQuery.asc()orQuery.desc()).- Specified by:
orderByProcessDefinitionKeyin interfaceJobQuery
-
orderByJobRetries
Description copied from interface:JobQueryOrder by retries (needs to be followed byQuery.asc()orQuery.desc()).- Specified by:
orderByJobRetriesin interfaceJobQuery
-
orderByJobPriority
Description copied from interface:JobQueryOrder by priority for execution (needs to be followed byQuery.asc()orQuery.desc()).- Specified by:
orderByJobPriorityin interfaceJobQuery
-
orderByTenantId
Description copied from interface:JobQueryOrder by tenant id (needs to be followed byQuery.asc()orQuery.desc()). Note that the ordering of job without tenant id is database-specific.- Specified by:
orderByTenantIdin interfaceJobQuery
-
executeCount
- Specified by:
executeCountin classAbstractQuery<JobQuery,Job>
-
executeList
Description copied from class:AbstractQueryExecutes the actual query to retrieve the list of results.- Specified by:
executeListin classAbstractQuery<JobQuery,Job> page- used if the results must be paged. If null, no paging will be applied.
-
executeDeploymentIdMappingsList
public List<ImmutablePair<String,String>> executeDeploymentIdMappingsList(CommandContext commandContext) - Overrides:
executeDeploymentIdMappingsListin classAbstractQuery<JobQuery,Job>
-
getIds
-
getRootProcessInstanceId
-
getProcessInstanceId
-
getProcessInstanceIds
-
getExecutionId
-
getRetriesLeft
public boolean getRetriesLeft() -
getExecutable
public boolean getExecutable() -
getNow
-
isWithException
public boolean isWithException() -
getExceptionMessage
-