public class HistoricDetailQueryImpl extends AbstractQuery<HistoricDetailQuery,HistoricDetail> implements HistoricDetailQuery
AbstractQuery.ResultType
Modifier and Type | Field and Description |
---|---|
protected String |
activityId |
protected String |
activityInstanceId |
protected String |
caseExecutionId |
protected String |
caseInstanceId |
protected String |
detailId |
protected boolean |
excludeTaskRelated |
protected String |
executionId |
protected boolean |
isByteArrayFetchingEnabled |
protected boolean |
isCustomObjectDeserializationEnabled |
protected boolean |
isTenantIdSet |
protected Date |
occurredAfter |
protected Date |
occurredBefore |
protected String |
processInstanceId |
protected String[] |
processInstanceIds |
protected Long |
sequenceCounter |
protected String |
taskId |
protected String[] |
tenantIds |
protected String |
type |
protected String |
userOperationId |
protected String |
variableInstanceId |
protected String[] |
variableTypes |
commandExecutor, expressions, maxResultsLimitEnabled, resultType, SORTORDER_ASC, SORTORDER_DESC, validators
authCheck, databaseType, firstResult, maxResults, orderingProperties, parameter, tenantCheck
Constructor and Description |
---|
HistoricDetailQueryImpl() |
HistoricDetailQueryImpl(CommandExecutor commandExecutor) |
Modifier and Type | Method and Description |
---|---|
HistoricDetailQuery |
activityId(String activityId)
Only select historic variable updates associated to the given
activity instance . |
HistoricDetailQuery |
activityInstanceId(String activityInstanceId)
Only select historic variable updates associated to the given
activity instance . |
HistoricDetailQuery |
caseExecutionId(String caseExecutionId)
Only select historic variable updates with the given case execution.
|
HistoricDetailQuery |
caseInstanceId(String caseInstanceId)
Only select historic variable updates with the given case instance.
|
HistoricDetailQuery |
detailId(String id)
Only select the historic detail with the given id.
|
HistoricDetailQuery |
disableBinaryFetching()
Disable fetching of byte array and file values.
|
HistoricDetailQuery |
disableCustomObjectDeserialization()
Disable deserialization of variable values that are custom objects.
|
HistoricDetailQuery |
excludeTaskDetails()
Exclude all task-related
HistoricDetail s, so only items which have no
task-id set will be selected. |
long |
executeCount(CommandContext commandContext) |
List<HistoricDetail> |
executeList(CommandContext commandContext,
Page page)
Executes the actual query to retrieve the list of results.
|
HistoricDetailQuery |
executionId(String executionId)
Only select historic variable updates with the given execution.
|
HistoricDetailQuery |
formFields()
Only select
HistoricFormField s. |
HistoricDetailQuery |
formProperties()
Only select
HistoricFormProperty s. |
String |
getActivityId() |
String |
getCaseExecutionId() |
String |
getCaseInstanceId() |
String |
getDetailId() |
boolean |
getExcludeTaskRelated() |
String |
getExecutionId() |
Date |
getOccurredAfter() |
Date |
getOccurredBefore() |
String |
getProcessInstanceId() |
String[] |
getProcessInstanceIds() |
String |
getTaskId() |
String |
getType() |
boolean |
isTenantIdSet() |
HistoricDetailQuery |
occurredAfter(Date date)
Only select historic details that have occurred after the given date (inclusive).
|
HistoricDetailQuery |
occurredBefore(Date date)
Only select historic details that have occurred before the given date (inclusive).
|
HistoricDetailQuery |
orderByFormPropertyId() |
HistoricDetailQuery |
orderByProcessInstanceId() |
HistoricDetailQuery |
orderByTenantId()
Order by tenant id (needs to be followed by
Query.asc() or Query.desc() ). |
HistoricDetailQuery |
orderByTime() |
HistoricDetailQuery |
orderByVariableName() |
HistoricDetailQuery |
orderByVariableRevision() |
HistoricDetailQuery |
orderByVariableType() |
HistoricDetailQuery |
orderPartiallyByOccurrence()
Sort the
historic detail events in the order in which
they occurred and needs to be followed by Query.asc() or Query.desc() . |
HistoricDetailQuery |
processInstanceId(String processInstanceId)
Only select historic variable updates with the given process instance.
|
HistoricDetailQuery |
processInstanceIdIn(String... processInstanceIds)
Only select historic details with the given process instance ids.
|
HistoricDetailQueryImpl |
sequenceCounter(long sequenceCounter) |
protected boolean |
shouldFetchValue(HistoricDetailVariableInstanceUpdateEntity entity) |
HistoricDetailQuery |
taskId(String taskId)
Only select historic variable updates associated to the given
historic task instance . |
HistoricDetailQuery |
tenantIdIn(String... tenantIds)
Only select historic details with one of the given tenant ids.
|
HistoricDetailQuery |
userOperationId(String userOperationId)
Select historic details related with given userOperationId.
|
HistoricDetailQuery |
variableInstanceId(String variableInstanceId)
Only select historic variable updates associated to the given
historic variable instance . |
HistoricDetailQuery |
variableTypeIn(String... variableTypes)
Only select historic process variables which match one of the given variable types.
|
HistoricDetailQuery |
variableUpdates()
Only select
HistoricVariableUpdate s. |
HistoricDetailQuery |
withoutTenantId()
Only selects historic details that have no tenant id.
|
addExpression, addValidator, asc, checkMaxResultsLimit, checkQueryOk, count, desc, direction, disableMaxResultsLimit, enableMaxResultsLimit, evaluateExpressions, evaluateExpressionsAndExecuteCount, evaluateExpressionsAndExecuteIdsList, evaluateExpressionsAndExecuteList, execute, executeIdsList, executeResult, executeSingleResult, extend, getExpressions, getMethod, hasExcludingConditions, list, listIds, listPage, mergeExpressions, mergeOrdering, orderBy, orderBy, removeValidator, setCommandExecutor, setExpressions, singleResult, unlimitedList, validate, validate
getAuthCheck, getDatabaseType, getFirstResult, getFirstRow, getLastRow, getMaxResults, getOrderingProperties, getParameter, getTenantCheck, setAuthCheck, setDatabaseType, setFirstResult, setMaxResults, setOrderingProperties, setParameter, setTenantCheck
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
asc, count, desc, list, listPage, singleResult, unlimitedList
protected String detailId
protected String taskId
protected String processInstanceId
protected String caseInstanceId
protected String executionId
protected String caseExecutionId
protected String activityId
protected String activityInstanceId
protected String type
protected String variableInstanceId
protected String[] variableTypes
protected String[] tenantIds
protected boolean isTenantIdSet
protected String[] processInstanceIds
protected String userOperationId
protected Long sequenceCounter
protected Date occurredBefore
protected Date occurredAfter
protected boolean excludeTaskRelated
protected boolean isByteArrayFetchingEnabled
protected boolean isCustomObjectDeserializationEnabled
public HistoricDetailQueryImpl()
public HistoricDetailQueryImpl(CommandExecutor commandExecutor)
public HistoricDetailQuery detailId(String id)
HistoricDetailQuery
detailId
in interface HistoricDetailQuery
id
- the historic detail to selectpublic HistoricDetailQuery variableInstanceId(String variableInstanceId)
HistoricDetailQuery
historic variable instance
.variableInstanceId
in interface HistoricDetailQuery
public HistoricDetailQuery variableTypeIn(String... variableTypes)
HistoricDetailQuery
variableTypeIn
in interface HistoricDetailQuery
public HistoricDetailQuery processInstanceId(String processInstanceId)
HistoricDetailQuery
ProcessInstance
ids and HistoricProcessInstance
ids match.processInstanceId
in interface HistoricDetailQuery
public HistoricDetailQuery caseInstanceId(String caseInstanceId)
HistoricDetailQuery
CaseInstance
ids and HistoricCaseInstance
ids match.caseInstanceId
in interface HistoricDetailQuery
public HistoricDetailQuery executionId(String executionId)
HistoricDetailQuery
Execution
ids are not stored in the history as first class citizen,
only process instances are.executionId
in interface HistoricDetailQuery
public HistoricDetailQuery caseExecutionId(String caseExecutionId)
HistoricDetailQuery
CaseExecution
ids are not stored in the history as first class citizen,
only case instances are.caseExecutionId
in interface HistoricDetailQuery
public HistoricDetailQuery activityId(String activityId)
HistoricDetailQuery
activity instance
.activityId
in interface HistoricDetailQuery
public HistoricDetailQuery activityInstanceId(String activityInstanceId)
HistoricDetailQuery
activity instance
.activityInstanceId
in interface HistoricDetailQuery
public HistoricDetailQuery taskId(String taskId)
HistoricDetailQuery
historic task instance
.taskId
in interface HistoricDetailQuery
public HistoricDetailQuery formProperties()
HistoricDetailQuery
HistoricFormProperty
s.formProperties
in interface HistoricDetailQuery
public HistoricDetailQuery formFields()
HistoricDetailQuery
HistoricFormField
s.formFields
in interface HistoricDetailQuery
public HistoricDetailQuery variableUpdates()
HistoricDetailQuery
HistoricVariableUpdate
s.variableUpdates
in interface HistoricDetailQuery
public HistoricDetailQuery tenantIdIn(String... tenantIds)
HistoricDetailQuery
tenantIdIn
in interface HistoricDetailQuery
public HistoricDetailQuery withoutTenantId()
HistoricDetailQuery
withoutTenantId
in interface HistoricDetailQuery
public HistoricDetailQuery processInstanceIdIn(String... processInstanceIds)
HistoricDetailQuery
processInstanceIdIn
in interface HistoricDetailQuery
public HistoricDetailQuery userOperationId(String userOperationId)
HistoricDetailQuery
userOperationId
in interface HistoricDetailQuery
public HistoricDetailQueryImpl sequenceCounter(long sequenceCounter)
public HistoricDetailQuery excludeTaskDetails()
HistoricDetailQuery
HistoricDetail
s, so only items which have no
task-id set will be selected. When used together with HistoricDetailQuery.taskId(String)
, this
call is ignored task details are NOT excluded.excludeTaskDetails
in interface HistoricDetailQuery
public HistoricDetailQuery occurredBefore(Date date)
HistoricDetailQuery
occurredBefore
in interface HistoricDetailQuery
public HistoricDetailQuery occurredAfter(Date date)
HistoricDetailQuery
occurredAfter
in interface HistoricDetailQuery
public long executeCount(CommandContext commandContext)
executeCount
in class AbstractQuery<HistoricDetailQuery,HistoricDetail>
public HistoricDetailQuery disableBinaryFetching()
HistoricDetailQuery
disableBinaryFetching
in interface HistoricDetailQuery
public HistoricDetailQuery disableCustomObjectDeserialization()
HistoricDetailQuery
disableCustomObjectDeserialization
in interface HistoricDetailQuery
public List<HistoricDetail> executeList(CommandContext commandContext, Page page)
AbstractQuery
executeList
in class AbstractQuery<HistoricDetailQuery,HistoricDetail>
page
- used if the results must be paged. If null, no paging will be applied.protected boolean shouldFetchValue(HistoricDetailVariableInstanceUpdateEntity entity)
public HistoricDetailQuery orderByProcessInstanceId()
orderByProcessInstanceId
in interface HistoricDetailQuery
public HistoricDetailQuery orderByTime()
orderByTime
in interface HistoricDetailQuery
public HistoricDetailQuery orderByVariableName()
orderByVariableName
in interface HistoricDetailQuery
public HistoricDetailQuery orderByFormPropertyId()
orderByFormPropertyId
in interface HistoricDetailQuery
public HistoricDetailQuery orderByVariableRevision()
orderByVariableRevision
in interface HistoricDetailQuery
public HistoricDetailQuery orderByVariableType()
orderByVariableType
in interface HistoricDetailQuery
public HistoricDetailQuery orderPartiallyByOccurrence()
HistoricDetailQuery
Sort the historic detail events
in the order in which
they occurred and needs to be followed by Query.asc()
or Query.desc()
.
The set of all historic variable update events
is
a partially ordered set. Due to this fact historic variable update events
for two different variable
instances
are incomparable. So that it is not possible to sort
the historic variable update events
for two variable instances
in the order they occurred. Just for one variable
instance
the set of historic variable update events
can be
totally ordered by using HistoricDetailQuery.variableInstanceId(String)
and HistoricDetailQuery.orderPartiallyByOccurrence()
which will return a result set ordered by its occurrence.
For example:
An execution variable myVariable
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)
and HistoricDetailQuery.orderPartiallyByOccurrence()
it
is possible to sort the events in the order in which they occurred. The following query
historyService.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 a historic form field event
can occur only once.
orderPartiallyByOccurrence
in interface HistoricDetailQuery
public HistoricDetailQuery orderByTenantId()
HistoricDetailQuery
Query.asc()
or Query.desc()
).
Note that the ordering of historic details without tenant id is database-specific.orderByTenantId
in interface HistoricDetailQuery
public String getProcessInstanceId()
public String getCaseInstanceId()
public String getExecutionId()
public String getCaseExecutionId()
public String getTaskId()
public String getActivityId()
public String getType()
public boolean getExcludeTaskRelated()
public String getDetailId()
public String[] getProcessInstanceIds()
public Date getOccurredBefore()
public Date getOccurredAfter()
public boolean isTenantIdSet()
Copyright © 2019. All rights reserved.