public class JobQueryImpl extends AbstractQuery<JobQuery,Job> implements JobQuery, Serializable
AbstractQuery.ResultTypecommandExecutor, expressions, maxResultsLimitEnabled, resultType, SORTORDER_ASC, SORTORDER_DESC, validatorsauthCheck, databaseType, firstResult, maxResults, orderingProperties, parameter, tenantCheck| Constructor and Description |
|---|
JobQueryImpl() |
JobQueryImpl(CommandExecutor commandExecutor) |
| Modifier and Type | Method and Description |
|---|---|
JobQuery |
active()
Only select jobs that are not suspended.
|
JobQuery |
activityId(String activityId)
Only select jobs which are defined on an activity with the given id.
|
JobQuery |
createdAfter(Date date)
Only select jobs created after the given date.
|
JobQuery |
createdBefore(Date date)
Only select jobs created before the given date.
|
JobQuery |
duedateHigherThan(Date date)
Only select jobs where the duedate is higher then the given date.
|
JobQuery |
duedateHigherThen(Date date)
Only select jobs where the duedate is higher then the given date.
|
JobQuery |
duedateHigherThenOrEquals(Date date)
Only select jobs where the duedate is higher then or equals the given date.
|
JobQuery |
duedateLowerThan(Date date)
Only select jobs where the duedate is lower than the given date.
|
JobQuery |
duedateLowerThen(Date date)
Only select jobs where the duedate is lower then the given date.
|
JobQuery |
duedateLowerThenOrEquals(Date date)
Only select jobs where the duedate is lower then or equals the given date.
|
JobQuery |
exceptionMessage(String exceptionMessage)
Only select jobs that failed due to an exception with the given message.
|
JobQuery |
executable()
Only select jobs which are executable,
ie.
|
long |
executeCount(CommandContext commandContext) |
List<ImmutablePair<String,String>> |
executeDeploymentIdMappingsList(CommandContext commandContext) |
List<Job> |
executeList(CommandContext commandContext,
Page page)
Executes the actual query to retrieve the list of results.
|
JobQueryImpl |
executionId(String executionId)
Only select jobs which exist for the given execution
|
JobQuery |
failedActivityId(String activityId)
Only select jobs that failed due to an exception at an activity with the given id.
|
String |
getExceptionMessage() |
boolean |
getExecutable() |
String |
getExecutionId() |
Set<String> |
getIds() |
Date |
getNow() |
String |
getProcessInstanceId() |
Set<String> |
getProcessInstanceIds() |
boolean |
getRetriesLeft() |
protected boolean |
hasExcludingConditions()
Whether or not the query has excluding conditions.
|
JobQuery |
includeJobsWithoutTenantId()
Select jobs which have no tenant id.
|
boolean |
isWithException() |
JobQuery |
jobDefinitionId(String jobDefinitionId)
Only select jobs which exist for the given job definition id.
|
JobQuery |
jobId(String jobId)
Only select jobs with the given id
|
JobQuery |
jobIds(Set<String> ids)
Only select jobs whose id is in the given set of ids
|
JobQuery |
messages()
Only select jobs that are messages.
|
JobQuery |
noRetriesLeft()
Only select jobs which have no retries left
|
JobQuery |
orderByExecutionId()
Order by execution id (needs to be followed by
Query.asc() or Query.desc()). |
JobQuery |
orderByJobDuedate()
Order by duedate (needs to be followed by
Query.asc() or Query.desc()). |
JobQuery |
orderByJobId()
Order by job id (needs to be followed by
Query.asc() or Query.desc()). |
JobQuery |
orderByJobPriority()
Order by priority for execution (needs to be followed by
Query.asc() or Query.desc()). |
JobQuery |
orderByJobRetries()
Order by retries (needs to be followed by
Query.asc() or Query.desc()). |
JobQuery |
orderByProcessDefinitionId()
Order by process definition id (needs to be followed by
Query.asc() or Query.desc()). |
JobQuery |
orderByProcessDefinitionKey()
Order by process definition key (needs to be followed by
Query.asc() or Query.desc()). |
JobQuery |
orderByProcessInstanceId()
Order by process instance id (needs to be followed by
Query.asc() or Query.desc()). |
JobQuery |
orderByTenantId()
Order by tenant id (needs to be followed by
Query.asc() or Query.desc()). |
JobQuery |
priorityHigherThanOrEquals(long priority)
Only select jobs with a priority that is higher than or equal to the given priority.
|
JobQuery |
priorityLowerThanOrEquals(long priority)
Only select jobs with a priority that is lower than or equal to the given priority.
|
JobQuery |
processDefinitionId(String processDefinitionId)
Only select jobs which exist for the given process definition id.
|
JobQuery |
processDefinitionKey(String processDefinitionKey)
Only select jobs which exist for the given process definition key.
|
JobQueryImpl |
processInstanceId(String processInstanceId)
Only select jobs which exist for the given process instance.
|
JobQuery |
processInstanceIds(Set<String> processInstanceIds)
Only select jobs which exist for any of the given process instance ids
|
JobQuery |
suspended()
Only select jobs that are suspended.
|
JobQuery |
tenantIdIn(String... tenantIds)
Only select jobs that belong to one of the given tenant ids.
|
JobQuery |
timers()
Only select jobs that are timers.
|
JobQuery |
withException()
Only select jobs that failed due to an exception.
|
JobQuery |
withoutTenantId()
Only select jobs which have no tenant id.
|
JobQuery |
withRetriesLeft()
Only select jobs which have retries left
|
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, validategetAuthCheck, getDatabaseType, getFirstResult, getFirstRow, getLastRow, getMaxResults, getOrderingProperties, getParameter, getTenantCheck, setAuthCheck, setDatabaseType, setFirstResult, setMaxResults, setOrderingProperties, setParameter, setTenantCheckclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitasc, count, desc, list, listPage, singleResult, unlimitedListisRetryableprotected String activityId
protected String id
protected String jobDefinitionId
protected String processInstanceId
protected String executionId
protected String processDefinitionId
protected String processDefinitionKey
protected boolean retriesLeft
protected boolean executable
protected boolean onlyTimers
protected boolean onlyMessages
protected Date duedateHigherThan
protected Date duedateLowerThan
protected Date duedateHigherThanOrEqual
protected Date duedateLowerThanOrEqual
protected Date createdBefore
protected Date createdAfter
protected Long priorityHigherThanOrEqual
protected Long priorityLowerThanOrEqual
protected boolean withException
protected String exceptionMessage
protected String failedActivityId
protected boolean noRetriesLeft
protected SuspensionState suspensionState
protected boolean isTenantIdSet
protected String[] tenantIds
protected boolean includeJobsWithoutTenantId
public JobQueryImpl()
public JobQueryImpl(CommandExecutor commandExecutor)
public JobQuery jobId(String jobId)
JobQuerypublic JobQuery jobIds(Set<String> ids)
JobQuerypublic JobQuery jobDefinitionId(String jobDefinitionId)
JobQueryjobDefinitionId in interface JobQuerypublic JobQueryImpl processInstanceId(String processInstanceId)
JobQueryprocessInstanceId in interface JobQuerypublic JobQuery processInstanceIds(Set<String> processInstanceIds)
JobQueryprocessInstanceIds in interface JobQuerypublic JobQueryImpl executionId(String executionId)
JobQueryexecutionId in interface JobQuerypublic JobQuery processDefinitionId(String processDefinitionId)
JobQueryprocessDefinitionId in interface JobQuerypublic JobQuery processDefinitionKey(String processDefinitionKey)
JobQueryprocessDefinitionKey in interface JobQuerypublic JobQuery activityId(String activityId)
JobQueryactivityId in interface JobQuerypublic JobQuery withRetriesLeft()
JobQuerywithRetriesLeft in interface JobQuerypublic JobQuery executable()
JobQueryexecutable in interface JobQuerypublic JobQuery timers()
JobQueryJobQuery.messages()public JobQuery messages()
JobQueryJobQuery.timers()public JobQuery duedateHigherThan(Date date)
JobQueryduedateHigherThan in interface JobQuerypublic JobQuery duedateLowerThan(Date date)
JobQueryduedateLowerThan in interface JobQuerypublic JobQuery duedateHigherThen(Date date)
JobQueryduedateHigherThen in interface JobQuerypublic JobQuery duedateHigherThenOrEquals(Date date)
JobQueryduedateHigherThenOrEquals in interface JobQuerypublic JobQuery duedateLowerThen(Date date)
JobQueryduedateLowerThen in interface JobQuerypublic JobQuery duedateLowerThenOrEquals(Date date)
JobQueryduedateLowerThenOrEquals in interface JobQuerypublic JobQuery createdBefore(Date date)
JobQuerycreatedBefore in interface JobQuerypublic JobQuery createdAfter(Date date)
JobQuerycreatedAfter in interface JobQuerypublic JobQuery priorityHigherThanOrEquals(long priority)
JobQuerypriorityHigherThanOrEquals in interface JobQuerypublic JobQuery priorityLowerThanOrEquals(long priority)
JobQuerypriorityLowerThanOrEquals in interface JobQuerypublic JobQuery withException()
JobQuerywithException in interface JobQuerypublic JobQuery exceptionMessage(String exceptionMessage)
JobQueryexceptionMessage in interface JobQuerypublic JobQuery failedActivityId(String activityId)
JobQueryfailedActivityId in interface JobQuerypublic JobQuery noRetriesLeft()
JobQuerynoRetriesLeft in interface JobQuerypublic JobQuery active()
JobQuerypublic JobQuery suspended()
JobQueryprotected boolean hasExcludingConditions()
AbstractQueryhasExcludingConditions in class AbstractQuery<JobQuery,Job>true if the query does have excluding conditions, false otherwisepublic JobQuery tenantIdIn(String... tenantIds)
JobQuerytenantIdIn in interface JobQuerypublic JobQuery withoutTenantId()
JobQuerywithoutTenantId in interface JobQuerypublic JobQuery includeJobsWithoutTenantId()
JobQueryJobQuery.tenantIdIn(String...).includeJobsWithoutTenantId in interface JobQuerypublic JobQuery orderByJobDuedate()
JobQueryQuery.asc() or Query.desc()).orderByJobDuedate in interface JobQuerypublic JobQuery orderByExecutionId()
JobQueryQuery.asc() or Query.desc()).orderByExecutionId in interface JobQuerypublic JobQuery orderByJobId()
JobQueryQuery.asc() or Query.desc()).orderByJobId in interface JobQuerypublic JobQuery orderByProcessInstanceId()
JobQueryQuery.asc() or Query.desc()).orderByProcessInstanceId in interface JobQuerypublic JobQuery orderByProcessDefinitionId()
JobQueryQuery.asc() or Query.desc()).orderByProcessDefinitionId in interface JobQuerypublic JobQuery orderByProcessDefinitionKey()
JobQueryQuery.asc() or Query.desc()).orderByProcessDefinitionKey in interface JobQuerypublic JobQuery orderByJobRetries()
JobQueryQuery.asc() or Query.desc()).orderByJobRetries in interface JobQuerypublic JobQuery orderByJobPriority()
JobQueryQuery.asc() or Query.desc()).orderByJobPriority in interface JobQuerypublic JobQuery orderByTenantId()
JobQueryQuery.asc() or Query.desc()).
Note that the ordering of job without tenant id is database-specific.orderByTenantId in interface JobQuerypublic long executeCount(CommandContext commandContext)
executeCount in class AbstractQuery<JobQuery,Job>public List<Job> executeList(CommandContext commandContext, Page page)
AbstractQueryexecuteList in class AbstractQuery<JobQuery,Job>page - used if the results must be paged. If null, no paging will be applied.public List<ImmutablePair<String,String>> executeDeploymentIdMappingsList(CommandContext commandContext)
executeDeploymentIdMappingsList in class AbstractQuery<JobQuery,Job>public String getProcessInstanceId()
public String getExecutionId()
public boolean getRetriesLeft()
public boolean getExecutable()
public Date getNow()
public boolean isWithException()
public String getExceptionMessage()
Copyright © 2022. All rights reserved.