org.camunda.bpm.engine.impl
Class HistoricActivityInstanceQueryImpl

java.lang.Object
  extended by org.camunda.bpm.engine.impl.db.ListQueryParameterObject
      extended by org.camunda.bpm.engine.impl.AbstractQuery<HistoricActivityInstanceQuery,HistoricActivityInstance>
          extended by org.camunda.bpm.engine.impl.HistoricActivityInstanceQueryImpl
All Implemented Interfaces:
Serializable, HistoricActivityInstanceQuery, Command<Object>, Query<HistoricActivityInstanceQuery,HistoricActivityInstance>

public class HistoricActivityInstanceQueryImpl
extends AbstractQuery<HistoricActivityInstanceQuery,HistoricActivityInstance>
implements HistoricActivityInstanceQuery

Author:
Tom Baeyens
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 activityInstanceId
           
protected  ActivityInstanceState activityInstanceState
           
protected  String activityName
           
protected  String activityType
           
protected  String assignee
           
protected  String executionId
           
protected  boolean finished
           
protected  Date finishedAfter
           
protected  Date finishedBefore
           
protected  String processDefinitionId
           
protected  String processInstanceId
           
protected  Date startedAfter
           
protected  Date startedBefore
           
protected  String[] tenantIds
           
protected  boolean unfinished
           
 
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
HistoricActivityInstanceQueryImpl()
           
HistoricActivityInstanceQueryImpl(CommandExecutor commandExecutor)
           
 
Method Summary
 HistoricActivityInstanceQueryImpl activityId(String activityId)
          Only select historic activity instances for the given activity (id from BPMN 2.0 XML)
 HistoricActivityInstanceQueryImpl activityInstanceId(String activityInstanceId)
          Only select historic activity instances with the given id (primary key within history tables).
 HistoricActivityInstanceQueryImpl activityName(String activityName)
          Only select historic activity instances for activities with the given name
 HistoricActivityInstanceQueryImpl activityType(String activityType)
          Only select historic activity instances for activities with the given activity type
 HistoricActivityInstanceQueryImpl canceled()
          Only select historic activity instances that got canceled
 HistoricActivityInstanceQueryImpl completeScope()
          Only select historic activity instances that complete a BPMN scope
 long executeCount(CommandContext commandContext)
           
 List<HistoricActivityInstance> executeList(CommandContext commandContext, Page page)
          Executes the actual query to retrieve the list of results.
 HistoricActivityInstanceQueryImpl executionId(String executionId)
          Only select historic activity instances for the given execution
 HistoricActivityInstanceQueryImpl finished()
          Only select historic activity instances that are finished.
 HistoricActivityInstanceQueryImpl finishedAfter(Date date)
          Only select historic activity instances that were started after the given date.
 HistoricActivityInstanceQueryImpl finishedBefore(Date date)
          Only select historic activity instances that were started before the given date.
 String getActivityId()
           
 String getActivityInstanceId()
           
 ActivityInstanceState getActivityInstanceState()
           
 String getActivityName()
           
 String getActivityType()
           
 String getAssignee()
           
 String getExecutionId()
           
 Date getFinishedAfter()
           
 Date getFinishedBefore()
           
 String getProcessDefinitionId()
           
 String getProcessInstanceId()
           
 Date getStartedAfter()
           
 Date getStartedBefore()
           
