public class HistoricDetailQueryImpl extends AbstractQuery<HistoricDetailQuery,HistoricDetail> implements HistoricDetailQuery
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 String |
processInstanceId |
protected String |
taskId |
protected String |
type |
protected String |
variableInstanceId |
commandExecutor, expressions, orderingProperties, resultType, SORTORDER_ASC, SORTORDER_DESC, validators
databaseType, DEFAULT_ORDER_BY, firstResult, maxResults, orderBy, parameter
authDefaultPerm, authGroupIds, authUserId, isAuthorizationCheckEnabled, permissionChecks
Constructor and Description |
---|
HistoricDetailQueryImpl() |
HistoricDetailQueryImpl(CommandExecutor commandExecutor) |
addExpression, addValidator, asc, checkQueryOk, count, desc, direction, evaluateExpressions, evaluateExpressionsAndExecuteCount, evaluateExpressionsAndExecuteList, execute, executeSingleResult, extend, getExpressions, getMethod, getOrderBy, getOrderingProperties, list, listPage, mergeExpressions, mergeOrdering, orderBy, orderBy, removeValidator, setCommandExecutor, setExpressions, setOrderingProperties, singleResult, validate, validate
getDatabaseType, getFirstResult, getFirstRow, getLastRow, getMaxResults, getParameter, setDatabaseType, setFirstResult, setMaxResults, setOrderBy, setParameter
addPermissionCheck, getAuthDefaultPerm, getAuthGroupIds, getAuthUserId, getPermissionChecks, isAuthorizationCheckEnabled, setAuthDefaultPerm, setAuthGroupIds, setAuthorizationCheckEnabled, setAuthUserId, setPermissionChecks
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 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 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 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 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")
.orderBySequenceCounter()
.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 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()
Copyright © 2018. All rights reserved.