org.camunda.bpm.engine.impl
Class ProcessInstanceQueryImpl

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<ProcessInstanceQuery,ProcessInstance>
                  extended by org.camunda.bpm.engine.impl.ProcessInstanceQueryImpl
All Implemented Interfaces:
Serializable, Command<Object>, Query<ProcessInstanceQuery,ProcessInstance>, ProcessInstanceQuery

public class ProcessInstanceQueryImpl
extends AbstractVariableQueryImpl<ProcessInstanceQuery,ProcessInstance>
implements ProcessInstanceQuery, Serializable

Author:
Tom Baeyens, Joram Barrez, Frederik Heremans, Falko Menge, Daniel Meyer
See Also:
Serialized Form

Field Summary
protected  String activityId
           
protected  String businessKey
           
protected  String caseInstanceId
           
protected  List<EventSubscriptionQueryValue> eventSubscriptions
           
protected  String executionId
           
protected  String incidentId
           
protected  String incidentMessage
           
protected  String incidentMessageLike
           
protected  String incidentType
           
protected  String processDefinitionId
           
protected  String processDefinitionKey
           
protected  Set<String> processInstanceIds
           
protected  String subCaseInstanceId
           
protected  String subProcessInstanceId
           
protected  String superCaseInstanceId
           
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, 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
ProcessInstanceQueryImpl()
           
ProcessInstanceQueryImpl(CommandContext commandContext)
           
ProcessInstanceQueryImpl(CommandExecutor commandExecutor)
           
 
Method Summary
 ProcessInstanceQuery active()
          Only selects process instances which are active, which means that neither the process instance nor the corresponding process definition are suspended.
 ProcessInstanceQuery caseInstanceId(String caseInstanceId)
          Selects the process instances which are associated with the given case instance id.
 long executeCount(CommandContext commandContext)
           
 List<ProcessInstance> executeList(CommandContext commandContext, Page page)
          Executes the actual query to retrieve the list of results.
 String getActivityId()
           
 String getBusinessKey()
           
 String getCaseInstanceId()
           
 List<EventSubscriptionQueryValue> getEventSubscriptions()
           
 String getIncidentId()
           
 String getIncidentMessage()
           
 String getIncidentMessageLike()
           
 String getIncidentType()
           
 boolean getOnlyProcessInstances()
           
 String getProcessDefinitionId()
           
 String getProcessDefinitionKey()
           
 String getProcessInstanceId()
           
 Set<String> getProcessInstanceIds()
           
 String getSubCaseInstanceId()
           
 String getSubProcessInstanceId()
           
 String getSuperCaseInstanceId()
           
 String getSuperProcessInstanceId()
           
 SuspensionState getSuspensionState()
           
 ProcessInstanceQuery incidentId(String incidentId)
          Only selects process instances with the given incident id.
 ProcessInstanceQuery incidentMessage(String incidentMessage)
          Only selects process instances with the given incident message.
 ProcessInstanceQuery incidentMessageLike(String incidentMessageLike)
          Only selects process instances with an incident message like the given.
 ProcessInstanceQuery incidentType(String incidentType)
          Only selects process instances with the given incident type.
 ProcessInstanceQuery orderByProcessDefinitionId()
          Order by process definition id (needs to be followed by Query.asc() or Query.desc()).
 ProcessInstanceQuery orderByProcessDefinitionKey()
          Order by process definition key (needs to be followed by Query.asc() or Query.desc()).
 ProcessInstanceQuery orderByProcessInstanceId()
          Order by id (needs to be followed by Query.asc() or Query.desc()).
 ProcessInstanceQueryImpl processDefinitionId(String processDefinitionId)
          Selects the process instances which are defined by a process definition with the given id.
 ProcessInstanceQueryImpl processDefinitionKey(String processDefinitionKey)
          Select the process instances which are defined by a process definition with the given key.
 ProcessInstanceQuery processInstanceBusinessKey(String businessKey)
          Select process instances with the given business key
 ProcessInstanceQuery processInstanceBusinessKey(String businessKey, String processDefinitionKey)
          Select process instance with the given business key, unique for the given process definition
 ProcessInstanceQueryImpl processInstanceId(String processInstanceId)
          Select the process instance with the given id
 ProcessInstanceQuery processInstanceIds(Set<String> processInstanceIds)
          Select process instances whose id is in the given set of ids
 void setEventSubscriptions(List<EventSubscriptionQueryValue> eventSubscriptions)
           
 void setSuspensionState(SuspensionState suspensionState)
           
 ProcessInstanceQuery subCaseInstanceId(String subCaseInstanceId)
          Select the process instance that has as sub case instance the given case instance.
 ProcessInstanceQuery subProcessInstanceId(String subProcessInstanceId)
          Select the process instance that have as sub process instance the given process instance.
 ProcessInstanceQuery superCaseInstanceId(String superCaseInstanceId)
          Select the process instances which are a sub process instance of the given super case instance.
 ProcessInstanceQuery superProcessInstanceId(String superProcessInstanceId)
          Select the process instances which are a sub process instance of the given super process instance.
 ProcessInstanceQuery suspended()
          Only selects process instances which are suspended, either because the process instance itself is suspended or because the corresponding process definition 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
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.runtime.ProcessInstanceQuery
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

