Package org.camunda.bpm.engine.impl
Class ExecutionQueryImpl
- java.lang.Object
-
- org.camunda.bpm.engine.impl.db.ListQueryParameterObject
-
- org.camunda.bpm.engine.impl.AbstractQuery<T,U>
-
- org.camunda.bpm.engine.impl.AbstractVariableQueryImpl<ExecutionQuery,Execution>
-
- org.camunda.bpm.engine.impl.ExecutionQueryImpl
-
- All Implemented Interfaces:
java.io.Serializable,Command<java.lang.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
Fields Modifier and Type Field Description protected java.lang.StringactivityIdprotected java.lang.StringbusinessKeyprotected java.util.List<EventSubscriptionQueryValue>eventSubscriptionsprotected java.lang.StringexecutionIdprotected java.lang.StringincidentIdprotected java.lang.StringincidentMessageprotected java.lang.StringincidentMessageLikeprotected java.lang.StringincidentTypeprotected booleanisTenantIdSetprotected java.lang.StringprocessDefinitionIdprotected java.lang.StringprocessDefinitionKeyprotected java.lang.StringprocessInstanceIdprotected SuspensionStatesuspensionStateprotected java.lang.String[]tenantIds-
Fields inherited from class org.camunda.bpm.engine.impl.AbstractVariableQueryImpl
queryVariableValues, variableNamesIgnoreCase, variableValuesIgnoreCase
-
Fields inherited from class org.camunda.bpm.engine.impl.AbstractQuery
commandExecutor, expressions, maxResultsLimitEnabled, 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
Constructors Constructor Description ExecutionQueryImpl()ExecutionQueryImpl(CommandExecutor commandExecutor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExecutionQueryactive()Only selects executions which are active (i.e.ExecutionQueryImplactivityId(java.lang.String activityId)Only select executions which contain an activity with the given id.ExecutionQueryeventSubscription(EventType eventType, java.lang.String eventName)longexecuteCount(CommandContext commandContext)java.util.List<Execution>executeList(CommandContext commandContext, Page page)Executes the actual query to retrieve the list of results.ExecutionQueryImplexecutionId(java.lang.String executionId)Only select executions with the given id.java.lang.StringgetActivityId()java.lang.StringgetBusinessKey()java.util.List<EventSubscriptionQueryValue>getEventSubscriptions()java.lang.StringgetExecutionId()java.lang.StringgetIncidentId()java.lang.StringgetIncidentMessage()java.lang.StringgetIncidentMessageLike()java.lang.StringgetIncidentType()java.lang.StringgetProcessDefinitionId()java.lang.StringgetProcessDefinitionKey()java.lang.StringgetProcessInstanceId()java.lang.StringgetProcessInstanceIds()SuspensionStategetSuspensionState()ExecutionQueryincidentId(java.lang.String incidentId)Only selects executions with the given incident id.ExecutionQueryincidentMessage(java.lang.String incidentMessage)Only selects executions with the given incident message.ExecutionQueryincidentMessageLike(java.lang.String incidentMessageLike)Only selects executions with an incident message like the given.ExecutionQueryincidentType(java.lang.String incidentType)Only selects executions with the given incident type.ExecutionQuerymessageEventSubscription()Only select executions that have a message event subscription.ExecutionQuerymessageEventSubscriptionName(java.lang.String messageName)Only select executions which have a message event subscription for the given messageName.ExecutionQueryImplorderByProcessDefinitionId()Order by process definition id (needs to be followed byQuery.asc()orQuery.desc()).ExecutionQueryImplorderByProcessDefinitionKey()Order by process definition key (needs to be followed byQuery.asc()orQuery.desc()).ExecutionQueryImplorderByProcessInstanceId()Order by id (needs to be followed byQuery.asc()orQuery.desc()).ExecutionQueryorderByTenantId()Order by tenant id (needs to be followed byQuery.asc()orQuery.desc()).ExecutionQueryImplprocessDefinitionId(java.lang.String processDefinitionId)Only select executions which have the given process definition id.ExecutionQueryImplprocessDefinitionKey(java.lang.String processDefinitionKey)Only select executions which have the given process definition key.ExecutionQueryprocessInstanceBusinessKey(java.lang.String businessKey)Only select executions that belong to a process instance with the given business keyExecutionQueryImplprocessInstanceId(java.lang.String processInstanceId)Only select executions which have the given process instance id.ExecutionQueryprocessVariableValueEquals(java.lang.String variableName, java.lang.Object variableValue)Only select executions which are part of a process that have a variable with the given name set to the given value.ExecutionQueryprocessVariableValueNotEquals(java.lang.String variableName, java.lang.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.voidsetEventSubscriptions(java.util.List<EventSubscriptionQueryValue> eventSubscriptions)voidsetSuspensionState(SuspensionState suspensionState)ExecutionQuerysignalEventSubscription(java.lang.String signalName)ExecutionQuerysignalEventSubscriptionName(java.lang.String signalName)Only select executions which have a signal event subscription for the given signal name.ExecutionQuerysuspended()Only selects executions which are suspended, because their process instance is suspended.ExecutionQuerytenantIdIn(java.lang.String... tenantIds)Only selects executions with one of the given tenant ids.ExecutionQuerywithoutTenantId()Only selects executions which have no tenant id.-
Methods inherited from class org.camunda.bpm.engine.impl.AbstractVariableQueryImpl
addVariable, createQueryVariableValue, ensureVariablesInitialized, getQueryVariableValues, isVariableNamesIgnoreCase, isVariableValuesIgnoreCase, matchVariableNamesIgnoreCase, matchVariableValuesIgnoreCase, validateVariable, variableValueEquals, variableValueGreaterThan, variableValueGreaterThanOrEqual, variableValueLessThan, variableValueLessThanOrEqual, variableValueLike, variableValueNotEquals, variableValueNotLike
-
Methods inherited from class org.camunda.bpm.engine.impl.AbstractQuery
addExpression, addValidator, asc, checkMaxResultsLimit, checkQueryOk, count, desc, direction, disableMaxResultsLimit, enableMaxResultsLimit, evaluateExpressions, evaluateExpressionsAndExecuteCount, evaluateExpressionsAndExecuteDeploymentIdMappingsList, evaluateExpressionsAndExecuteIdsList, evaluateExpressionsAndExecuteList, execute, executeDeploymentIdMappingsList, executeIdsList, executeResult, executeSingleResult, extend, getExpressions, getMethod, hasExcludingConditions, list, listDeploymentIdMappings, listIds, listPage, mergeExpressions, mergeOrdering, orderBy, orderBy, removeValidator, setCommandExecutor, setExpressions, singleResult, unlimitedList, 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.impl.interceptor.Command
isRetryable
-
Methods inherited from interface org.camunda.bpm.engine.runtime.ExecutionQuery
matchVariableNamesIgnoreCase, matchVariableValuesIgnoreCase, variableValueEquals, variableValueGreaterThan, variableValueGreaterThanOrEqual, variableValueLessThan, variableValueLessThanOrEqual, variableValueLike, variableValueNotEquals
-
Methods inherited from interface org.camunda.bpm.engine.query.Query
asc, count, desc, list, listPage, singleResult, unlimitedList
-
-
-
-
Field Detail
-
processDefinitionId
protected java.lang.String processDefinitionId
-
processDefinitionKey
protected java.lang.String processDefinitionKey
-
businessKey
protected java.lang.String businessKey
-
activityId
protected java.lang.String activityId
-
executionId
protected java.lang.String executionId
-
processInstanceId
protected java.lang.String processInstanceId
-
eventSubscriptions
protected java.util.List<EventSubscriptionQueryValue> eventSubscriptions
-
suspensionState
protected SuspensionState suspensionState
-
incidentType
protected java.lang.String incidentType
-
incidentId
protected java.lang.String incidentId
-
incidentMessage
protected java.lang.String incidentMessage
-
incidentMessageLike
protected java.lang.String incidentMessageLike
-
isTenantIdSet
protected boolean isTenantIdSet
-
tenantIds
protected java.lang.String[] tenantIds
-
-
Constructor Detail
-
ExecutionQueryImpl
public ExecutionQueryImpl()
-
ExecutionQueryImpl
public ExecutionQueryImpl(CommandExecutor commandExecutor)
-
-
Method Detail
-
processDefinitionId
public ExecutionQueryImpl processDefinitionId(java.lang.String processDefinitionId)
Description copied from interface:ExecutionQueryOnly select executions which have the given process definition id.- Specified by:
processDefinitionIdin interfaceExecutionQuery
-
processDefinitionKey
public ExecutionQueryImpl processDefinitionKey(java.lang.String processDefinitionKey)
Description copied from interface:ExecutionQueryOnly select executions which have the given process definition key.- Specified by:
processDefinitionKeyin interfaceExecutionQuery
-
processInstanceId
public ExecutionQueryImpl processInstanceId(java.lang.String processInstanceId)
Description copied from interface:ExecutionQueryOnly select executions which have the given process instance id.- Specified by:
processInstanceIdin interfaceExecutionQuery
-
processInstanceBusinessKey
public ExecutionQuery processInstanceBusinessKey(java.lang.String businessKey)
Description copied from interface:ExecutionQueryOnly select executions that belong to a process instance with the given business key- Specified by:
processInstanceBusinessKeyin interfaceExecutionQuery
-
executionId
public ExecutionQueryImpl executionId(java.lang.String executionId)
Description copied from interface:ExecutionQueryOnly select executions with the given id.- Specified by:
executionIdin interfaceExecutionQuery
-
activityId
public ExecutionQueryImpl activityId(java.lang.String activityId)
Description copied from interface:ExecutionQueryOnly select executions which contain an activity with the given id.- Specified by:
activityIdin interfaceExecutionQuery
-
signalEventSubscription
public ExecutionQuery signalEventSubscription(java.lang.String signalName)
- Specified by:
signalEventSubscriptionin interfaceExecutionQuery- See Also:
ExecutionQuery.signalEventSubscriptionName(String)
-
signalEventSubscriptionName
public ExecutionQuery signalEventSubscriptionName(java.lang.String signalName)
Description copied from interface:ExecutionQueryOnly 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:
signalEventSubscriptionNamein interfaceExecutionQuery- Parameters:
signalName- the name of the signal the execution has subscribed to
-
messageEventSubscriptionName
public ExecutionQuery messageEventSubscriptionName(java.lang.String messageName)
Description copied from interface:ExecutionQueryOnly 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:
messageEventSubscriptionNamein interfaceExecutionQuery- Parameters:
messageName- the name of the message the execution has subscribed to
-
messageEventSubscription
public ExecutionQuery messageEventSubscription()
Description copied from interface:ExecutionQueryOnly select executions that have a message event subscription. UseExecutionQuery.messageEventSubscriptionName(String)to filter for executions with message event subscriptions with a certain name.- Specified by:
messageEventSubscriptionin interfaceExecutionQuery
-
eventSubscription
public ExecutionQuery eventSubscription(EventType eventType, java.lang.String eventName)
-
suspended
public ExecutionQuery suspended()
Description copied from interface:ExecutionQueryOnly selects executions which are suspended, because their process instance is suspended.- Specified by:
suspendedin interfaceExecutionQuery
-
active
public ExecutionQuery active()
Description copied from interface:ExecutionQueryOnly selects executions which are active (i.e. not suspended).- Specified by:
activein interfaceExecutionQuery
-
processVariableValueEquals
public ExecutionQuery processVariableValueEquals(java.lang.String variableName, java.lang.Object variableValue)
Description copied from interface:ExecutionQueryOnly select executions which are part of a process that have a variable with the given name set to the given value.- Specified by:
processVariableValueEqualsin interfaceExecutionQuery
-
processVariableValueNotEquals
public ExecutionQuery processVariableValueNotEquals(java.lang.String variableName, java.lang.Object variableValue)
Description copied from interface:ExecutionQueryOnly 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 andSerializableobjects (which are not primitive type wrappers) are not supported.- Specified by:
processVariableValueNotEqualsin interfaceExecutionQuery
-
incidentType
public ExecutionQuery incidentType(java.lang.String incidentType)
Description copied from interface:ExecutionQueryOnly selects executions with the given incident type.- Specified by:
incidentTypein interfaceExecutionQuery
-
incidentId
public ExecutionQuery incidentId(java.lang.String incidentId)
Description copied from interface:ExecutionQueryOnly selects executions with the given incident id.- Specified by:
incidentIdin interfaceExecutionQuery
-
incidentMessage
public ExecutionQuery incidentMessage(java.lang.String incidentMessage)
Description copied from interface:ExecutionQueryOnly selects executions with the given incident message.- Specified by:
incidentMessagein interfaceExecutionQuery
-
incidentMessageLike
public ExecutionQuery incidentMessageLike(java.lang.String incidentMessageLike)
Description copied from interface:ExecutionQueryOnly selects executions with an incident message like the given.- Specified by:
incidentMessageLikein interfaceExecutionQuery
-
tenantIdIn
public ExecutionQuery tenantIdIn(java.lang.String... tenantIds)
Description copied from interface:ExecutionQueryOnly selects executions with one of the given tenant ids.- Specified by:
tenantIdInin interfaceExecutionQuery
-
withoutTenantId
public ExecutionQuery withoutTenantId()
Description copied from interface:ExecutionQueryOnly selects executions which have no tenant id.- Specified by:
withoutTenantIdin interfaceExecutionQuery
-
orderByProcessInstanceId
public ExecutionQueryImpl orderByProcessInstanceId()
Description copied from interface:ExecutionQueryOrder by id (needs to be followed byQuery.asc()orQuery.desc()).- Specified by:
orderByProcessInstanceIdin interfaceExecutionQuery
-
orderByProcessDefinitionId
public ExecutionQueryImpl orderByProcessDefinitionId()
Description copied from interface:ExecutionQueryOrder by process definition id (needs to be followed byQuery.asc()orQuery.desc()).- Specified by:
orderByProcessDefinitionIdin interfaceExecutionQuery
-
orderByProcessDefinitionKey
public ExecutionQueryImpl orderByProcessDefinitionKey()
Description copied from interface:ExecutionQueryOrder by process definition key (needs to be followed byQuery.asc()orQuery.desc()).- Specified by:
orderByProcessDefinitionKeyin interfaceExecutionQuery
-
orderByTenantId
public ExecutionQuery orderByTenantId()
Description copied from interface:ExecutionQueryOrder by tenant id (needs to be followed byQuery.asc()orQuery.desc()). Note that the ordering of executions without tenant id is database-specific.- Specified by:
orderByTenantIdin interfaceExecutionQuery
-
executeCount
public long executeCount(CommandContext commandContext)
- Specified by:
executeCountin classAbstractVariableQueryImpl<ExecutionQuery,Execution>
-
executeList
public java.util.List<Execution> executeList(CommandContext commandContext, Page page)
Description copied from class:AbstractQueryExecutes the actual query to retrieve the list of results.- Specified by:
executeListin classAbstractVariableQueryImpl<ExecutionQuery,Execution>page- used if the results must be paged. If null, no paging will be applied.
-
getProcessDefinitionKey
public java.lang.String getProcessDefinitionKey()
-
getProcessDefinitionId
public java.lang.String getProcessDefinitionId()
-
getActivityId
public java.lang.String getActivityId()
-
getProcessInstanceId
public java.lang.String getProcessInstanceId()
-
getProcessInstanceIds
public java.lang.String getProcessInstanceIds()
-
getBusinessKey
public java.lang.String getBusinessKey()
-
getExecutionId
public java.lang.String getExecutionId()
-
getSuspensionState
public SuspensionState getSuspensionState()
-
setSuspensionState
public void setSuspensionState(SuspensionState suspensionState)
-
getEventSubscriptions
public java.util.List<EventSubscriptionQueryValue> getEventSubscriptions()
-
setEventSubscriptions
public void setEventSubscriptions(java.util.List<EventSubscriptionQueryValue> eventSubscriptions)
-
getIncidentId
public java.lang.String getIncidentId()
-
getIncidentType
public java.lang.String getIncidentType()
-
getIncidentMessage
public java.lang.String getIncidentMessage()
-
getIncidentMessageLike
public java.lang.String getIncidentMessageLike()
-
-