org.camunda.bpm.engine.impl
Class JobQueryImpl

java.lang.Object
  extended by org.camunda.bpm.engine.impl.db.AuthorizationCheck
      extended by org.camunda.bpm.engine.impl.db.ListQueryParameterObject
          extended by org.camunda.bpm.engine.impl.AbstractQuery<JobQuery,Job>
              extended by org.camunda.bpm.engine.impl.JobQueryImpl
All Implemented Interfaces:
Serializable, Command<Object>, Query<JobQuery,Job>, JobQuery

public class JobQueryImpl
extends AbstractQuery<JobQuery,Job>
implements JobQuery, Serializable

Author:
Joram Barrez, Tom Baeyens, Falko Menge
See Also:
Serialized Form

Field Summary
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  String jobDefinitionId
           
protected  boolean noRetriesLeft
           
protected  boolean onlyMessages
           
protected  boolean onlyTimers
           
protected  String processDefinitionId
           
protected  String processDefinitionKey
           
protected  String processInstanceId
           
protected  boolean retriesLeft
           
protected  SuspensionState suspensionState
           
protected  boolean withException
           
 
Fields inherited from class org.camunda.bpm.engine.impl.AbstractQuery
commandContext, commandExecutor, expressions, orderingProperties, resultType, SORTORDER_ASC, SORTORDER_DESC
 
Fields inherited from class org.camunda.bpm.engine.impl.db.ListQueryParameterObject
databaseType, DEFAULT_ORDER_BY, firstResult, maxResults, orderBy, parameter
 
Fields inherited from class org.camunda.bpm.engine.impl.db.AuthorizationCheck
authDefaultPerm, authGroupIds, authUserId, isAuthorizationCheckEnabled, permissionChecks
 
Constructor Summary
JobQueryImpl()
           
JobQueryImpl(CommandContext commandContext)
           
JobQueryImpl(CommandExecutor commandExecutor)
           
 
Method Summary
 JobQuery active()
           
 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()
           
 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 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 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()
           
 JobQuery timers()
          Only select jobs that are timers.
 JobQuery withException()
          Only select jobs that failed due to an exception.
 JobQuery withRetriesLeft()
          Only select jobs which have retries left
 
Methods inherited from class org.camunda.bpm.engine.impl.AbstractQuery
addExpression, asc, checkQueryOk, count, desc, direction, evaluateExpressions, evaluateExpressionsAndExecuteCount, evaluateExpressionsAndExecuteList, execute, executeSingleResult, extend, getExpressions, getMethod, getOrderBy, getOrderingProperties, list, listPage, mergeExpressions, mergeOrdering, orderBy, orderBy, setCommandExecutor, setExpressions, setOrderingProperties, singleResult
 
Methods inherited from class org.camunda.bpm.engine.impl.db.ListQueryParameterObject
getDatabaseType, getFirstResult, getFirstRow, getLastRow, getMaxResults, getParameter, setDatabaseType, setFirstResult, setMaxResults, setOrderBy, setParameter
 
Methods inherited from class org.camunda.bpm.engine.impl.db.AuthorizationCheck
addPermissionCheck, getAuthDefaultPerm, getAuthGroupIds, getAuthUserId, getPermissionChecks, isAuthorizationCheckEnabled, setAuthDefaultPerm, setAuthGroupIds, setAuthorizationCheckEnabled, setAuthUserId, setPermissionChecks
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.camunda.bpm.engine.query.Query
asc, count, desc, list, listPage, singleResult
 

Field Detail

activityId

protected String activityId

id

protected String id

jobDefinitionId

protected String jobDefinitionId

processInstanceId

protected String processInstanceId

executionId

protected String executionId

processDefinitionId

protected String processDefinitionId

processDefinitionKey

protected String processDefinitionKey

retriesLeft

protected boolean retriesLeft

executable

protected boolean executable

onlyTimers

protected boolean onlyTimers

onlyMessages

protected boolean onlyMessages

duedateHigherThan

protected Date duedateHigherThan

duedateLowerThan

protected Date duedateLowerThan

duedateHigherThanOrEqual

protected Date duedateHigherThanOrEqual

duedateLowerThanOrEqual

protected Date duedateLowerThanOrEqual

withException

protected boolean withException

exceptionMessage

protected String exceptionMessage

noRetriesLeft

protected boolean noRetriesLeft

suspensionState

protected SuspensionState suspensionState
Constructor Detail

JobQueryImpl

public JobQueryImpl()

JobQueryImpl

public JobQueryImpl(CommandContext commandContext)

JobQueryImpl

public JobQueryImpl(CommandExecutor commandExecutor)
Method Detail

jobId

public JobQuery jobId(String jobId)
Description copied from interface: JobQuery
Only select jobs with the given id

Specified by:
jobId in interface JobQuery

jobDefinitionId

public JobQuery jobDefinitionId(String jobDefinitionId)
Description copied from interface: JobQuery
Only select jobs which exist for the given job definition id.

Specified by:
jobDefinitionId in interface JobQuery

processInstanceId

public JobQueryImpl processInstanceId(String processInstanceId)
Description copied from interface: JobQuery
Only select jobs which exist for the given process instance.

Specified by:
processInstanceId in interface JobQuery

executionId

public JobQueryImpl executionId(String executionId)
Description copied from interface: JobQuery
Only select jobs which exist for the given execution

Specified by:
executionId in interface JobQuery

processDefinitionId

public JobQuery processDefinitionId(String processDefinitionId)
Description copied from interface: JobQuery
Only select jobs which exist for the given process definition id.

Specified by:
processDefinitionId in interface JobQuery

processDefinitionKey

