Class HistoricDetailQueryImpl
- All Implemented Interfaces:
Serializable
,HistoricDetailQuery
,Command<Object>
,Query<HistoricDetailQuery,
HistoricDetail>
- Author:
- Tom Baeyens
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.camunda.bpm.engine.impl.AbstractQuery
AbstractQuery.ResultType
-
Field Summary
Modifier and TypeFieldDescriptionprotected String
protected String
protected String
protected String
protected String
protected boolean
protected String
protected boolean
protected boolean
protected boolean
protected boolean
protected Date
protected Date
protected String
protected String[]
protected Long
protected String
protected String[]
protected String
protected String
protected String
protected String
protected String[]
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
-
Method Summary
Modifier and TypeMethodDescriptionactivityId
(String activityId) Only select historic variable updates associated to the givenactivity instance
.activityInstanceId
(String activityInstanceId) Only select historic variable updates associated to the givenactivity instance
.caseExecutionId
(String caseExecutionId) Only select historic variable updates with the given case execution.caseInstanceId
(String caseInstanceId) Only select historic variable updates with the given case instance.Only select the historic detail with the given id.Disable fetching of byte array and file values.Disable deserialization of variable values that are custom objects.Exclude all task-relatedHistoricDetail
s, so only items which have no task-id set will be selected.long
executeCount
(CommandContext commandContext) executeList
(CommandContext commandContext, Page page) Executes the actual query to retrieve the list of results.executionId
(String executionId) Only select historic variable updates with the given execution.Only selectHistoricFormField
s.Only selectHistoricFormProperty
s.boolean
String[]
getType()
initial()
Only select historic details that were set during the process start.boolean
boolean
occurredAfter
(Date date) Only select historic details that have occurred after the given date (inclusive).occurredBefore
(Date date) Only select historic details that have occurred before the given date (inclusive).Order by tenant id (needs to be followed byQuery.asc()
orQuery.desc()
).Sort thehistoric detail events
in the order in which they occurred and needs to be followed byQuery.asc()
orQuery.desc()
.processInstanceId
(String processInstanceId) Only select historic variable updates with the given process instance.processInstanceIdIn
(String... processInstanceIds) Only select historic details with the given process instance ids.sequenceCounter
(long sequenceCounter) protected boolean
Only select historic variable updates associated to the givenhistoric task instance
.tenantIdIn
(String... tenantIds) Only select historic details with one of the given tenant ids.userOperationId
(String userOperationId) Select historic details related with given userOperationId.variableInstanceId
(String variableInstanceId) Only select historic variable updates associated to the givenhistoric variable instance
.variableNameLike
(String variableNameLike) Only select historic process variables that have a name matching the criteria.variableTypeIn
(String... variableTypes) Only select historic process variables which match one of the given variable types.Only selectHistoricVariableUpdate
s.Only selects historic details 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, 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.query.Query
asc, count, desc, list, listPage, singleResult, unlimitedList
-
Field Details
-
detailId
-
taskId
-
processInstanceId
-
caseInstanceId
-
executionId
-
caseExecutionId
-
activityId
-
activityInstanceId
-
type
-
variableInstanceId
-
variableTypes
-
variableNameLike
-
tenantIds
-
isTenantIdSet
protected boolean isTenantIdSet -
processInstanceIds
-
userOperationId
-
sequenceCounter
-
occurredBefore
-
occurredAfter
-
initial
protected boolean initial -
excludeTaskRelated
protected boolean excludeTaskRelated -
isByteArrayFetchingEnabled
protected boolean isByteArrayFetchingEnabled -
isCustomObjectDeserializationEnabled
protected boolean isCustomObjectDeserializationEnabled
-
-
Constructor Details
-
HistoricDetailQueryImpl
public HistoricDetailQueryImpl() -
HistoricDetailQueryImpl
-
-
Method Details
-
detailId
Description copied from interface:HistoricDetailQuery
Only select the historic detail with the given id.- Specified by:
detailId
in interfaceHistoricDetailQuery
- Parameters:
id
- the historic detail to select- Returns:
- the query builder
-
variableInstanceId
Description copied from interface:HistoricDetailQuery
Only select historic variable updates associated to the givenhistoric variable instance
.- Specified by:
variableInstanceId
in interfaceHistoricDetailQuery
-
variableTypeIn
Description copied from interface:HistoricDetailQuery
Only select historic process variables which match one of the given variable types.- Specified by:
variableTypeIn
in interfaceHistoricDetailQuery
-
variableNameLike
Description copied from interface:HistoricDetailQuery
Only select historic process variables that have a name matching the criteria. The syntax is that of SQL: for example usage: variableNameLike(%camunda%). The query will match the names of variables in a case-insensitive way.- Specified by:
variableNameLike
in interfaceHistoricDetailQuery
-
processInstanceId
Description copied from interface:HistoricDetailQuery
Only select historic variable updates with the given process instance.ProcessInstance
ids andHistoricProcessInstance
ids match.- Specified by:
processInstanceId
in interfaceHistoricDetailQuery
-
caseInstanceId
Description copied from interface:HistoricDetailQuery
Only select historic variable updates with the given case instance.CaseInstance
ids andHistoricCaseInstance
ids match.- Specified by:
caseInstanceId
in interfaceHistoricDetailQuery
-
executionId
Description copied from interface:HistoricDetailQuery
Only select historic variable updates with the given execution. Note thatExecution
ids are not stored in the history as first class citizen, only process instances are.- Specified by:
executionId
in interfaceHistoricDetailQuery
-
caseExecutionId
Description copied from interface:HistoricDetailQuery
Only select historic variable updates with the given case execution. Note thatCaseExecution
ids are not stored in the history as first class citizen, only case instances are.- Specified by:
caseExecutionId
in interfaceHistoricDetailQuery
-
activityId
Description copied from interface:HistoricDetailQuery
Only select historic variable updates associated to the givenactivity instance
.- Specified by:
activityId
in interfaceHistoricDetailQuery
-
activityInstanceId
Description copied from interface:HistoricDetailQuery
Only select historic variable updates associated to the givenactivity instance
.- Specified by:
activityInstanceId
in interfaceHistoricDetailQuery
-
taskId
Description copied from interface:HistoricDetailQuery
Only select historic variable updates associated to the givenhistoric task instance
.- Specified by:
taskId
in interfaceHistoricDetailQuery
-
formProperties
Description copied from interface:HistoricDetailQuery
Only selectHistoricFormProperty
s.- Specified by:
formProperties
in interfaceHistoricDetailQuery
-
formFields
Description copied from interface:HistoricDetailQuery
Only selectHistoricFormField
s.- Specified by:
formFields
in interfaceHistoricDetailQuery
-
variableUpdates
Description copied from interface:HistoricDetailQuery
Only selectHistoricVariableUpdate
s.- Specified by:
variableUpdates
in interfaceHistoricDetailQuery
-
tenantIdIn
Description copied from interface:HistoricDetailQuery
Only select historic details with one of the given tenant ids.- Specified by:
tenantIdIn
in interfaceHistoricDetailQuery
-
withoutTenantId
Description copied from interface:HistoricDetailQuery
Only selects historic details that have no tenant id.- Specified by:
withoutTenantId
in interfaceHistoricDetailQuery
-
processInstanceIdIn
Description copied from interface:HistoricDetailQuery
Only select historic details with the given process instance ids.- Specified by:
processInstanceIdIn
in interfaceHistoricDetailQuery
-
userOperationId
Description copied from interface:HistoricDetailQuery
Select historic details related with given userOperationId.- Specified by:
userOperationId
in interfaceHistoricDetailQuery
-
sequenceCounter
-
excludeTaskDetails
Description copied from interface:HistoricDetailQuery
Exclude all task-relatedHistoricDetail
s, so only items which have no task-id set will be selected. When used together withHistoricDetailQuery.taskId(String)
, this call is ignored task details are NOT excluded.- Specified by:
excludeTaskDetails
in interfaceHistoricDetailQuery
-
occurredBefore
Description copied from interface:HistoricDetailQuery
Only select historic details that have occurred before the given date (inclusive).- Specified by:
occurredBefore
in interfaceHistoricDetailQuery
-
occurredAfter
Description copied from interface:HistoricDetailQuery
Only select historic details that have occurred after the given date (inclusive).- Specified by:
occurredAfter
in interfaceHistoricDetailQuery
-
executeCount
- Specified by:
executeCount
in classAbstractQuery<HistoricDetailQuery,
HistoricDetail>
-
disableBinaryFetching
Description copied from interface:HistoricDetailQuery
Disable fetching of byte array and file values. By default, the query will fetch such values. By calling this method you can prevent the values of (potentially large) blob data chunks to be fetched. The variables themselves are nonetheless included in the query result.- Specified by:
disableBinaryFetching
in interfaceHistoricDetailQuery
- Returns:
- the query builder
-
disableCustomObjectDeserialization
Description copied from interface:HistoricDetailQuery
Disable deserialization of variable values that are custom objects. By default, the query will attempt to deserialize the value of these variables. By calling this method you can prevent such attempts in environments where their classes are not available. Independent of this setting, variable serialized values are accessible.- Specified by:
disableCustomObjectDeserialization
in interfaceHistoricDetailQuery
-
initial
Description copied from interface:HistoricDetailQuery
Only select historic details that were set during the process start.- Specified by:
initial
in interfaceHistoricDetailQuery
-
executeList
Description copied from class:AbstractQuery
Executes the actual query to retrieve the list of results.- Specified by:
executeList
in classAbstractQuery<HistoricDetailQuery,
HistoricDetail> page
- used if the results must be paged. If null, no paging will be applied.
-
shouldFetchValue
-
orderByProcessInstanceId
- Specified by:
orderByProcessInstanceId
in interfaceHistoricDetailQuery
-
orderByTime
- Specified by:
orderByTime
in interfaceHistoricDetailQuery
-
orderByVariableName
- Specified by:
orderByVariableName
in interfaceHistoricDetailQuery
-
orderByFormPropertyId
- Specified by:
orderByFormPropertyId
in interfaceHistoricDetailQuery
-
orderByVariableRevision
- Specified by:
orderByVariableRevision
in interfaceHistoricDetailQuery
-
orderByVariableType
- Specified by:
orderByVariableType
in interfaceHistoricDetailQuery
-
orderPartiallyByOccurrence
Description copied from interface:HistoricDetailQuery
Sort the
historic detail events
in the order in which they occurred and needs to be followed byQuery.asc()
orQuery.desc()
.The set of all
historic variable update events
is a partially ordered set. Due to this facthistoric variable update events
for two differentvariable instances
are incomparable. So that it is not possible to sort thehistoric variable update events
for twovariable instances
in the order they occurred. Just for onevariable instance
the set ofhistoric variable update events
can be totally ordered by usingHistoricDetailQuery.variableInstanceId(String)
andHistoricDetailQuery.orderPartiallyByOccurrence()
which will return a result set ordered by its occurrence.For example:
An execution variablemyVariable
will be updated multiple times:runtimeService.setVariable("anExecutionId", "myVariable", 1000);
execution.setVariable("myVariable", 5000);
runtimeService.setVariable("anExecutionId", "myVariable", 2500);
runtimeService.removeVariable("anExecutionId", "myVariable");As a result there exists four
historic variable update events
.By using
HistoricDetailQuery.variableInstanceId(String)
andHistoricDetailQuery.orderPartiallyByOccurrence()
it is possible to sort the events in the order in which they occurred. The following queryhistoryService.createHistoricDetailQuery()
.variableInstanceId("myVariableInstId")
.orderPartiallyByOccurrence()
.asc()
.list()will return the following totally ordered result set
[
HistoricVariableUpdate[id: "myVariableInstId", variableName: "myVariable", value: 1000],
HistoricVariableUpdate[id: "myVariableInstId", variableName: "myVariable", value: 5000],
HistoricVariableUpdate[id: "myVariableInstId", variableName: "myVariable", value: 2500]
HistoricVariableUpdate[id: "myVariableInstId", variableName: "myVariable", value: null]
]Note:
Please note that ahistoric form field event
can occur only once.- Specified by:
orderPartiallyByOccurrence
in interfaceHistoricDetailQuery
-
orderByTenantId
Description copied from interface:HistoricDetailQuery
Order by tenant id (needs to be followed byQuery.asc()
orQuery.desc()
). Note that the ordering of historic details without tenant id is database-specific.- Specified by:
orderByTenantId
in interfaceHistoricDetailQuery
-
getProcessInstanceId
-
getCaseInstanceId
-
getExecutionId
-
getCaseExecutionId
-
getTaskId
-
getActivityId
-
getType
-
getExcludeTaskRelated
public boolean getExcludeTaskRelated() -
getDetailId
-
getProcessInstanceIds
-
getOccurredBefore
-
getOccurredAfter
-
isTenantIdSet
public boolean isTenantIdSet() -
isInitial
public boolean isInitial()
-