protected  boolean hasExcludingConditions()
          Whether or not the query has excluding conditions.
 boolean isFinished()
           
 boolean isUnfinished()
           
 HistoricActivityInstanceQuery orderByActivityId()
          Order by activityId (needs to be followed by Query.asc() or Query.desc()).
 HistoricActivityInstanceQueryImpl orderByActivityName()
          Order by activityName (needs to be followed by Query.asc() or Query.desc()).
 HistoricActivityInstanceQueryImpl orderByActivityType()
          Order by activityType (needs to be followed by Query.asc() or Query.desc()).
 HistoricActivityInstanceQueryImpl orderByExecutionId()
          Order by executionId (needs to be followed by Query.asc() or Query.desc()).
 HistoricActivityInstanceQueryImpl orderByHistoricActivityInstanceDuration()
          Order by duration (needs to be followed by Query.asc() or Query.desc()).
 HistoricActivityInstanceQueryImpl orderByHistoricActivityInstanceEndTime()
          Order by end (needs to be followed by Query.asc() or Query.desc()).
 HistoricActivityInstanceQueryImpl orderByHistoricActivityInstanceId()
          Order by id (needs to be followed by Query.asc() or Query.desc()).
 HistoricActivityInstanceQueryImpl orderByHistoricActivityInstanceStartTime()
          Order by start (needs to be followed by Query.asc() or Query.desc()).
 HistoricActivityInstanceQueryImpl orderByProcessDefinitionId()
          Order by processDefinitionId (needs to be followed by Query.asc() or Query.desc()).
 HistoricActivityInstanceQueryImpl orderByProcessInstanceId()
          Order by processInstanceId (needs to be followed by Query.asc() or Query.desc()).
 HistoricActivityInstanceQuery orderByTenantId()
          Order by tenant id (needs to be followed by Query.asc() or Query.desc()).
 HistoricActivityInstanceQuery orderPartiallyByOccurrence()
          Sort the activity instances in the order in which they occurred (ie.
 HistoricActivityInstanceQueryImpl processDefinitionId(String processDefinitionId)
          Only select historic activity instances for the given process definition
 HistoricActivityInstanceQueryImpl processInstanceId(String processInstanceId)
          Only select historic activity instances with the given process instance.
 HistoricActivityInstanceQueryImpl startedAfter(Date date)
          Only select historic activity instances that were started after the given date.
 HistoricActivityInstanceQueryImpl startedBefore(Date date)
          Only select historic activity instances that were started before the given date.
 HistoricActivityInstanceQueryImpl taskAssignee(String assignee)
          Only select historic activity instances for userTask activities assigned to the given user
 HistoricActivityInstanceQuery tenantIdIn(String... tenantIds)
          Only select historic activity instances with one of the given tenant ids.
 HistoricActivityInstanceQueryImpl unfinished()
          Only select historic activity instances that are not finished yet.
 
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, 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.query.Query
asc, count, desc, list, listPage, singleResult
 

Field Detail

activityInstanceId

protected String activityInstanceId

processInstanceId

protected String processInstanceId

executionId

protected String executionId

processDefinitionId

protected String processDefinitionId

activityId

protected String activityId

activityName

protected String activityName

activityType

protected String activityType

assignee

protected String assignee

finished

protected boolean finished

unfinished

protected boolean unfinished

startedBefore

protected Date startedBefore

startedAfter

protected Date startedAfter

finishedBefore

protected Date finishedBefore

finishedAfter

protected Date finishedAfter

activityInstanceState

protected ActivityInstanceState activityInstanceState

tenantIds

protected String[] tenantIds
Constructor Detail

HistoricActivityInstanceQueryImpl

public HistoricActivityInstanceQueryImpl()

HistoricActivityInstanceQueryImpl

public HistoricActivityInstanceQueryImpl(CommandExecutor commandExecutor)
Method Detail

executeCount

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

executeList

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

processInstanceId

public HistoricActivityInstanceQueryImpl processInstanceId(String processInstanceId)
Description copied from interface: HistoricActivityInstanceQuery
Only select historic activity instances with the given process instance. ProcessInstance) ids and {@link HistoricProcessInstance} ids match.

Specified by:
processInstanceId in interface HistoricActivityInstanceQuery

executionId

public HistoricActivityInstanceQueryImpl executionId(String executionId)
Description copied from interface: HistoricActivityInstanceQuery
Only select historic activity instances for the given execution

Specified by:
executionId in interface HistoricActivityInstanceQuery

processDefinitionId

public HistoricActivityInstanceQueryImpl processDefinitionId(String processDefinitionId)
Description copied from interface: HistoricActivityInstanceQuery
Only select historic activity instances for the given process definition

Specified by:
processDefinitionId in interface HistoricActivityInstanceQuery

activityId

public HistoricActivityInstanceQueryImpl activityId(String activityId)
Description copied from interface: HistoricActivityInstanceQuery
Only select historic activity instances for the given activity (id from BPMN 2.0 XML)

Specified by:
activityId in interface HistoricActivityInstanceQuery

activityName

public HistoricActivityInstanceQueryImpl activityName(String activityName)
Description copied from interface: HistoricActivityInstanceQuery
Only select historic activity instances for activities with the given name

