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:
java.io.Serializable
,HistoricActivityInstanceQuery
,Command<java.lang.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 java.lang.String
activityId
protected java.lang.String
activityInstanceId
protected ActivityInstanceState
activityInstanceState
protected java.lang.String
activityName
protected java.lang.String
activityNameLike
protected java.lang.String
activityType
protected java.lang.String
assignee
protected java.lang.String
executionId
protected boolean
finished
protected java.util.Date
finishedAfter
protected java.util.Date
finishedBefore
protected boolean
isTenantIdSet
protected java.lang.String
processDefinitionId
protected java.lang.String
processInstanceId
protected java.util.Date
startedAfter
protected java.util.Date
startedBefore
protected java.lang.String[]
tenantIds
protected boolean
unfinished
-
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 HistoricActivityInstanceQueryImpl
activityId(java.lang.String activityId)
Only select historic activity instances for the given activity (id from BPMN 2.0 XML)HistoricActivityInstanceQueryImpl
activityInstanceId(java.lang.String activityInstanceId)
Only select historic activity instances with the given id (primary key within history tables).HistoricActivityInstanceQueryImpl
activityName(java.lang.String activityName)
Only select historic activity instances for activities with the given nameHistoricActivityInstanceQueryImpl
activityNameLike(java.lang.String activityNameLike)
Only select historic activity instances for activities which activityName is like the given value.HistoricActivityInstanceQueryImpl
activityType(java.lang.String activityType)
Only select historic activity instances for activities with the given activity typeHistoricActivityInstanceQueryImpl
canceled()
Only select historic activity instances that got canceledHistoricActivityInstanceQueryImpl
completeScope()
Only select historic activity instances that complete a BPMN scopelong
executeCount(CommandContext commandContext)
java.util.List<HistoricActivityInstance>
executeList(CommandContext commandContext, Page page)
Executes the actual query to retrieve the list of results.HistoricActivityInstanceQueryImpl
executionId(java.lang.String executionId)
Only select historic activity instances for the given executionHistoricActivityInstanceQueryImpl
finished()
Only select historic activity instances that are finished.HistoricActivityInstanceQueryImpl
finishedAfter(java.util.Date date)
Only select historic activity instances that were started after the given date.HistoricActivityInstanceQueryImpl
finishedBefore(java.util.Date date)
Only select historic activity instances that were started before the given date.java.lang.String
getActivityId()
java.lang.String
getActivityInstanceId()
ActivityInstanceState
getActivityInstanceState()
java.lang.String
getActivityName()
java.lang.String
getActivityType()
java.lang.String
getAssignee()
java.lang.String
getExecutionId()
java.util.Date
getFinishedAfter()
java.util.Date
getFinishedBefore()
java.lang.String
getProcessDefinitionId()
java.lang.String
getProcessInstanceId()
java.util.Date
getStartedAfter()
java.util.Date
getStartedBefore()
protected boolean
hasExcludingConditions()
Whether or not the query has excluding conditions.boolean
isFinished()
boolean
isTenantIdSet()
boolean
isUnfinished()
HistoricActivityInstanceQuery
orderByActivityId()
Order by activityId (needs to be followed byQuery.asc()
orQuery.desc()
).HistoricActivityInstanceQueryImpl
orderByActivityName()
Order by activityName (needs to be followed byQuery.asc()
orQuery.desc()
).HistoricActivityInstanceQueryImpl
orderByActivityType()
Order by activityType (needs to be followed byQuery.asc()
orQuery.desc()
).HistoricActivityInstanceQueryImpl
orderByExecutionId()
Order by executionId (needs to be followed byQuery.asc()
orQuery.desc()
).HistoricActivityInstanceQueryImpl
orderByHistoricActivityInstanceDuration()
Order by duration (needs to be followed byQuery.asc()
orQuery.desc()
).HistoricActivityInstanceQueryImpl
orderByHistoricActivityInstanceEndTime()
Order by end (needs to be followed byQuery.asc()
orQuery.desc()
).HistoricActivityInstanceQueryImpl
orderByHistoricActivityInstanceId()
Order by id (needs to be followed byQuery.asc()
orQuery.desc()
).HistoricActivityInstanceQueryImpl
orderByHistoricActivityInstanceStartTime()
Order by start (needs to be followed byQuery.asc()
orQuery.desc()
).HistoricActivityInstanceQueryImpl
orderByProcessDefinitionId()
Order by processDefinitionId (needs to be followed byQuery.asc()
orQuery.desc()
).HistoricActivityInstanceQueryImpl
orderByProcessInstanceId()
Order by processInstanceId (needs to be followed byQuery.asc()
orQuery.desc()
).HistoricActivityInstanceQuery
orderByTenantId()
Order by tenant id (needs to be followed byQuery.asc()
orQuery.desc()
).HistoricActivityInstanceQuery
orderPartiallyByOccurrence()
Sort theactivity instances
in the order in which they occurred (ie.HistoricActivityInstanceQueryImpl
processDefinitionId(java.lang.String processDefinitionId)
Only select historic activity instances for the given process definitionHistoricActivityInstanceQueryImpl
processInstanceId(java.lang.String processInstanceId)
Only select historic activity instances with the given process instance.HistoricActivityInstanceQueryImpl
startedAfter(java.util.Date date)
Only select historic activity instances that were started after the given date.HistoricActivityInstanceQueryImpl
startedBefore(java.util.Date date)
Only select historic activity instances that were started before the given date.HistoricActivityInstanceQueryImpl
taskAssignee(java.lang.String assignee)
Only select historic activity instances for userTask activities assigned to the given userHistoricActivityInstanceQuery
tenantIdIn(java.lang.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.HistoricActivityInstanceQuery
withoutTenantId()
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 java.lang.String activityInstanceId
-
processInstanceId
protected java.lang.String processInstanceId
-
executionId
protected java.lang.String executionId
-
processDefinitionId
protected java.lang.String processDefinitionId
-
activityId
protected java.lang.String activityId
-
activityName
protected java.lang.String activityName
-
activityNameLike
protected java.lang.String activityNameLike
-
activityType
protected java.lang.String activityType
-
assignee
protected java.lang.String assignee
-
finished
protected boolean finished
-
unfinished
protected boolean unfinished
-
startedBefore
protected java.util.Date startedBefore
-
startedAfter
protected java.util.Date startedAfter
-
finishedBefore
protected java.util.Date finishedBefore
-
finishedAfter
protected java.util.Date finishedAfter
-
activityInstanceState
protected ActivityInstanceState activityInstanceState
-
tenantIds
protected java.lang.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:
executeCount
in classAbstractQuery<HistoricActivityInstanceQuery,HistoricActivityInstance>
-
executeList
public java.util.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 classAbstractQuery<HistoricActivityInstanceQuery,HistoricActivityInstance>
page
- used if the results must be paged. If null, no paging will be applied.
-
processInstanceId
public HistoricActivityInstanceQueryImpl processInstanceId(java.lang.String processInstanceId)
Description copied from interface:HistoricActivityInstanceQuery
Only select historic activity instances with the given process instance.) ids and {@link HistoricProcessInstance} ids match.
- Specified by:
processInstanceId
in interfaceHistoricActivityInstanceQuery
-
executionId
public HistoricActivityInstanceQueryImpl executionId(java.lang.String executionId)
Description copied from interface:HistoricActivityInstanceQuery
Only select historic activity instances for the given execution- Specified by:
executionId
in interfaceHistoricActivityInstanceQuery
-
processDefinitionId
public HistoricActivityInstanceQueryImpl processDefinitionId(java.lang.String processDefinitionId)
Description copied from interface:HistoricActivityInstanceQuery
Only select historic activity instances for the given process definition- Specified by:
processDefinitionId
in interfaceHistoricActivityInstanceQuery
-
activityId
public HistoricActivityInstanceQueryImpl activityId(java.lang.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 interfaceHistoricActivityInstanceQuery
-
activityName
public HistoricActivityInstanceQueryImpl activityName(java.lang.String activityName)
Description copied from interface:HistoricActivityInstanceQuery
Only select historic activity instances for activities with the given name- Specified by:
activityName
in interfaceHistoricActivityInstanceQuery
-
activityNameLike
public HistoricActivityInstanceQueryImpl activityNameLike(java.lang.String activityNameLike)
Description copied from interface:HistoricActivityInstanceQuery
Only select historic activity instances for activities which activityName is like the given value.- Specified by:
activityNameLike
in 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(java.lang.String activityType)
Description copied from interface:HistoricActivityInstanceQuery
Only select historic activity instances for activities with the given activity type- Specified by:
activityType
in interfaceHistoricActivityInstanceQuery
-
taskAssignee
public HistoricActivityInstanceQueryImpl taskAssignee(java.lang.String assignee)
Description copied from interface:HistoricActivityInstanceQuery
Only select historic activity instances for userTask activities assigned to the given user- Specified by:
taskAssignee
in interfaceHistoricActivityInstanceQuery
-
finished
public HistoricActivityInstanceQueryImpl finished()
Description copied from interface:HistoricActivityInstanceQuery
Only select historic activity instances that are finished.- Specified by:
finished
in interfaceHistoricActivityInstanceQuery
-
unfinished
public HistoricActivityInstanceQueryImpl unfinished()
Description copied from interface:HistoricActivityInstanceQuery
Only select historic activity instances that are not finished yet.- Specified by:
unfinished
in interfaceHistoricActivityInstanceQuery
-
completeScope
public HistoricActivityInstanceQueryImpl completeScope()
Description copied from interface:HistoricActivityInstanceQuery
Only select historic activity instances that complete a BPMN scope- Specified by:
completeScope
in interfaceHistoricActivityInstanceQuery
-
canceled
public HistoricActivityInstanceQueryImpl canceled()
Description copied from interface:HistoricActivityInstanceQuery
Only select historic activity instances that got canceled- Specified by:
canceled
in interfaceHistoricActivityInstanceQuery
-
startedAfter
public HistoricActivityInstanceQueryImpl startedAfter(java.util.Date date)
Description copied from interface:HistoricActivityInstanceQuery
Only select historic activity instances that were started after the given date.- Specified by:
startedAfter
in interfaceHistoricActivityInstanceQuery
-
startedBefore
public HistoricActivityInstanceQueryImpl startedBefore(java.util.Date date)
Description copied from interface:HistoricActivityInstanceQuery
Only select historic activity instances that were started before the given date.- Specified by:
startedBefore
in interfaceHistoricActivityInstanceQuery
-
finishedAfter
public HistoricActivityInstanceQueryImpl finishedAfter(java.util.Date date)
Description copied from interface:HistoricActivityInstanceQuery
Only select historic activity instances that were started after the given date.- Specified by:
finishedAfter
in interfaceHistoricActivityInstanceQuery
-
finishedBefore
public HistoricActivityInstanceQueryImpl finishedBefore(java.util.Date date)
Description copied from interface:HistoricActivityInstanceQuery
Only select historic activity instances that were started before the given date.- Specified by:
finishedBefore
in interfaceHistoricActivityInstanceQuery
-
tenantIdIn
public HistoricActivityInstanceQuery tenantIdIn(java.lang.String... tenantIds)
Description copied from interface:HistoricActivityInstanceQuery
Only select historic activity instances with one of the given tenant ids.- Specified by:
tenantIdIn
in interfaceHistoricActivityInstanceQuery
-
withoutTenantId
public HistoricActivityInstanceQuery withoutTenantId()
Description copied from interface:HistoricActivityInstanceQuery
Only selects historic activity instances that have no tenant id.- Specified by:
withoutTenantId
in interfaceHistoricActivityInstanceQuery
-
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 classAbstractQuery<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 byQuery.asc()
orQuery.desc()
).- Specified by:
orderByHistoricActivityInstanceDuration
in interfaceHistoricActivityInstanceQuery
-
orderByHistoricActivityInstanceEndTime
public HistoricActivityInstanceQueryImpl orderByHistoricActivityInstanceEndTime()
Description copied from interface:HistoricActivityInstanceQuery
Order by end (needs to be followed byQuery.asc()
orQuery.desc()
).- Specified by:
orderByHistoricActivityInstanceEndTime
in interfaceHistoricActivityInstanceQuery
-
orderByExecutionId
public HistoricActivityInstanceQueryImpl orderByExecutionId()
Description copied from interface:HistoricActivityInstanceQuery
Order by executionId (needs to be followed byQuery.asc()
orQuery.desc()
).- Specified by:
orderByExecutionId
in interfaceHistoricActivityInstanceQuery
-
orderByHistoricActivityInstanceId
public HistoricActivityInstanceQueryImpl orderByHistoricActivityInstanceId()
Description copied from interface:HistoricActivityInstanceQuery
Order by id (needs to be followed byQuery.asc()
orQuery.desc()
).- Specified by:
orderByHistoricActivityInstanceId
in interfaceHistoricActivityInstanceQuery
-
orderByProcessDefinitionId
public HistoricActivityInstanceQueryImpl orderByProcessDefinitionId()
Description copied from interface:HistoricActivityInstanceQuery
Order by processDefinitionId (needs to be followed byQuery.asc()
orQuery.desc()
).- Specified by:
orderByProcessDefinitionId
in interfaceHistoricActivityInstanceQuery
-
orderByProcessInstanceId
public HistoricActivityInstanceQueryImpl orderByProcessInstanceId()
Description copied from interface:HistoricActivityInstanceQuery
Order by processInstanceId (needs to be followed byQuery.asc()
orQuery.desc()
).- Specified by:
orderByProcessInstanceId
in interfaceHistoricActivityInstanceQuery
-
orderByHistoricActivityInstanceStartTime
public HistoricActivityInstanceQueryImpl orderByHistoricActivityInstanceStartTime()
Description copied from interface:HistoricActivityInstanceQuery
Order by start (needs to be followed byQuery.asc()
orQuery.desc()
).- Specified by:
orderByHistoricActivityInstanceStartTime
in interfaceHistoricActivityInstanceQuery
-
orderByActivityId
public HistoricActivityInstanceQuery orderByActivityId()
Description copied from interface:HistoricActivityInstanceQuery
Order by activityId (needs to be followed byQuery.asc()
orQuery.desc()
).- Specified by:
orderByActivityId
in interfaceHistoricActivityInstanceQuery
-
orderByActivityName
public HistoricActivityInstanceQueryImpl orderByActivityName()
Description copied from interface:HistoricActivityInstanceQuery
Order by activityName (needs to be followed byQuery.asc()
orQuery.desc()
).- Specified by:
orderByActivityName
in interfaceHistoricActivityInstanceQuery
-
orderByActivityType
public HistoricActivityInstanceQueryImpl orderByActivityType()
Description copied from interface:HistoricActivityInstanceQuery
Order by activityType (needs to be followed byQuery.asc()
orQuery.desc()
).- Specified by:
orderByActivityType
in interfaceHistoricActivityInstanceQuery
-
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 byQuery.asc()
orQuery.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 differentexecution ids
are incomparable. Onlyactivity instances
with the sameexecution id
can be totally ordered by usingHistoricActivityInstanceQuery.executionId(String)
andHistoricActivityInstanceQuery.orderPartiallyByOccurrence()
which will return a result set ordered by its occurrence.- Specified by:
orderPartiallyByOccurrence
in interfaceHistoricActivityInstanceQuery
-
orderByTenantId
public HistoricActivityInstanceQuery orderByTenantId()
Description copied from interface:HistoricActivityInstanceQuery
Order 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:
orderByTenantId
in interfaceHistoricActivityInstanceQuery
-
activityInstanceId
public HistoricActivityInstanceQueryImpl activityInstanceId(java.lang.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 interfaceHistoricActivityInstanceQuery
-
getProcessInstanceId
public java.lang.String getProcessInstanceId()
-
getExecutionId
public java.lang.String getExecutionId()
-
getProcessDefinitionId
public java.lang.String getProcessDefinitionId()
-
getActivityId
public java.lang.String getActivityId()
-
getActivityName
public java.lang.String getActivityName()
-
getActivityType
public java.lang.String getActivityType()
-
getAssignee
public java.lang.String getAssignee()
-
isFinished
public boolean isFinished()
-
isUnfinished
public boolean isUnfinished()
-
getActivityInstanceId
public java.lang.String getActivityInstanceId()
-
getStartedAfter
public java.util.Date getStartedAfter()
-
getStartedBefore
public java.util.Date getStartedBefore()
-
getFinishedAfter
public java.util.Date getFinishedAfter()
-
getFinishedBefore
public java.util.Date getFinishedBefore()
-
getActivityInstanceState
public ActivityInstanceState getActivityInstanceState()
-
isTenantIdSet
public boolean isTenantIdSet()
-
-