org.camunda.bpm.engine.impl
Class ExecutionQueryImpl

java.lang.Object
  extended by org.camunda.bpm.engine.impl.db.ListQueryParameterObject
      extended by org.camunda.bpm.engine.impl.AbstractQuery<T,U>
          extended by org.camunda.bpm.engine.impl.AbstractVariableQueryImpl<ExecutionQuery,Execution>
              extended by org.camunda.bpm.engine.impl.ExecutionQueryImpl
All Implemented Interfaces:
Serializable, Command<Object>, Query<ExecutionQuery,Execution>, ExecutionQuery

public class ExecutionQueryImpl
extends AbstractVariableQueryImpl<ExecutionQuery,Execution>
implements ExecutionQuery

Author:
Joram Barrez, Frederik Heremans, Daniel Meyer
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.camunda.bpm.engine.impl.AbstractQuery
AbstractQuery.ResultType
 
Field Summary
protected  String activityId
           
protected  String businessKey
           
protected  List<EventSubscriptionQueryValue> eventSubscriptions
           
protected  String executionId
           
protected  String incidentId
           
protected  String incidentMessage
           
protected  String incidentMessageLike
           
protected  String incidentType
           
protected  boolean isTenantIdSet
           
protected  String processDefinitionId
           
protected  String processDefinitionKey
           
protected  String processInstanceId
           
protected  SuspensionState suspensionState
           
protected  String[] tenantIds
           
 
Fields inherited from class org.camunda.bpm.engine.impl.AbstractVariableQueryImpl
queryVariableValues
 
Fields inherited from class org.camunda.bpm.engine.impl.AbstractQuery
commandExecutor, expressions, resultType, SORTORDER_ASC, SORTORDER_DESC, validators
 
Fields inherited from class org.camunda.bpm.engine.impl.db.ListQueryParameterObject
authCheck, databaseType, firstResult, maxResults, orderingProperties, parameter, tenantCheck
 
Constructor Summary
ExecutionQueryImpl()
           