Specified by:
activityName in interface HistoricActivityInstanceQuery

activityType

public HistoricActivityInstanceQueryImpl activityType(String activityType)
Description copied from interface: HistoricActivityInstanceQuery
Only select historic activity instances for activities with the given activity type

Specified by:
activityType in interface HistoricActivityInstanceQuery

taskAssignee

public HistoricActivityInstanceQueryImpl taskAssignee(String assignee)
Description copied from interface: HistoricActivityInstanceQuery
Only select historic activity instances for userTask activities assigned to the given user

Specified by:
taskAssignee in interface HistoricActivityInstanceQuery

finished

public HistoricActivityInstanceQueryImpl finished()
Description copied from interface: HistoricActivityInstanceQuery
Only select historic activity instances that are finished.

Specified by:
finished in interface HistoricActivityInstanceQuery

unfinished

public HistoricActivityInstanceQueryImpl unfinished()
Description copied from interface: HistoricActivityInstanceQuery
Only select historic activity instances that are not finished yet.

Specified by:
unfinished in interface HistoricActivityInstanceQuery

completeScope

public HistoricActivityInstanceQueryImpl completeScope()
Description copied from interface: HistoricActivityInstanceQuery
Only select historic activity instances that complete a BPMN scope

Specified by:
completeScope in interface HistoricActivityInstanceQuery

canceled

public HistoricActivityInstanceQueryImpl canceled()
Description copied from interface: HistoricActivityInstanceQuery
Only select historic activity instances that got canceled

Specified by:
canceled in interface HistoricActivityInstanceQuery

startedAfter

public HistoricActivityInstanceQueryImpl startedAfter(Date date)
Description copied from interface: HistoricActivityInstanceQuery
Only select historic activity instances that were started after the given date.

Specified by:
startedAfter in interface HistoricActivityInstanceQuery

startedBefore

public HistoricActivityInstanceQueryImpl startedBefore(Date date)
Description copied from interface: HistoricActivityInstanceQuery
Only select historic activity instances that were started before the given date.

Specified by:
startedBefore in interface HistoricActivityInstanceQuery

finishedAfter

public HistoricActivityInstanceQueryImpl finishedAfter(Date date)
Description copied from interface: HistoricActivityInstanceQuery
Only select historic activity instances that were started after the given date.

Specified by:
finishedAfter in interface HistoricActivityInstanceQuery

finishedBefore

public HistoricActivityInstanceQueryImpl finishedBefore(Date date)
Description copied from interface: HistoricActivityInstanceQuery
Only select historic activity instances that were started before the given date.

Specified by:
finishedBefore in interface HistoricActivityInstanceQuery

tenantIdIn

public HistoricActivityInstanceQuery tenantIdIn(String... tenantIds)
Description copied from interface: HistoricActivityInstanceQuery
Only select historic activity instances with one of the given tenant ids.

Specified by:
tenantIdIn in interface HistoricActivityInstanceQuery

hasExcludingConditions

protected boolean hasExcludingConditions()
Description copied from class: AbstractQuery
Whether or not the query has excluding conditions. If the query has excluding conditions, (e.g. task due date before and after are excluding), the SQL query is avoided and a default result is returned. The returned result is the same as if the SQL was executed and there were no entries.

Overrides:
hasExcludingConditions in class AbstractQuery<HistoricActivityInstanceQuery,HistoricActivityInstance>
Returns:
true if the query does have excluding conditions, false otherwise

orderByHistoricActivityInstanceDuration

public HistoricActivityInstanceQueryImpl orderByHistoricActivityInstanceDuration()
Description copied from interface: HistoricActivityInstanceQuery
Order by duration (needs to be followed by Query.asc() or Query.desc()).

Specified by:
orderByHistoricActivityInstanceDuration in interface HistoricActivityInstanceQuery

orderByHistoricActivityInstanceEndTime

public HistoricActivityInstanceQueryImpl orderByHistoricActivityInstanceEndTime()
Description copied from interface: HistoricActivityInstanceQuery
Order by end (needs to be followed by Query.asc() or Query.desc()).

Specified by:
orderByHistoricActivityInstanceEndTime in interface HistoricActivityInstanceQuery

orderByExecutionId

