public class JobQueryImpl extends AbstractQuery<JobQuery,Job> implements JobQuery, Serializable
AbstractQuery.ResultType
Modifier and Type | Field and Description |
---|---|
protected String |
activityId |
protected Date |
duedateHigherThan |
protected Date |
duedateHigherThanOrEqual |
protected Date |
duedateLowerThan |
protected Date |
duedateLowerThanOrEqual |
protected String |
exceptionMessage |
protected boolean |
executable |
protected String |
executionId |
protected String |
id |
protected boolean |
includeJobsWithoutTenantId |
protected boolean |
isTenantIdSet |
protected String |
jobDefinitionId |
protected boolean |
noRetriesLeft |
protected boolean |
onlyMessages |
protected boolean |
onlyTimers |
protected Long |
priorityHigherThanOrEqual |
protected Long |
priorityLowerThanOrEqual |
protected String |
processDefinitionId |
protected String |
processDefinitionKey |
protected String |
processInstanceId |
protected boolean |
retriesLeft |
protected SuspensionState |
suspensionState |
protected String[] |
tenantIds |
protected boolean |
withException |
commandExecutor, expressions, orderingProperties, resultType, SORTORDER_ASC, SORTORDER_DESC, validators
authCheck, databaseType, DEFAULT_ORDER_BY, firstResult, maxResults, orderBy, 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 |
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<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
|
String |
getExceptionMessage() |
boolean |
getExecutable() |
String |
getExecutionId() |
Date |
getNow() |
String |
getProcessInstanceId() |
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 |
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 |
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, checkQueryOk, count, desc, direction, evaluateExpressions, evaluateExpressionsAndExecuteCount, evaluateExpressionsAndExecuteList, execute, executeSingleResult, extend, getExpressions, getMethod, getOrderBy, getOrderingProperties, list, listPage, mergeExpressions, mergeOrdering, orderBy, orderBy, removeValidator, setCommandExecutor, setExpressions, setOrderingProperties, singleResult, validate, validate
getAuthCheck, getDatabaseType, getFirstResult, getFirstRow, getLastRow, getMaxResults, getParameter, getTenantCheck, setAuthCheck, setDatabaseType, setFirstResult, setMaxResults, setOrderBy, setParameter, setTenantCheck
protected 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 Long priorityHigherThanOrEqual
protected Long priorityLowerThanOrEqual
protected boolean withException
protected String exceptionMessage
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)
JobQuery
public JobQuery jobDefinitionId(String jobDefinitionId)
JobQuery
jobDefinitionId
in interface JobQuery
public JobQueryImpl processInstanceId(String processInstanceId)
JobQuery
processInstanceId
in interface JobQuery
public JobQueryImpl executionId(String executionId)
JobQuery
executionId
in interface JobQuery
public JobQuery processDefinitionId(String processDefinitionId)
JobQuery
processDefinitionId
in interface JobQuery
public JobQuery processDefinitionKey(String processDefinitionKey)
JobQuery
processDefinitionKey
in interface JobQuery
public JobQuery activityId(String activityId)
JobQuery
activityId
in interface JobQuery
public JobQuery withRetriesLeft()
JobQuery
withRetriesLeft
in interface JobQuery
public JobQuery executable()
JobQuery
executable
in interface JobQuery
public JobQuery timers()
JobQuery
JobQuery.messages()
public JobQuery messages()
JobQuery
JobQuery.timers()
public JobQuery duedateHigherThan(Date date)
JobQuery
duedateHigherThan
in interface JobQuery
public JobQuery duedateLowerThan(Date date)
JobQuery
duedateLowerThan
in interface JobQuery
public JobQuery duedateHigherThen(Date date)
JobQuery
duedateHigherThen
in interface JobQuery
public JobQuery duedateHigherThenOrEquals(Date date)
JobQuery
duedateHigherThenOrEquals
in interface JobQuery
public JobQuery duedateLowerThen(Date date)
JobQuery
duedateLowerThen
in interface JobQuery
public JobQuery duedateLowerThenOrEquals(Date date)
JobQuery
duedateLowerThenOrEquals
in interface JobQuery
public JobQuery priorityHigherThanOrEquals(long priority)
JobQuery
priorityHigherThanOrEquals
in interface JobQuery
public JobQuery priorityLowerThanOrEquals(long priority)
JobQuery
priorityLowerThanOrEquals
in interface JobQuery
public JobQuery withException()
JobQuery
withException
in interface JobQuery
public JobQuery exceptionMessage(String exceptionMessage)
JobQuery
exceptionMessage
in interface JobQuery
public JobQuery noRetriesLeft()
JobQuery
noRetriesLeft
in interface JobQuery
public JobQuery active()
JobQuery
public JobQuery suspended()
JobQuery
protected boolean hasExcludingConditions()
AbstractQuery
hasExcludingConditions
in class AbstractQuery<JobQuery,Job>
true
if the query does have excluding conditions, false
otherwisepublic JobQuery tenantIdIn(String... tenantIds)
JobQuery
tenantIdIn
in interface JobQuery
public JobQuery withoutTenantId()
JobQuery
withoutTenantId
in interface JobQuery
public JobQuery includeJobsWithoutTenantId()
JobQuery
JobQuery.tenantIdIn(String...)
.includeJobsWithoutTenantId
in interface JobQuery
public JobQuery orderByJobDuedate()
JobQuery
Query.asc()
or Query.desc()
).orderByJobDuedate
in interface JobQuery
public JobQuery orderByExecutionId()
JobQuery
Query.asc()
or Query.desc()
).orderByExecutionId
in interface JobQuery
public JobQuery orderByJobId()
JobQuery
Query.asc()
or Query.desc()
).orderByJobId
in interface JobQuery
public JobQuery orderByProcessInstanceId()
JobQuery
Query.asc()
or Query.desc()
).orderByProcessInstanceId
in interface JobQuery
public JobQuery orderByProcessDefinitionId()
JobQuery
Query.asc()
or Query.desc()
).orderByProcessDefinitionId
in interface JobQuery
public JobQuery orderByProcessDefinitionKey()
JobQuery
Query.asc()
or Query.desc()
).orderByProcessDefinitionKey
in interface JobQuery
public JobQuery orderByJobRetries()
JobQuery
Query.asc()
or Query.desc()
).orderByJobRetries
in interface JobQuery
public JobQuery orderByJobPriority()
JobQuery
Query.asc()
or Query.desc()
).orderByJobPriority
in interface JobQuery
public JobQuery orderByTenantId()
JobQuery
Query.asc()
or Query.desc()
).
Note that the ordering of job without tenant id is database-specific.orderByTenantId
in interface JobQuery
public long executeCount(CommandContext commandContext)
executeCount
in class AbstractQuery<JobQuery,Job>
public List<Job> executeList(CommandContext commandContext, Page page)
AbstractQuery
executeList
in class AbstractQuery<JobQuery,Job>
page
- used if the results must be paged. If null, no paging will be applied.public String getProcessInstanceId()
public String getExecutionId()
public boolean getRetriesLeft()
public boolean getExecutable()
public Date getNow()
public boolean isWithException()
public String getExceptionMessage()
Copyright © 2018. All rights reserved.