executionId

protected String executionId

businessKey

protected String businessKey

processDefinitionId

protected String processDefinitionId

processInstanceIds

protected Set<String> processInstanceIds

processDefinitionKey

protected String processDefinitionKey

superProcessInstanceId

protected String superProcessInstanceId

subProcessInstanceId

protected String subProcessInstanceId

suspensionState

protected SuspensionState suspensionState

incidentType

protected String incidentType

incidentId

protected String incidentId

incidentMessage

protected String incidentMessage

incidentMessageLike

protected String incidentMessageLike

caseInstanceId

protected String caseInstanceId

superCaseInstanceId

protected String superCaseInstanceId

subCaseInstanceId

protected String subCaseInstanceId

activityId

protected String activityId

eventSubscriptions

protected List<EventSubscriptionQueryValue> eventSubscriptions
Constructor Detail

ProcessInstanceQueryImpl

public ProcessInstanceQueryImpl()

ProcessInstanceQueryImpl

public ProcessInstanceQueryImpl(CommandContext commandContext)

ProcessInstanceQueryImpl

public ProcessInstanceQueryImpl(CommandExecutor commandExecutor)
Method Detail

processInstanceId

public ProcessInstanceQueryImpl processInstanceId(String processInstanceId)
Description copied from interface: ProcessInstanceQuery
Select the process instance with the given id

Specified by:
processInstanceId in interface ProcessInstanceQuery

processInstanceIds

public ProcessInstanceQuery processInstanceIds(Set<String> processInstanceIds)
Description copied from interface: ProcessInstanceQuery
Select process instances whose id is in the given set of ids

Specified by:
processInstanceIds in interface ProcessInstanceQuery

processInstanceBusinessKey

public ProcessInstanceQuery processInstanceBusinessKey(String businessKey)
Description copied from interface: ProcessInstanceQuery
Select process instances with the given business key

Specified by:
processInstanceBusinessKey in interface ProcessInstanceQuery

processInstanceBusinessKey

public ProcessInstanceQuery processInstanceBusinessKey(String businessKey,
                                                       String processDefinitionKey)
Description copied from interface: ProcessInstanceQuery
Select process instance with the given business key, unique for the given process definition

Specified by:
processInstanceBusinessKey in interface ProcessInstanceQuery

processDefinitionId

public ProcessInstanceQueryImpl processDefinitionId(String processDefinitionId)
Description copied from interface: ProcessInstanceQuery
Selects the process instances which are defined by a process definition with the given id.

Specified by:
processDefinitionId in interface ProcessInstanceQuery

processDefinitionKey

public ProcessInstanceQueryImpl processDefinitionKey(String processDefinitionKey)
Description copied from interface: ProcessInstanceQuery
Select the process instances which are defined by a process definition with the given key.

Specified by:
processDefinitionKey in interface ProcessInstanceQuery

superProcessInstanceId

