org.camunda.bpm.engine.impl
Class ExecutionQueryImpl

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<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

Field Summary
protected  String activityId
           
protected  List<EventSubscriptionQueryValue> eventSubscriptions
           
protected  String executionId
           
protected  String processDefinitionId
           
protected  String processDefinitionKey
           
protected  String processInstanceId
           
protected  String subProcessInstanceId
           
protected  String superProcessInstanceId
           
protected  SuspensionState suspensionState
           
 
Fields inherited from class org.camunda.bpm.engine.impl.AbstractVariableQueryImpl
queryVariableValues
 
Fields inherited from class org.camunda.bpm.engine.impl.AbstractQuery
commandContext, commandExecutor, orderBy, orderProperty, resultType, SORTORDER_ASC, SORTORDER_DESC
 
Fields inherited from class org.camunda.bpm.engine.impl.db.ListQueryParameterObject
databaseType, firstResult, maxResults, parameter
 
Fields inherited from class org.camunda.bpm.engine.impl.db.AuthorizationCheck
authDefaultPerm, authGroupIds, authPerms, authResourceId, authResourceIdQueryParam, authResourceType, authUserId, isAuthorizationCheckEnabled
 
Constructor Summary
ExecutionQueryImpl()
           
ExecutionQueryImpl(CommandContext commandContext)
           
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(String 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()
           
 boolean getOnlyProcessInstances()
           
 String getProcessDefinitionId()
           
 String getProcessDefinitionKey()
           
 String getProcessInstanceId()
           
 String getProcessInstanceIds()
           
 String getSubProcessInstanceId()
           
 String getSuperProcessInstanceId()
           
 SuspensionState getSuspensionState()
           
 boolean isProcessInstancesOnly()
           
 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()).
 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.
 
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
addOrder, asc, assertParamNotNull, assertParamNotNull, checkQueryOk, count, desc, direction, execute, executeSingleResult, getOrderBy, list, listPage, orderBy, setCommandExecutor, singleResult
 
Methods inherited from class org.camunda.bpm.engine.impl.db.ListQueryParameterObject
getDatabaseType, getFirstResult, getFirstRow, getLastRow, getMaxResults, getParameter, setDatabaseType, setFirstResult, setMaxResults, setParameter
 
Methods inherited from class org.camunda.bpm.engine.impl.db.AuthorizationCheck
getAuthDefaultPerm, getAuthGroupIds, getAuthPerms, getAuthResourceId, getAuthResourceIdQueryParam, getAuthResourceType, getAuthUserId, isAuthorizationCheckEnabled, setAuthDefaultPerm, setAuthGroupIds, setAuthorizationCheckEnabled, setAuthPerms, setAuthResourceId, setAuthResourceIdQueryParam, setAuthResourceType, setAuthUserId
 
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

activityId

protected String activityId

executionId

protected String executionId

processInstanceId

protected String processInstanceId

eventSubscriptions

protected List<EventSubscriptionQueryValue> eventSubscriptions

suspensionState

protected SuspensionState suspensionState

superProcessInstanceId

protected String superProcessInstanceId

subProcessInstanceId

protected String subProcessInstanceId
Constructor Detail

ExecutionQueryImpl

public ExecutionQueryImpl()

ExecutionQueryImpl

public ExecutionQueryImpl(CommandContext commandContext)

ExecutionQueryImpl

public ExecutionQueryImpl(CommandExecutor commandExecutor)
Method Detail

isProcessInstancesOnly

public boolean isProcessInstancesOnly()

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

eventSubscription

public ExecutionQuery eventSubscription(String 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

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

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.

getOnlyProcessInstances

public boolean getOnlyProcessInstances()

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()

getSuperProcessInstanceId

public String getSuperProcessInstanceId()

getSubProcessInstanceId

public String getSubProcessInstanceId()

getSuspensionState

public SuspensionState getSuspensionState()

setSuspensionState

public void setSuspensionState(SuspensionState suspensionState)

getEventSubscriptions

public List<EventSubscriptionQueryValue> getEventSubscriptions()

setEventSubscriptions

public void setEventSubscriptions(List<EventSubscriptionQueryValue> eventSubscriptions)


Copyright © 2014 camunda services GmbH. All Rights Reserved.