public JobQuery processDefinitionKey(String processDefinitionKey)
Description copied from interface: JobQuery
Only select jobs which exist for the given process definition key.

Specified by:
processDefinitionKey in interface JobQuery

activityId

public JobQuery activityId(String activityId)
Description copied from interface: JobQuery
Only select jobs which are defined on an activity with the given id.

Specified by:
activityId in interface JobQuery

withRetriesLeft

public JobQuery withRetriesLeft()
Description copied from interface: JobQuery
Only select jobs which have retries left

Specified by:
withRetriesLeft in interface JobQuery

executable

public JobQuery executable()
Description copied from interface: JobQuery
Only select jobs which are executable, ie. retries > 0 and duedate is null or duedate is in the past

Specified by:
executable in interface JobQuery

timers

public JobQuery timers()
Description copied from interface: JobQuery
Only select jobs that are timers. Cannot be used together with JobQuery.messages()

Specified by:
timers in interface JobQuery

messages

public JobQuery messages()
Description copied from interface: JobQuery
Only select jobs that are messages. Cannot be used together with JobQuery.timers()

Specified by:
messages in interface JobQuery

duedateHigherThan

public JobQuery duedateHigherThan(Date date)
Description copied from interface: JobQuery
Only select jobs where the duedate is higher then the given date.

Specified by:
duedateHigherThan in interface JobQuery

duedateLowerThan

public JobQuery duedateLowerThan(Date date)
Description copied from interface: JobQuery
Only select jobs where the duedate is lower than the given date.

Specified by:
duedateLowerThan in interface JobQuery

duedateHigherThen

public JobQuery duedateHigherThen(Date date)
Description copied from interface: JobQuery
Only select jobs where the duedate is higher then the given date.

Specified by:
duedateHigherThen in interface JobQuery

duedateHigherThenOrEquals

public JobQuery duedateHigherThenOrEquals(Date date)
Description copied from interface: JobQuery
Only select jobs where the duedate is higher then or equals the given date.

Specified by:
duedateHigherThenOrEquals in interface JobQuery

duedateLowerThen

public JobQuery duedateLowerThen(Date date)
Description copied from interface: JobQuery
Only select jobs where the duedate is lower then the given date.

Specified by:
duedateLowerThen in interface JobQuery

duedateLowerThenOrEquals

public JobQuery duedateLowerThenOrEquals(Date date)
Description copied from interface: JobQuery
Only select jobs where the duedate is lower then or equals the given date.

Specified by:
duedateLowerThenOrEquals in interface JobQuery

withException

public JobQuery withException()
Description copied from interface: JobQuery
Only select jobs that failed due to an exception.

Specified by:
withException in interface JobQuery

exceptionMessage

public JobQuery exceptionMessage(String exceptionMessage)
Description copied from interface: JobQuery
Only select jobs that failed due to an exception with the given message.

Specified by:
exceptionMessage in interface JobQuery

noRetriesLeft

public JobQuery noRetriesLeft()
Description copied from interface: JobQuery
Only select jobs which have no retries left

Specified by:
noRetriesLeft in interface JobQuery

active

public JobQuery active()
Specified by:
active in interface JobQuery

suspended

public JobQuery suspended()
Specified by:
suspended in interface JobQuery

orderByJobDuedate

public JobQuery orderByJobDuedate()
Description copied from interface: JobQuery
Order by duedate (needs to be followed by Query.asc() or Query.desc()).

Specified by:
orderByJobDuedate in interface JobQuery

orderByExecutionId

public JobQuery orderByExecutionId()
Description copied from interface: JobQuery
Order by execution id (needs to be followed by Query.asc() or Query.desc()).

Specified by:
orderByExecutionId in interface JobQuery

orderByJobId

public JobQuery orderByJobId()
Description copied from interface: JobQuery
Order by job id (needs to be followed by Query.asc() or Query.desc()).

Specified by:
orderByJobId in interface JobQuery

orderByProcessInstanceId

public JobQuery orderByProcessInstanceId()
Description copied from interface: JobQuery
Order by process instance id (needs to be followed by Query.asc() or Query.desc()).

Specified by:
orderByProcessInstanceId in interface JobQuery

orderByProcessDefinitionId

public JobQuery orderByProcessDefinitionId()
Description copied from interface: JobQuery
Order by process definition id (needs to be followed by Query.asc() or Query.desc()).

Specified by:
orderByProcessDefinitionId in interface JobQuery

orderByProcessDefinitionKey

public JobQuery orderByProcessDefinitionKey()
Description copied from interface: JobQuery
Order by process definition key (needs to be followed by Query.asc() or Query.desc()).

Specified by:
orderByProcessDefinitionKey in interface JobQuery

orderByJobRetries

public JobQuery orderByJobRetries()
Description copied from interface: JobQuery
Order by retries (needs to be followed by Query.asc() or Query.desc()).

Specified by:
orderByJobRetries in interface JobQuery

executeCount

public long executeCount(CommandContext commandContext)
Specified by:
executeCount in class AbstractQuery<JobQuery,Job>

executeList

public List<Job> executeList(CommandContext commandContext,
                             Page page)
Description copied from class: AbstractQuery
Executes the actual query to retrieve the list of results.

Specified by:
executeList in class AbstractQuery<JobQuery,Job>
page - used if the results must be paged. If null, no paging will be applied.

getProcessInstanceId

public String getProcessInstanceId()

getExecutionId

public String getExecutionId()

getRetriesLeft

public boolean getRetriesLeft()

getExecutable

public boolean getExecutable()

getNow

public Date getNow()

isWithException

public boolean isWithException()

getExceptionMessage

public String getExceptionMessage()


Copyright © 2015 camunda services GmbH. All rights reserved.