Package org.flowable.job.service.impl
Class JobQueryImpl
java.lang.Object
org.flowable.common.engine.impl.db.ListQueryParameterObject
org.flowable.common.engine.impl.query.AbstractQuery<JobQuery,Job>
org.flowable.job.service.impl.JobQueryImpl
- All Implemented Interfaces:
Serializable
,Query<JobQuery,
,Job> Command<Object>
,BaseJobQuery<JobQuery,
,Job> JobQuery
- Author:
- Joram Barrez, Tom Baeyens, Falko Menge
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.flowable.common.engine.impl.db.ListQueryParameterObject
ListQueryParameterObject.OrderBy, ListQueryParameterObject.ResultType
Nested classes/interfaces inherited from interface org.flowable.common.engine.api.query.Query
Query.NullHandlingOnOrder
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String
protected String
protected String
protected String
protected Date
protected Date
protected Date
protected Date
protected String
protected String
protected String
protected String
protected String
protected Collection<String>
protected String
protected Collection<String>
protected JobServiceConfiguration
protected String
protected boolean
protected boolean
protected boolean
protected boolean
protected String
protected String
protected String
protected String
protected String
protected String
protected String
protected String
protected String
protected boolean
protected boolean
protected boolean
protected boolean
protected boolean
Fields inherited from class org.flowable.common.engine.impl.query.AbstractQuery
commandContext, commandExecutor
Fields inherited from class org.flowable.common.engine.impl.db.ListQueryParameterObject
databaseType, DEFAULT_ORDER_BY, defaultOrderBy, firstResult, maxResults, nullHandlingColumn, nullHandlingOnOrder, orderByCollection, orderProperty, parameter, resultType, SORTORDER_ASC, SORTORDER_DESC
-
Constructor Summary
ConstructorsConstructorDescriptionJobQueryImpl
(CommandContext commandContext, JobServiceConfiguration jobServiceConfiguration) JobQueryImpl
(CommandExecutor commandExecutor, JobServiceConfiguration jobServiceConfiguration) -
Method Summary
Modifier and TypeMethodDescriptioncaseDefinitionId
(String caseDefinitionId) Only select jobs for the given case definition.caseDefinitionKey
(String caseDefinitionKey) Only select tasks for the given case definition key.caseInstanceId
(String caseInstanceId) Only select jobs for the given case instance.Only select jobs which exist for the given categorycategoryLike
(String categoryLike) Only select jobs like for the given category valuecorrelationId
(String correlationId) Only select jobs with the given correlationId.duedateHigherThan
(Date date) Only select jobs where the duedate is higher then the given date.duedateLowerThan
(Date date) Only select jobs where the duedate is lower than the given date.Only select jobs which exist for the given element idelementName
(String elementName) Only select jobs which exist for the given element nameexceptionMessage
(String exceptionMessage) Only select jobs that failed due to an exception with the given message.long
executeCount
(CommandContext commandContext) executeList
(CommandContext commandContext) Executes the actual query to retrieve the list of results.executionId
(String executionId) Only select jobs which exist for the given executiongetId()
getNow()
handlerType
(String handlerType) Select jobs which have given job handler typehandlerTypes
(Collection<String> handlerTypes) Select jobs which have one of the given job handler typeboolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
Only select jobs with the given idjobIds
(Collection<String> jobIds) Only select jobs with the given ids.jobTenantId
(String tenantId) Only select jobs that have the given tenant id.jobTenantIdLike
(String tenantIdLike) Only select jobs with a tenant id like the given one.Only select jobs that do not have a tenant id.locked()
Only return jobs that are locked (i.e.Only return jobs with the given lock owner.messages()
Only select jobs that are messages.Order by execution id (needs to be followed byQuery.asc()
orQuery.desc()
).Order by create time (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 retries (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()
).planItemInstanceId
(String planItemInstanceId) Only select jobs for the given plan item instance.processDefinitionId
(String processDefinitionId) Only select jobs which exist for the given process definition idprocessDefinitionKey
(String processDefinitionKey) Only select jobs which exist for the given process definition keyprocessInstanceId
(String processInstanceId) Only select jobs which exist for the given process instance.scopeDefinitionId
(String scopeDefinitionId) Only select tasks for the given scope definition identifier.Only select tasks for the given scope identifier.Only select tasks for the given scope type.subScopeId
(String subScopeId) Only select tasks for the given sub scope identifier.timers()
Only select jobs that are timers.unlocked()
Only return jobs that are not locked.Only select jobs that failed due to an exception.Only select jobs without a process instance id value.Only select jobs without a scope id value.Only return jobs that do not have a scope type.Methods inherited from class org.flowable.common.engine.impl.query.AbstractQuery
asc, checkQueryOk, count, desc, direction, execute, executeSingleResult, list, listPage, orderBy, orderBy, setCommandExecutor, singleResult
Methods inherited from class org.flowable.common.engine.impl.db.ListQueryParameterObject
addOrder, buildOrderBy, getDatabaseType, getFirstResult, getFirstRow, getLastRow, getMaxResults, getNullHandlingColumn, getOrderBy, getOrderByCollectionSafe, getOrderByForWindow, getOuterJoinOrderBy, getParameter, hasOrderBy, hasOrderByForColumn, isNeedsPaging, mapOrderByToSql, setDatabaseType, setFirstResult, setMaxResults, setNullHandlingColumn, setParameter
-
Field Details
-
jobServiceConfiguration
-
id
-
jobIds
-
processInstanceId
-
withoutProcessInstanceId
protected boolean withoutProcessInstanceId -
executionId
-
handlerType
-
handlerTypes
-
processDefinitionId
-
processDefinitionKey
-
category
-
categoryLike
-
elementId
-
elementName
-
scopeId
-
withoutScopeId
protected boolean withoutScopeId -
subScopeId
-
scopeType
-
scopeDefinitionId
-
caseDefinitionKey
-
correlationId
-
onlyTimers
protected boolean onlyTimers -
onlyMessages
protected boolean onlyMessages -
duedateHigherThan
-
duedateLowerThan
-
duedateHigherThanOrEqual
-
duedateLowerThanOrEqual
-
withException
protected boolean withException -
exceptionMessage
-
tenantId
-
tenantIdLike
-
withoutTenantId
protected boolean withoutTenantId -
withoutScopeType
protected boolean withoutScopeType -
lockOwner
-
onlyLocked
protected boolean onlyLocked -
onlyUnlocked
protected boolean onlyUnlocked
-
-
Constructor Details
-
JobQueryImpl
public JobQueryImpl() -
JobQueryImpl
-
JobQueryImpl
public JobQueryImpl(CommandExecutor commandExecutor, JobServiceConfiguration jobServiceConfiguration)
-
-
Method Details
-
jobId
Description copied from interface:BaseJobQuery
Only select jobs with the given id- Specified by:
jobId
in interfaceBaseJobQuery<JobQuery,
Job>
-
jobIds
Description copied from interface:BaseJobQuery
Only select jobs with the given ids. If you use jobId(String
jobId) this filter gets ignored.- Specified by:
jobIds
in interfaceBaseJobQuery<JobQuery,
Job>
-
processInstanceId
Description copied from interface:BaseJobQuery
Only select jobs which exist for the given process instance.- Specified by:
processInstanceId
in interfaceBaseJobQuery<JobQuery,
Job>
-
withoutProcessInstanceId
Description copied from interface:BaseJobQuery
Only select jobs without a process instance id value.- Specified by:
withoutProcessInstanceId
in interfaceBaseJobQuery<JobQuery,
Job>
-
processDefinitionId
Description copied from interface:BaseJobQuery
Only select jobs which exist for the given process definition id- Specified by:
processDefinitionId
in interfaceBaseJobQuery<JobQuery,
Job>
-
processDefinitionKey
Description copied from interface:BaseJobQuery
Only select jobs which exist for the given process definition key- Specified by:
processDefinitionKey
in interfaceBaseJobQuery<JobQuery,
Job>
-
category
Description copied from interface:BaseJobQuery
Only select jobs which exist for the given category- Specified by:
category
in interfaceBaseJobQuery<JobQuery,
Job>
-
categoryLike
Description copied from interface:BaseJobQuery
Only select jobs like for the given category value- Specified by:
categoryLike
in interfaceBaseJobQuery<JobQuery,
Job>
-
elementId
Description copied from interface:BaseJobQuery
Only select jobs which exist for the given element id- Specified by:
elementId
in interfaceBaseJobQuery<JobQuery,
Job>
-
elementName
Description copied from interface:BaseJobQuery
Only select jobs which exist for the given element name- Specified by:
elementName
in interfaceBaseJobQuery<JobQuery,
Job>
-
scopeId
Description copied from interface:BaseJobQuery
Only select tasks for the given scope identifier.- Specified by:
scopeId
in interfaceBaseJobQuery<JobQuery,
Job>
-
withoutScopeId
Description copied from interface:BaseJobQuery
Only select jobs without a scope id value.- Specified by:
withoutScopeId
in interfaceBaseJobQuery<JobQuery,
Job>
-
subScopeId
Description copied from interface:BaseJobQuery
Only select tasks for the given sub scope identifier.- Specified by:
subScopeId
in interfaceBaseJobQuery<JobQuery,
Job>
-
scopeType
Description copied from interface:BaseJobQuery
Only select tasks for the given scope type.- Specified by:
scopeType
in interfaceBaseJobQuery<JobQuery,
Job>
-
scopeDefinitionId
Description copied from interface:BaseJobQuery
Only select tasks for the given scope definition identifier.- Specified by:
scopeDefinitionId
in interfaceBaseJobQuery<JobQuery,
Job>
-
caseInstanceId
Description copied from interface:BaseJobQuery
Only select jobs for the given case instance.- Specified by:
caseInstanceId
in interfaceBaseJobQuery<JobQuery,
Job>
-
caseDefinitionId
Description copied from interface:BaseJobQuery
Only select jobs for the given case definition.- Specified by:
caseDefinitionId
in interfaceBaseJobQuery<JobQuery,
Job>
-
caseDefinitionKey
Description copied from interface:BaseJobQuery
Only select tasks for the given case definition key.- Specified by:
caseDefinitionKey
in interfaceBaseJobQuery<JobQuery,
Job>
-
planItemInstanceId
Description copied from interface:BaseJobQuery
Only select jobs for the given plan item instance.- Specified by:
planItemInstanceId
in interfaceBaseJobQuery<JobQuery,
Job>
-
correlationId
Description copied from interface:BaseJobQuery
Only select jobs with the given correlationId.- Specified by:
correlationId
in interfaceBaseJobQuery<JobQuery,
Job>
-
executionId
Description copied from interface:BaseJobQuery
Only select jobs which exist for the given execution- Specified by:
executionId
in interfaceBaseJobQuery<JobQuery,
Job>
-
handlerType
Description copied from interface:BaseJobQuery
Select jobs which have given job handler type- Specified by:
handlerType
in interfaceBaseJobQuery<JobQuery,
Job>
-
handlerTypes
Description copied from interface:BaseJobQuery
Select jobs which have one of the given job handler type- Specified by:
handlerTypes
in interfaceBaseJobQuery<JobQuery,
Job>
-
timers
Description copied from interface:JobQuery
Only select jobs that are timers. Cannot be used together withJobQuery.messages()
-
messages
Description copied from interface:JobQuery
Only select jobs that are messages. Cannot be used together withJobQuery.timers()
-
duedateHigherThan
Description copied from interface:BaseJobQuery
Only select jobs where the duedate is higher then the given date.- Specified by:
duedateHigherThan
in interfaceBaseJobQuery<JobQuery,
Job>
-
duedateLowerThan
Description copied from interface:BaseJobQuery
Only select jobs where the duedate is lower than the given date.- Specified by:
duedateLowerThan
in interfaceBaseJobQuery<JobQuery,
Job>
-
withException
Description copied from interface:BaseJobQuery
Only select jobs that failed due to an exception.- Specified by:
withException
in interfaceBaseJobQuery<JobQuery,
Job>
-
exceptionMessage
Description copied from interface:BaseJobQuery
Only select jobs that failed due to an exception with the given message.- Specified by:
exceptionMessage
in interfaceBaseJobQuery<JobQuery,
Job>
-
jobTenantId
Description copied from interface:BaseJobQuery
Only select jobs that have the given tenant id.- Specified by:
jobTenantId
in interfaceBaseJobQuery<JobQuery,
Job>
-
jobTenantIdLike
Description copied from interface:BaseJobQuery
Only select jobs with a tenant id like the given one.- Specified by:
jobTenantIdLike
in interfaceBaseJobQuery<JobQuery,
Job>
-
jobWithoutTenantId
Description copied from interface:BaseJobQuery
Only select jobs that do not have a tenant id.- Specified by:
jobWithoutTenantId
in interfaceBaseJobQuery<JobQuery,
Job>
-
lockOwner
Description copied from interface:JobQuery
Only return jobs with the given lock owner. -
locked
Description copied from interface:JobQuery
Only return jobs that are locked (i.e. they are acquired by an executor). -
unlocked
Description copied from interface:JobQuery
Only return jobs that are not locked. -
withoutScopeType
Description copied from interface:BaseJobQuery
Only return jobs that do not have a scope type.- Specified by:
withoutScopeType
in interfaceBaseJobQuery<JobQuery,
Job>
-
orderByJobDuedate
Description copied from interface:BaseJobQuery
Order by duedate (needs to be followed byQuery.asc()
orQuery.desc()
).- Specified by:
orderByJobDuedate
in interfaceBaseJobQuery<JobQuery,
Job>
-
orderByJobCreateTime
Description copied from interface:BaseJobQuery
Order by create time (needs to be followed byQuery.asc()
orQuery.desc()
).- Specified by:
orderByJobCreateTime
in interfaceBaseJobQuery<JobQuery,
Job>
-
orderByExecutionId
Description copied from interface:BaseJobQuery
Order by execution id (needs to be followed byQuery.asc()
orQuery.desc()
).- Specified by:
orderByExecutionId
in interfaceBaseJobQuery<JobQuery,
Job>
-
orderByJobId
Description copied from interface:BaseJobQuery
Order by job id (needs to be followed byQuery.asc()
orQuery.desc()
).- Specified by:
orderByJobId
in interfaceBaseJobQuery<JobQuery,
Job>
-
orderByProcessInstanceId
Description copied from interface:BaseJobQuery
Order by process instance id (needs to be followed byQuery.asc()
orQuery.desc()
).- Specified by:
orderByProcessInstanceId
in interfaceBaseJobQuery<JobQuery,
Job>
-
orderByJobRetries
Description copied from interface:BaseJobQuery
Order by retries (needs to be followed byQuery.asc()
orQuery.desc()
).- Specified by:
orderByJobRetries
in interfaceBaseJobQuery<JobQuery,
Job>
-
orderByTenantId
Description copied from interface:BaseJobQuery
Order by tenant id (needs to be followed byQuery.asc()
orQuery.desc()
).- Specified by:
orderByTenantId
in interfaceBaseJobQuery<JobQuery,
Job>
-
executeCount
- Specified by:
executeCount
in classAbstractQuery<JobQuery,
Job>
-
executeList
Description copied from class:AbstractQuery
Executes the actual query to retrieve the list of results.- Specified by:
executeList
in classAbstractQuery<JobQuery,
Job>
-
getProcessInstanceId
-
isWithoutProcessInstanceId
public boolean isWithoutProcessInstanceId() -
getExecutionId
-
getHandlerType
-
getHandlerTypes
-
getNow
-
isWithException
public boolean isWithException() -
getExceptionMessage
-
getTenantId
-
getTenantIdLike
-
isWithoutTenantId
public boolean isWithoutTenantId() -
getId
-
getProcessDefinitionId
-
getProcessDefinitionKey
-
getCategory
-
getCategoryLike
-
getElementId
-
getElementName
-
getScopeId
-
isWithoutScopeId
public boolean isWithoutScopeId() -
getSubScopeId
-
getScopeType
-
getScopeDefinitionId
-
getCaseDefinitionKey
-
getCorrelationId
-
isOnlyTimers
public boolean isOnlyTimers() -
isOnlyMessages
public boolean isOnlyMessages() -
getDuedateHigherThan
-
getDuedateLowerThan
-
getDuedateHigherThanOrEqual
-
getDuedateLowerThanOrEqual
-
getLockOwner
-
isOnlyLocked
public boolean isOnlyLocked() -
isOnlyUnlocked
public boolean isOnlyUnlocked() -
isWithoutScopeType
public boolean isWithoutScopeType()
-