ExecutionQueryImpl(CommandExecutor commandExecutor)
           
 
Method Summary
 ExecutionQuery active()
          Only selects executions which are active (i.e.
 ExecutionQueryImpl activityId(String activityId)
          Only select executions which contain an activity with the given id.
 ExecutionQuery eventSubscription(EventType eventType, String eventName)
           
 long executeCount(CommandContext commandContext)
           
 List<Execution> executeList(CommandContext commandContext, Page page)
          Executes the actual query to retrieve the list of results.
 ExecutionQueryImpl executionId(String executionId)
          Only select executions with the given id.
 String getActivityId()
           
 String getBusinessKey()
           
 List<EventSubscriptionQueryValue> getEventSubscriptions()
           
 String getExecutionId()
           
 String getIncidentId()
           
 String getIncidentMessage()
           
 String getIncidentMessageLike()
           
 String getIncidentType()
           
 String getProcessDefinitionId()
           
 String getProcessDefinitionKey()
           
 String getProcessInstanceId()
           
 String getProcessInstanceIds()
           
 SuspensionState getSuspensionState()
           
 ExecutionQuery incidentId(String incidentId)
          Only selects executions with the given incident id.
 ExecutionQuery incidentMessage(String incidentMessage)
          Only selects executions with the given incident message.
 ExecutionQuery incidentMessageLike(String incidentMessageLike)
          Only selects executions with an incident message like the given.
 ExecutionQuery incidentType(String incidentType)
          Only selects executions with the given incident type.
 ExecutionQuery messageEventSubscription()
          Only select executions that have a message event subscription.
 ExecutionQuery messageEventSubscriptionName(String messageName)
          Only select executions which have a message event subscription for the given messageName.
 ExecutionQueryImpl orderByProcessDefinitionId()
          Order by process definition id (needs to be followed by Query.asc() or Query.desc()).
 ExecutionQueryImpl orderByProcessDefinitionKey()
          Order by process definition key (needs to be followed by Query.asc() or Query.desc()).
 ExecutionQueryImpl orderByProcessInstanceId()
          Order by id (needs to be followed by Query.asc() or Query.desc()).
 ExecutionQuery orderByTenantId()
          Order by tenant id (needs to be followed by Query.asc() or Query.desc()).
 ExecutionQueryImpl processDefinitionId(String processDefinitionId)
          Only select executions which have the given process definition id.
 ExecutionQueryImpl processDefinitionKey(String processDefinitionKey)
          Only select executions which have the given process definition key.
 ExecutionQuery processInstanceBusinessKey(String businessKey)
          Only select executions that belong to a process instance with the given business key
 ExecutionQueryImpl processInstanceId(String processInstanceId)
          Only select executions which have the given process instance id.
 ExecutionQuery processVariableValueEquals(String variableName, Object variableValue)
          Only select executions which are part of a process that have a variable with the given name set to the given value.
 ExecutionQuery processVariableValueNotEquals(String variableName, Object variableValue)
          Only select executions which are part of a process that have a variable with the given name, but with a different value than the passed value.
 void setEventSubscriptions(List<EventSubscriptionQueryValue> eventSubscriptions)
           
 void setSuspensionState(SuspensionState suspensionState)
           
 ExecutionQuery signalEventSubscription(String signalName)
           
 ExecutionQuery signalEventSubscriptionName(String signalName)
          Only select executions which have a signal event subscription for the given signal name.
 ExecutionQuery suspended()
          Only selects executions which are suspended, because their process instance is suspended.
 ExecutionQuery tenantIdIn(String... tenantIds)
          Only selects executions with one of the given tenant ids.
 ExecutionQuery withoutTenantId()
          Only selects executions which have no tenant id.
 
Methods inherited from class org.camunda.bpm.engine.impl.AbstractVariableQueryImpl
addVariable, ensureVariablesInitialized, getQueryVariableValues, variableValueEquals, variableValueGreaterThan, variableValueGreaterThanOrEqual, variableValueLessThan, variableValueLessThanOrEqual, variableValueLike, variableValueNotEquals
 
Methods inherited from class org.camunda.bpm.engine.impl.AbstractQuery
addExpression, addValidator, asc, checkQueryOk, count, desc, direction, evaluateExpressions, evaluateExpressionsAndExecuteCount, evaluateExpressionsAndExecuteIdsList, evaluateExpressionsAndExecuteList, execute, executeIdsList, executeSingleResult, extend, getExpressions, getMethod, hasExcludingConditions, list, listIds, listPage, mergeExpressions, mergeOrdering, orderBy, orderBy, removeValidator, setCommandExecutor, setExpressions, singleResult, validate, validate
 
Methods 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, setTenantCheck
 
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.runtime.ExecutionQuery
variableValueEquals, variableValueGreaterThan, variableValueGreaterThanOrEqual, variableValueLessThan, variableValueLessThanOrEqual, variableValueLike, variableValueNotEquals
 
Methods inherited from interface org.camunda.bpm.engine.query.Query
asc, count, desc, list, listPage, singleResult
 

Field Detail

processDefinitionId

protected String processDefinitionId

processDefinitionKey

protected String processDefinitionKey

businessKey

protected String businessKey

activityId

protected String activityId

executionId

protected String executionId

processInstanceId

protected String processInstanceId

eventSubscriptions

protected List<EventSubscriptionQueryValue> eventSubscriptions

suspensionState

protected SuspensionState suspensionState

incidentType

protected String incidentType

incidentId

protected String incidentId

incidentMessage

protected String incidentMessage

incidentMessageLike

protected String incidentMessageLike

isTenantIdSet

protected boolean isTenantIdSet

tenantIds

protected String[] tenantIds
Constructor Detail

ExecutionQueryImpl

public ExecutionQueryImpl()

ExecutionQueryImpl

public ExecutionQueryImpl(CommandExecutor commandExecutor)
Method Detail

processDefinitionId

public ExecutionQueryImpl processDefinitionId(String processDefinitionId)
Description copied from interface: ExecutionQuery
Only select executions which have the given process definition id.

Specified by:
processDefinitionId in interface ExecutionQuery

processDefinitionKey

public ExecutionQueryImpl processDefinitionKey(String processDefinitionKey)
Description copied from interface: ExecutionQuery
Only select executions which have the given process definition key.

Specified by:
processDefinitionKey in interface ExecutionQuery

processInstanceId

public ExecutionQueryImpl processInstanceId(String processInstanceId)
Description copied from interface: ExecutionQuery
Only select executions which have the given process instance id.

Specified by:
processInstanceId in interface ExecutionQuery

processInstanceBusinessKey

public ExecutionQuery processInstanceBusinessKey(String businessKey)
Description copied from interface: ExecutionQuery
Only select executions that belong to a process instance with the given business key

Specified by:
processInstanceBusinessKey in interface ExecutionQuery

executionId

public ExecutionQueryImpl executionId(String executionId)
Description copied from interface: ExecutionQuery
Only select executions with the given id.

Specified by:
executionId in interface ExecutionQuery

activityId

public ExecutionQueryImpl activityId(String activityId)
Description copied from interface: ExecutionQuery
Only select executions which contain an activity with the given id.

Specified by:
activityId in interface ExecutionQuery

signalEventSubscription

public ExecutionQuery signalEventSubscription(String signalName)
Specified by:
signalEventSubscription in interface ExecutionQuery
See Also:
ExecutionQuery.signalEventSubscriptionName(String)

signalEventSubscriptionName

public ExecutionQuery signalEventSubscriptionName(String signalName)
Description copied from interface: ExecutionQuery
Only select executions which have a signal event subscription for the given signal name. (The signalName is specified using the 'name' attribute of the signal element in the BPMN 2.0 XML.)

Specified by:
signalEventSubscriptionName in interface ExecutionQuery
Parameters:
signalName - the name of the signal the execution has subscribed to

messageEventSubscriptionName

public ExecutionQuery messageEventSubscriptionName(String messageName)
Description copied from interface: ExecutionQuery
Only select executions which have a message event subscription for the given messageName. (The messageName is specified using the 'name' attribute of the message element in the BPMN 2.0 XML.)

Specified by:
messageEventSubscriptionName in interface ExecutionQuery
Parameters:
messageName - the name of the message the execution has subscribed to

messageEventSubscription

public ExecutionQuery messageEventSubscription()
Description copied from interface: ExecutionQuery
Only select executions that have a message event subscription. Use ExecutionQuery.messageEventSubscriptionName(String) to filter for executions with message event subscriptions with a certain name.

Specified by:
messageEventSubscription in interface ExecutionQuery

eventSubscription

public ExecutionQuery eventSubscription(EventType eventType,
                                        String eventName)

suspended

public ExecutionQuery suspended()
Description copied from interface: ExecutionQuery
Only selects executions which are suspended, because their process instance is suspended.

Specified by:
suspended in interface ExecutionQuery

active

public ExecutionQuery active()
Description copied from interface: ExecutionQuery
Only selects executions which are active (i.e. not suspended).

Specified by:
active in interface ExecutionQuery

processVariableValueEquals

public ExecutionQuery processVariableValueEquals(String variableName,
                                                 Object variableValue)
Description copied from interface: ExecutionQuery
Only select executions which are part of a process that have a variable with the given name set to the given value.

Specified by:
processVariableValueEquals in interface ExecutionQuery

processVariableValueNotEquals

public ExecutionQuery processVariableValueNotEquals(String variableName,
                                                    Object variableValue)
Description copied from interface: ExecutionQuery
Only select executions which are part of a process that have a variable with the given name, but with a different value than the passed value. Byte-arrays and Serializable objects (which are not primitive type wrappers) are not supported.

Specified by:
processVariableValueNotEquals in interface ExecutionQuery

incidentType

public ExecutionQuery incidentType(String incidentType)
Description copied from interface: ExecutionQuery
Only selects executions with the given incident type.

Specified by:
incidentType in interface ExecutionQuery

incidentId

public ExecutionQuery incidentId(String incidentId)
Description copied from interface: ExecutionQuery
Only selects executions with the given incident id.

Specified by:
incidentId in interface ExecutionQuery

incidentMessage

public ExecutionQuery incidentMessage(String incidentMessage)
Description copied from interface: ExecutionQuery
Only selects executions with the given incident message.

Specified by:
incidentMessage in interface ExecutionQuery

incidentMessageLike

public ExecutionQuery incidentMessageLike(String incidentMessageLike)
Description copied from interface: ExecutionQuery
Only selects executions with an incident message like the given.

Specified by:
incidentMessageLike in interface ExecutionQuery

tenantIdIn

public ExecutionQuery tenantIdIn(String... tenantIds)
Description copied from interface: ExecutionQuery
Only selects executions with one of the given tenant ids.

Specified by:
tenantIdIn in interface ExecutionQuery

withoutTenantId

public ExecutionQuery withoutTenantId()
Description copied from interface: ExecutionQuery
Only selects executions which have no tenant id.

Specified by:
withoutTenantId in interface ExecutionQuery

orderByProcessInstanceId

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

Specified by:
orderByProcessInstanceId in interface ExecutionQuery

orderByProcessDefinitionId

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

Specified by:
orderByProcessDefinitionId in interface ExecutionQuery

orderByProcessDefinitionKey

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

Specified by:
orderByProcessDefinitionKey in interface ExecutionQuery

orderByTenantId

public ExecutionQuery orderByTenantId()
Description copied from interface: ExecutionQuery
Order by tenant id (needs to be followed by Query.asc() or Query.desc()). Note that the ordering of executions without tenant id is database-specific.

Specified by:
orderByTenantId in interface ExecutionQuery

executeCount

public long executeCount(CommandContext commandContext)
Specified by:
executeCount in class AbstractVariableQueryImpl<ExecutionQuery,Execution>

executeList

public List<Execution> 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 AbstractVariableQueryImpl<ExecutionQuery,Execution>
page - used if the results must be paged. If null, no paging will be applied.

getProcessDefinitionKey

public String getProcessDefinitionKey()

getProcessDefinitionId

public String getProcessDefinitionId()

getActivityId

public String getActivityId()

getProcessInstanceId

public String getProcessInstanceId()

getProcessInstanceIds

public String getProcessInstanceIds()

getBusinessKey

public String getBusinessKey()

getExecutionId

public String getExecutionId()

getSuspensionState

public SuspensionState getSuspensionState()

setSuspensionState

public void setSuspensionState(SuspensionState suspensionState)

getEventSubscriptions

public List<EventSubscriptionQueryValue> getEventSubscriptions()

setEventSubscriptions

public void setEventSubscriptions(List<EventSubscriptionQueryValue> eventSubscriptions)

getIncidentId

public String getIncidentId()

getIncidentType

public String getIncidentType()

getIncidentMessage

public String getIncidentMessage()

getIncidentMessageLike

public String getIncidentMessageLike()


Copyright © 2017 camunda services GmbH. All rights reserved.