public ProcessInstanceQuery superProcessInstanceId(String superProcessInstanceId)
Description copied from interface: ProcessInstanceQuery
Select the process instances which are a sub process instance of the given super process instance.

Specified by:
superProcessInstanceId in interface ProcessInstanceQuery

subProcessInstanceId

public ProcessInstanceQuery subProcessInstanceId(String subProcessInstanceId)
Description copied from interface: ProcessInstanceQuery
Select the process instance that have as sub process instance the given process instance. Note that there will always be maximum only one such process instance that can be the result of this query.

Specified by:
subProcessInstanceId in interface ProcessInstanceQuery

caseInstanceId

public ProcessInstanceQuery caseInstanceId(String caseInstanceId)
Description copied from interface: ProcessInstanceQuery
Selects the process instances which are associated with the given case instance id.

Specified by:
caseInstanceId in interface ProcessInstanceQuery

superCaseInstanceId

public ProcessInstanceQuery superCaseInstanceId(String superCaseInstanceId)
Description copied from interface: ProcessInstanceQuery
Select the process instances which are a sub process instance of the given super case instance.

Specified by:
superCaseInstanceId in interface ProcessInstanceQuery

subCaseInstanceId

public ProcessInstanceQuery subCaseInstanceId(String subCaseInstanceId)
Description copied from interface: ProcessInstanceQuery
Select the process instance that has as sub case instance the given case instance. Note that there will always be at most one such process instance that can be the result of this query.

Specified by:
subCaseInstanceId in interface ProcessInstanceQuery

orderByProcessInstanceId

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

Specified by:
orderByProcessInstanceId in interface ProcessInstanceQuery

orderByProcessDefinitionId

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

Specified by:
orderByProcessDefinitionId in interface ProcessInstanceQuery

orderByProcessDefinitionKey

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

Specified by:
orderByProcessDefinitionKey in interface ProcessInstanceQuery

active

public ProcessInstanceQuery active()
Description copied from interface: ProcessInstanceQuery
Only selects process instances which are active, which means that neither the process instance nor the corresponding process definition are suspended.

Specified by:
active in interface ProcessInstanceQuery

suspended

public ProcessInstanceQuery suspended()
Description copied from interface: ProcessInstanceQuery
Only selects process instances which are suspended, either because the process instance itself is suspended or because the corresponding process definition is suspended

Specified by:
suspended in interface ProcessInstanceQuery

incidentType

public ProcessInstanceQuery incidentType(String incidentType)
Description copied from interface: ProcessInstanceQuery
Only selects process instances with the given incident type.

Specified by:
incidentType in interface ProcessInstanceQuery

incidentId

public ProcessInstanceQuery incidentId(String incidentId)
Description copied from interface: ProcessInstanceQuery
Only selects process instances with the given incident id.

Specified by:
incidentId in interface ProcessInstanceQuery

incidentMessage

public ProcessInstanceQuery incidentMessage(String incidentMessage)
Description copied from interface: ProcessInstanceQuery
Only selects process instances with the given incident message.

Specified by:
incidentMessage in interface ProcessInstanceQuery

incidentMessageLike

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

Specified by:
incidentMessageLike in interface ProcessInstanceQuery

executeCount

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

executeList

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

getOnlyProcessInstances

public boolean getOnlyProcessInstances()

getProcessInstanceId

public String getProcessInstanceId()

getProcessInstanceIds

public Set<String> getProcessInstanceIds()

getBusinessKey

public String getBusinessKey()

getProcessDefinitionId

public String getProcessDefinitionId()

getProcessDefinitionKey

public String getProcessDefinitionKey()

getActivityId

public String getActivityId()

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)

getIncidentId

public String getIncidentId()

getIncidentType

public String getIncidentType()

getIncidentMessage

public String getIncidentMessage()

getIncidentMessageLike

public String getIncidentMessageLike()

getCaseInstanceId

public String getCaseInstanceId()

getSuperCaseInstanceId

public String getSuperCaseInstanceId()

getSubCaseInstanceId

public String getSubCaseInstanceId()


Copyright © 2015 camunda services GmbH. All rights reserved.