Class HistoricActivityInstanceQueryImpl
- java.lang.Object
-
- org.camunda.bpm.engine.impl.db.ListQueryParameterObject
-
- org.camunda.bpm.engine.impl.AbstractQuery<HistoricActivityInstanceQuery,HistoricActivityInstance>
-
- 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
Fields Modifier and Type Field Description protected StringactivityIdprotected StringactivityInstanceIdprotected ActivityInstanceStateactivityInstanceStateprotected StringactivityNameprotected StringactivityNameLikeprotected StringactivityTypeprotected Stringassigneeprotected StringexecutionIdprotected booleanfinishedprotected DatefinishedAfterprotected DatefinishedBeforeprotected booleanisTenantIdSetprotected StringprocessDefinitionIdprotected StringprocessInstanceIdprotected DatestartedAfterprotected DatestartedBeforeprotected String[]tenantIdsprotected booleanunfinished-
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 HistoricActivityInstanceQueryImpl()HistoricActivityInstanceQueryImpl(CommandExecutor commandExecutor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HistoricActivityInstanceQueryImplactivityId(String activityId)Only select historic activity instances for the given activity (id from BPMN 2.0 XML)HistoricActivityInstanceQueryImplactivityInstanceId(String activityInstanceId)Only select historic activity instances with the given id (primary key within history tables).HistoricActivityInstanceQueryImplactivityName(String activityName)Only select historic activity instances for activities with the given nameHistoricActivityInstanceQueryImplactivityNameLike(String activityNameLike)Only select historic activity instances for activities which activityName is like the given value.HistoricActivityInstanceQueryImplactivityType(String activityType)Only select historic activity instances for activities with the given activity typeHistoricActivityInstanceQueryImplcanceled()Only select historic activity instances that got canceledHistoricActivityInstanceQueryImplcompleteScope()Only select historic activity instances that complete a BPMN scopelongexecuteCount(CommandContext commandContext)List<HistoricActivityInstance>executeList(CommandContext commandContext, Page page)Executes the actual query to retrieve the list of results.HistoricActivityInstanceQueryImplexecutionId(String executionId)Only select historic activity instances for the given executionHistoricActivityInstanceQueryImplfinished()Only select historic activity instances that are finished.HistoricActivityInstanceQueryImplfinishedAfter(Date date)Only select historic activity instances that were started after the given date.HistoricActivityInstanceQueryImplfinishedBefore(Date date)Only select historic activity instances that were started before the given date.StringgetActivityId()StringgetActivityInstanceId()ActivityInstanceStategetActivityInstanceState()StringgetActivityName()StringgetActivityType()StringgetAssignee()StringgetExecutionId()DategetFinishedAfter()DategetFinishedBefore()StringgetProcessDefinitionId()StringgetProcessInstanceId()DategetStartedAfter()DategetStartedBefore()protected booleanhasExcludingConditions()Whether or not the query has excluding conditions.booleanisFinished()booleanisTenantIdSet()booleanisUnfinished()HistoricActivityInstanceQueryorderByActivityId()Order by activityId (needs to be followed byQuery.asc()orQuery.desc()).HistoricActivityInstanceQueryImplorderByActivityName()Order by activityName (needs to be followed byQuery.asc()orQuery.desc()).HistoricActivityInstanceQueryImplorderByActivityType()Order by activityType (needs to be followed byQuery.asc()orQuery.desc()).HistoricActivityInstanceQueryImplorderByExecutionId()Order by executionId (needs to be followed byQuery.asc()orQuery.desc()).HistoricActivityInstanceQueryImplorderByHistoricActivityInstanceDuration()Order by duration (needs to be followed byQuery.asc()orQuery.desc()).HistoricActivityInstanceQueryImplorderByHistoricActivityInstanceEndTime()Order by end (needs to be followed byQuery.asc()orQuery.desc()).HistoricActivityInstanceQueryImplorderByHistoricActivityInstanceId()Order by id (needs to be followed byQuery.asc()orQuery.desc()).HistoricActivityInstanceQueryImplorderByHistoricActivityInstanceStartTime()Order by start (needs to be followed byQuery.asc()orQuery.desc()).HistoricActivityInstanceQueryImplorderByProcessDefinitionId()Order by processDefinitionId (needs to be followed byQuery.asc()orQuery.desc()).HistoricActivityInstanceQueryImplorderByProcessInstanceId()Order by processInstanceId (needs to be followed byQuery.asc()orQuery.desc()).HistoricActivityInstanceQueryorderByTenantId()Order by tenant id (needs to be followed byQuery.asc()orQuery.desc()).HistoricActivityInstanceQueryorderPartiallyByOccurrence()Sort theactivity instancesin the order in which they occurred (ie.HistoricActivityInstanceQueryImplprocessDefinitionId(String processDefinitionId)Only select historic activity instances for the given process definitionHistoricActivityInstanceQueryImplprocessInstanceId(String processInstanceId)Only select historic activity instances with the given process instance.HistoricActivityInstanceQueryImplstartedAfter(Date date)Only select historic activity instances that were started after the given date.HistoricActivityInstanceQueryImplstartedBefore(Date date)Only select historic activity instances that were started before the given date.HistoricActivityInstanceQueryImpltaskAssignee(String assignee)Only select historic activity instances for userTask activities assigned to the given userHistoricActivityInstanceQuerytenantIdIn(String... tenantIds)Only select historic activity instances with one of the given tenant ids.HistoricActivityInstanceQueryImplunfinished()Only select historic activity instances that are not finished yet.HistoricActivityInstanceQuerywithoutTenantId()Only selects historic activity instances that have no tenant id.-
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, 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.query.Query
asc, count, desc, list, listPage, singleResult, unlimitedList
-
-
-
-
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
-
activityNameLike
protected String activityNameLike
-
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
-
isTenantIdSet
protected boolean isTenantIdSet
-
-
Constructor Detail
-
HistoricActivityInstanceQueryImpl
public HistoricActivityInstanceQueryImpl()
-
HistoricActivityInstanceQueryImpl
public HistoricActivityInstanceQueryImpl(CommandExecutor commandExecutor)
-
-
Method Detail
-
executeCount
public long executeCount(CommandContext commandContext)
- Specified by:
executeCountin classAbstractQuery<HistoricActivityInstanceQuery,HistoricActivityInstance>
-
executeList
public List<HistoricActivityInstance> executeList(CommandContext commandContext, Page page)
Description copied from class:AbstractQueryExecutes the actual query to retrieve the list of results.- Specified by:
executeListin classAbstractQuery<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:HistoricActivityInstanceQueryOnly select historic activity instances with the given process instance.) ids and {@link HistoricProcessInstance} ids match.- Specified by:
processInstanceIdin interfaceHistoricActivityInstanceQuery
-
executionId
public HistoricActivityInstanceQueryImpl executionId(String executionId)
Description copied from interface:HistoricActivityInstanceQueryOnly select historic activity instances for the given execution- Specified by:
executionIdin interfaceHistoricActivityInstanceQuery
-
processDefinitionId
public HistoricActivityInstanceQueryImpl processDefinitionId(String processDefinitionId)
Description copied from interface:HistoricActivityInstanceQueryOnly select historic activity instances for the given process definition- Specified by:
processDefinitionIdin interfaceHistoricActivityInstanceQuery
-
activityId
public HistoricActivityInstanceQueryImpl activityId(String activityId)
Description copied from interface:HistoricActivityInstanceQueryOnly select historic activity instances for the given activity (id from BPMN 2.0 XML)- Specified by:
activityIdin interfaceHistoricActivityInstanceQuery
-
activityName
public HistoricActivityInstanceQueryImpl activityName(String activityName)
Description copied from interface:HistoricActivityInstanceQueryOnly select historic activity instances for activities with the given name- Specified by:
activityNamein interfaceHistoricActivityInstanceQuery
-
activityNameLike
public HistoricActivityInstanceQueryImpl activityNameLike(String activityNameLike)
Description copied from interface:HistoricActivityInstanceQueryOnly select historic activity instances for activities which activityName is like the given value.- Specified by:
activityNameLikein interfaceHistoricActivityInstanceQuery- Parameters:
activityNameLike- The string can include the wildcard character '%' to express like-strategy: starts with (string%), ends with (%string) or contains (%string%).
-
activityType
public HistoricActivityInstanceQueryImpl activityType(String activityType)
Description copied from interface:HistoricActivityInstanceQueryOnly select historic activity instances for activities with the given activity type- Specified by:
activityTypein interfaceHistoricActivityInstanceQuery
-
taskAssignee
public HistoricActivityInstanceQueryImpl taskAssignee(String assignee)
Description copied from interface:HistoricActivityInstanceQueryOnly select historic activity instances for userTask activities assigned to the given user- Specified by:
taskAssigneein interfaceHistoricActivityInstanceQuery
-
finished
public HistoricActivityInstanceQueryImpl finished()
Description copied from interface:HistoricActivityInstanceQueryOnly select historic activity instances that are finished.- Specified by:
finishedin interfaceHistoricActivityInstanceQuery
-
unfinished
public HistoricActivityInstanceQueryImpl unfinished()
Description copied from interface:HistoricActivityInstanceQueryOnly select historic activity instances that are not finished yet.- Specified by:
unfinishedin interfaceHistoricActivityInstanceQuery
-
completeScope
public HistoricActivityInstanceQueryImpl completeScope()
Description copied from interface:HistoricActivityInstanceQueryOnly select historic activity instances that complete a BPMN scope- Specified by:
completeScopein interfaceHistoricActivityInstanceQuery
-
canceled
public HistoricActivityInstanceQueryImpl canceled()
Description copied from interface:HistoricActivityInstanceQueryOnly select historic activity instances that got canceled- Specified by:
canceledin interfaceHistoricActivityInstanceQuery
-
startedAfter
public HistoricActivityInstanceQueryImpl startedAfter(Date date)
Description copied from interface:HistoricActivityInstanceQueryOnly select historic activity instances that were started after the given date.- Specified by:
startedAfterin interfaceHistoricActivityInstanceQuery
-
startedBefore
public HistoricActivityInstanceQueryImpl startedBefore(Date date)
Description copied from interface:HistoricActivityInstanceQueryOnly select historic activity instances that were started before the given date.- Specified by:
startedBeforein interfaceHistoricActivityInstanceQuery
-
finishedAfter
public HistoricActivityInstanceQueryImpl finishedAfter(Date date)
Description copied from interface:HistoricActivityInstanceQueryOnly select historic activity instances that were started after the given date.- Specified by:
finishedAfterin interfaceHistoricActivityInstanceQuery
-
finishedBefore
public HistoricActivityInstanceQueryImpl finishedBefore(Date date)
Description copied from interface:HistoricActivityInstanceQueryOnly select historic activity instances that were started before the given date.- Specified by:
finishedBeforein interfaceHistoricActivityInstanceQuery
-
tenantIdIn
public HistoricActivityInstanceQuery tenantIdIn(String... tenantIds)
Description copied from interface:HistoricActivityInstanceQueryOnly select historic activity instances with one of the given tenant ids.- Specified by:
tenantIdInin interfaceHistoricActivityInstanceQuery
-
withoutTenantId
public HistoricActivityInstanceQuery withoutTenantId()
Description copied from interface:HistoricActivityInstanceQueryOnly selects historic activity instances that have no tenant id.- Specified by:
withoutTenantIdin interfaceHistoricActivityInstanceQuery
-
hasExcludingConditions
protected boolean hasExcludingConditions()
Description copied from class:AbstractQueryWhether 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:
hasExcludingConditionsin classAbstractQuery<HistoricActivityInstanceQuery,HistoricActivityInstance>- Returns:
trueif the query does have excluding conditions,falseotherwise
-
orderByHistoricActivityInstanceDuration
public HistoricActivityInstanceQueryImpl orderByHistoricActivityInstanceDuration()
Description copied from interface:HistoricActivityInstanceQueryOrder by duration (needs to be followed byQuery.asc()orQuery.desc()).- Specified by:
orderByHistoricActivityInstanceDurationin interfaceHistoricActivityInstanceQuery
-
orderByHistoricActivityInstanceEndTime
public HistoricActivityInstanceQueryImpl orderByHistoricActivityInstanceEndTime()
Description copied from interface:HistoricActivityInstanceQueryOrder by end (needs to be followed byQuery.asc()orQuery.desc()).- Specified by:
orderByHistoricActivityInstanceEndTimein interfaceHistoricActivityInstanceQuery
-
orderByExecutionId
public HistoricActivityInstanceQueryImpl orderByExecutionId()
Description copied from interface:HistoricActivityInstanceQueryOrder by executionId (needs to be followed byQuery.asc()orQuery.desc()).- Specified by:
orderByExecutionIdin interfaceHistoricActivityInstanceQuery
-
orderByHistoricActivityInstanceId
public HistoricActivityInstanceQueryImpl orderByHistoricActivityInstanceId()
Description copied from interface:HistoricActivityInstanceQueryOrder by id (needs to be followed byQuery.asc()orQuery.desc()).- Specified by:
orderByHistoricActivityInstanceIdin interfaceHistoricActivityInstanceQuery
-
orderByProcessDefinitionId
public HistoricActivityInstanceQueryImpl orderByProcessDefinitionId()
Description copied from interface:HistoricActivityInstanceQueryOrder by processDefinitionId (needs to be followed byQuery.asc()orQuery.desc()).- Specified by:
orderByProcessDefinitionIdin interfaceHistoricActivityInstanceQuery
-
orderByProcessInstanceId
public HistoricActivityInstanceQueryImpl orderByProcessInstanceId()
Description copied from interface:HistoricActivityInstanceQueryOrder by processInstanceId (needs to be followed byQuery.asc()orQuery.desc()).- Specified by:
orderByProcessInstanceIdin interfaceHistoricActivityInstanceQuery
-
orderByHistoricActivityInstanceStartTime
public HistoricActivityInstanceQueryImpl orderByHistoricActivityInstanceStartTime()
Description copied from interface:HistoricActivityInstanceQueryOrder by start (needs to be followed byQuery.asc()orQuery.desc()).- Specified by:
orderByHistoricActivityInstanceStartTimein interfaceHistoricActivityInstanceQuery
-
orderByActivityId
public HistoricActivityInstanceQuery orderByActivityId()
Description copied from interface:HistoricActivityInstanceQueryOrder by activityId (needs to be followed byQuery.asc()orQuery.desc()).- Specified by:
orderByActivityIdin interfaceHistoricActivityInstanceQuery
-
orderByActivityName
public HistoricActivityInstanceQueryImpl orderByActivityName()
Description copied from interface:HistoricActivityInstanceQueryOrder by activityName (needs to be followed byQuery.asc()orQuery.desc()).- Specified by:
orderByActivityNamein interfaceHistoricActivityInstanceQuery
-
orderByActivityType
public HistoricActivityInstanceQueryImpl orderByActivityType()
Description copied from interface:HistoricActivityInstanceQueryOrder by activityType (needs to be followed byQuery.asc()orQuery.desc()).- Specified by:
orderByActivityTypein interfaceHistoricActivityInstanceQuery
-
orderPartiallyByOccurrence
public HistoricActivityInstanceQuery orderPartiallyByOccurrence()
Description copied from interface:HistoricActivityInstanceQuerySort the
activity instancesin the order in which they occurred (ie. started) and needs to be followed byQuery.asc()orQuery.desc().The set of all
activity instancesis 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 instanceswith differentexecution idsare incomparable. Onlyactivity instanceswith the sameexecution idcan be totally ordered by usingHistoricActivityInstanceQuery.executionId(String)andHistoricActivityInstanceQuery.orderPartiallyByOccurrence()which will return a result set ordered by its occurrence.- Specified by:
orderPartiallyByOccurrencein interfaceHistoricActivityInstanceQuery
-
orderByTenantId
public HistoricActivityInstanceQuery orderByTenantId()
Description copied from interface:HistoricActivityInstanceQueryOrder by tenant id (needs to be followed byQuery.asc()orQuery.desc()). Note that the ordering of historic activity instances without tenant id is database-specific.- Specified by:
orderByTenantIdin interfaceHistoricActivityInstanceQuery
-
activityInstanceId
public HistoricActivityInstanceQueryImpl activityInstanceId(String activityInstanceId)
Description copied from interface:HistoricActivityInstanceQueryOnly select historic activity instances with the given id (primary key within history tables).- Specified by:
activityInstanceIdin interfaceHistoricActivityInstanceQuery
-
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()
-
isTenantIdSet
public boolean isTenantIdSet()
-
-