public HistoricActivityInstanceQueryImpl orderByExecutionId()
Description copied from interface: HistoricActivityInstanceQuery
Order by executionId (needs to be followed by Query.asc() or Query.desc()).

Specified by:
orderByExecutionId in interface HistoricActivityInstanceQuery

orderByHistoricActivityInstanceId

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

Specified by:
orderByHistoricActivityInstanceId in interface HistoricActivityInstanceQuery

orderByProcessDefinitionId

public HistoricActivityInstanceQueryImpl orderByProcessDefinitionId()
Description copied from interface: HistoricActivityInstanceQuery
Order by processDefinitionId (needs to be followed by Query.asc() or Query.desc()).

Specified by:
orderByProcessDefinitionId in interface HistoricActivityInstanceQuery

orderByProcessInstanceId

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

Specified by:
orderByProcessInstanceId in interface HistoricActivityInstanceQuery

orderByHistoricActivityInstanceStartTime

public HistoricActivityInstanceQueryImpl orderByHistoricActivityInstanceStartTime()
Description copied from interface: HistoricActivityInstanceQuery
Order by start (needs to be followed by Query.asc() or Query.desc()).

Specified by:
orderByHistoricActivityInstanceStartTime in interface HistoricActivityInstanceQuery

orderByActivityId

public HistoricActivityInstanceQuery orderByActivityId()
Description copied from interface: HistoricActivityInstanceQuery
Order by activityId (needs to be followed by Query.asc() or Query.desc()).

Specified by:
orderByActivityId in interface HistoricActivityInstanceQuery

orderByActivityName

public HistoricActivityInstanceQueryImpl orderByActivityName()
Description copied from interface: HistoricActivityInstanceQuery
Order by activityName (needs to be followed by Query.asc() or Query.desc()).

Specified by:
orderByActivityName in interface HistoricActivityInstanceQuery

orderByActivityType

public HistoricActivityInstanceQueryImpl orderByActivityType()
Description copied from interface: HistoricActivityInstanceQuery
Order by activityType (needs to be followed by Query.asc() or Query.desc()).

Specified by:
orderByActivityType in interface HistoricActivityInstanceQuery

orderPartiallyByOccurrence

public HistoricActivityInstanceQuery orderPartiallyByOccurrence()
Description copied from interface: HistoricActivityInstanceQuery

Sort the activity instances in the order in which they occurred (ie. started) and needs to be followed by Query.asc() or Query.desc().

The set of all activity instances is a partially ordered set. At a BPMN level this means that instances of concurrent activities (example: activities on different parallel branched after a parallel gateway) cannot be compared to each other. Instances of activities which are part of happens-before relation at the BPMN level will be ordered in respect to that relation.

Technically this means that activity instances with different execution ids are incomparable. Only activity instances with the same execution id can be totally ordered by using HistoricActivityInstanceQuery.executionId(String) and HistoricActivityInstanceQuery.orderPartiallyByOccurrence() which will return a result set ordered by its occurrence.

Specified by:
orderPartiallyByOccurrence in interface HistoricActivityInstanceQuery

orderByTenantId

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

Specified by:
orderByTenantId in interface HistoricActivityInstanceQuery

activityInstanceId

public HistoricActivityInstanceQueryImpl activityInstanceId(String activityInstanceId)
Description copied from interface: HistoricActivityInstanceQuery
Only select historic activity instances with the given id (primary key within history tables).

Specified by:
activityInstanceId in interface HistoricActivityInstanceQuery

getProcessInstanceId

public String getProcessInstanceId()

getExecutionId

public String getExecutionId()

getProcessDefinitionId

public String getProcessDefinitionId()

getActivityId

public String getActivityId()

getActivityName

public String getActivityName()

getActivityType

public String getActivityType()

getAssignee

public String getAssignee()

isFinished

public boolean isFinished()

isUnfinished

public boolean isUnfinished()

getActivityInstanceId

public String getActivityInstanceId()

getStartedAfter

public Date getStartedAfter()

getStartedBefore

public Date getStartedBefore()

getFinishedAfter

public Date getFinishedAfter()

getFinishedBefore

public Date getFinishedBefore()

getActivityInstanceState

public ActivityInstanceState getActivityInstanceState()


Copyright © 2017 camunda services GmbH. All rights reserved.