Package org.camunda.bpm.engine.impl
Class HistoricCaseInstanceQueryImpl
- java.lang.Object
-
- org.camunda.bpm.engine.impl.db.ListQueryParameterObject
-
- org.camunda.bpm.engine.impl.AbstractQuery<T,U>
-
- org.camunda.bpm.engine.impl.AbstractVariableQueryImpl<HistoricCaseInstanceQuery,HistoricCaseInstance>
-
- org.camunda.bpm.engine.impl.HistoricCaseInstanceQueryImpl
-
- All Implemented Interfaces:
Serializable,HistoricCaseInstanceQuery,Command<Object>,Query<HistoricCaseInstanceQuery,HistoricCaseInstance>
public class HistoricCaseInstanceQueryImpl extends AbstractVariableQueryImpl<HistoricCaseInstanceQuery,HistoricCaseInstance> implements HistoricCaseInstanceQuery
- Author:
- Sebastian Menski
- 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 StringbusinessKeyprotected StringbusinessKeyLikeprotected String[]caseActivityIdsprotected StringcaseDefinitionIdprotected StringcaseDefinitionKeyprotected StringcaseDefinitionNameprotected StringcaseDefinitionNameLikeprotected StringcaseInstanceIdprotected Set<String>caseInstanceIdsprotected List<String>caseKeyNotInprotected DateclosedAfterprotected DateclosedBeforeprotected DatecreatedAfterprotected DatecreatedBeforeprotected StringcreatedByprotected booleanisTenantIdSetprotected BooleannotClosedprotected Integerstateprotected StringsubCaseInstanceIdprotected StringsubProcessInstanceIdprotected StringsuperCaseInstanceIdprotected StringsuperProcessInstanceIdprotected String[]tenantIds-
Fields inherited from class org.camunda.bpm.engine.impl.AbstractVariableQueryImpl
queryVariableValues, variableNamesIgnoreCase, variableValuesIgnoreCase
-
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 HistoricCaseInstanceQueryImpl()HistoricCaseInstanceQueryImpl(CommandExecutor commandExecutor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HistoricCaseInstanceQueryactive()Only select historic case instances which are activeHistoricCaseInstanceQuerycaseActivityIdIn(String... caseActivityIds)Only selects historic case instances with historic case activity instances in at least one of the given case activity ids.HistoricCaseInstanceQueryImplcaseDefinitionId(String caseDefinitionId)Only select historic case instances for the given case definitionHistoricCaseInstanceQuerycaseDefinitionKey(String caseDefinitionKey)Only select historic case instances that are defined by a case definition with the given key.HistoricCaseInstanceQuerycaseDefinitionKeyNotIn(List<String> caseDefinitionKeys)Only select historic case instances that don't have a case definition of which the key is present in the given listHistoricCaseInstanceQuerycaseDefinitionName(String caseDefinitionName)Only select historic case instances that are defined by a case definition with the given name.HistoricCaseInstanceQuerycaseDefinitionNameLike(String nameLike)Only select historic case instances that are defined by case definition which name is like the given value.HistoricCaseInstanceQuerycaseInstanceBusinessKey(String businessKey)Only select historic case instances with the given business keyHistoricCaseInstanceQuerycaseInstanceBusinessKeyLike(String businessKeyLike)Only select historic case instances which had a business key like the given value.HistoricCaseInstanceQueryImplcaseInstanceId(String caseInstanceId)Only select historic case instances with the given case instance id.HistoricCaseInstanceQuerycaseInstanceIds(Set<String> caseInstanceIds)Only select historic case instances whose id is in the given set of ids.HistoricCaseInstanceQueryclosed()Only select historic case instances which are closedHistoricCaseInstanceQueryclosedAfter(Date date)Only select historic case instances that were closed after the given date.HistoricCaseInstanceQueryclosedBefore(Date date)Only select historic case instances that were closed before the given date.HistoricCaseInstanceQuerycompleted()Only select historic case instances which are completedHistoricCaseInstanceQuerycreatedAfter(Date date)Only select historic case instances that were created after the given date.HistoricCaseInstanceQuerycreatedBefore(Date date)Only select historic case instances that were created before the given date.HistoricCaseInstanceQuerycreatedBy(String userId)Only select historic case instance that are created by the given user.longexecuteCount(CommandContext commandContext)List<HistoricCaseInstance>executeList(CommandContext commandContext, Page page)Executes the actual query to retrieve the list of results.HistoricCaseInstanceQueryfailed()StringgetBusinessKey()StringgetBusinessKeyLike()StringgetCaseDefinitionId()StringgetCaseDefinitionIdLike()StringgetCaseDefinitionKey()StringgetCaseDefinitionName()StringgetCaseDefinitionNameLike()StringgetCaseInstanceId()Set<String>getCaseInstanceIds()List<String>getCaseKeyNotIn()DategetClosedAfter()DategetClosedBefore()DategetCreatedAfter()DategetCreatedBefore()StringgetStartedBy()StringgetSubCaseInstanceId()StringgetSubProcessInstanceId()StringgetSuperCaseInstanceId()StringgetSuperProcessInstanceId()protected booleanhasExcludingConditions()Whether or not the query has excluding conditions.HistoricCaseInstanceQuerynotClosed()Only select historic case instance that are not yet closed.HistoricCaseInstanceQueryorderByCaseDefinitionId()Order by the case definition id (needs to be followed byQuery.asc()orQuery.desc()).HistoricCaseInstanceQueryorderByCaseInstanceBusinessKey()Order by the business key (needs to be followed byQuery.asc()orQuery.desc()).HistoricCaseInstanceQueryorderByCaseInstanceCloseTime()Order by the close time (needs to be followed byQuery.asc()orQuery.desc()).HistoricCaseInstanceQueryorderByCaseInstanceCreateTime()Order by the create time (needs to be followed byQuery.asc()orQuery.desc()).HistoricCaseInstanceQueryorderByCaseInstanceDuration()Order by the duration of the case instance (needs to be followed byQuery.asc()orQuery.desc()).HistoricCaseInstanceQueryorderByCaseInstanceId()Order by the case instance id (needs to be followed byQuery.asc()orQuery.desc()).HistoricCaseInstanceQueryorderByTenantId()Order by tenant id (needs to be followed byQuery.asc()orQuery.desc()).voidsetSuperCaseInstanceId(String superCaseInstanceId)HistoricCaseInstanceQuerysubCaseInstanceId(String subCaseInstanceId)Only select historic case instances having a sub case instance with the given case instance id.HistoricCaseInstanceQuerysubProcessInstanceId(String subProcessInstanceId)Only select historic case instances having a sub process instance with the given process instance id.HistoricCaseInstanceQuerysuperCaseInstanceId(String superCaseInstanceId)Only select historic case instances started by the given case instance.HistoricCaseInstanceQuerysuperProcessInstanceId(String superProcessInstanceId)Only select historic case instances started by the given process instance.HistoricCaseInstanceQuerysuspended()HistoricCaseInstanceQuerytenantIdIn(String... tenantIds)Only select historic case instances with one of the given tenant ids.HistoricCaseInstanceQueryterminated()Only select historic case instances which are terminatedHistoricCaseInstanceQuerywithoutTenantId()Only selects historic case instances which have no tenant id.-
Methods inherited from class org.camunda.bpm.engine.impl.AbstractVariableQueryImpl
addVariable, ensureVariablesInitialized, getQueryVariableValues, isVariableNamesIgnoreCase, isVariableValuesIgnoreCase, matchVariableNamesIgnoreCase, matchVariableValuesIgnoreCase, variableValueEquals, variableValueGreaterThan, variableValueGreaterThanOrEqual, variableValueLessThan, variableValueLessThanOrEqual, variableValueLike, variableValueNotEquals, variableValueNotLike
-
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.history.HistoricCaseInstanceQuery
matchVariableNamesIgnoreCase, matchVariableValuesIgnoreCase, variableValueEquals, variableValueGreaterThan, variableValueGreaterThanOrEqual, variableValueLessThan, variableValueLessThanOrEqual, variableValueLike, variableValueNotEquals, variableValueNotLike
-
Methods inherited from interface org.camunda.bpm.engine.query.Query
asc, count, desc, list, listPage, singleResult, unlimitedList
-
-
-
-
Field Detail
-
caseInstanceId
protected String caseInstanceId
-
caseDefinitionId
protected String caseDefinitionId
-
caseDefinitionName
protected String caseDefinitionName
-
caseDefinitionNameLike
protected String caseDefinitionNameLike
-
businessKey
protected String businessKey
-
businessKeyLike
protected String businessKeyLike
-
state
protected Integer state
-
notClosed
protected Boolean notClosed
-
createdBy
protected String createdBy
-
superCaseInstanceId
protected String superCaseInstanceId
-
subCaseInstanceId
protected String subCaseInstanceId
-
superProcessInstanceId
protected String superProcessInstanceId
-
subProcessInstanceId
protected String subProcessInstanceId
-
createdBefore
protected Date createdBefore
-
createdAfter
protected Date createdAfter
-
closedBefore
protected Date closedBefore
-
closedAfter
protected Date closedAfter
-
caseDefinitionKey
protected String caseDefinitionKey
-
caseActivityIds
protected String[] caseActivityIds
-
isTenantIdSet
protected boolean isTenantIdSet
-
tenantIds
protected String[] tenantIds
-
-
Constructor Detail
-
HistoricCaseInstanceQueryImpl
public HistoricCaseInstanceQueryImpl()
-
HistoricCaseInstanceQueryImpl
public HistoricCaseInstanceQueryImpl(CommandExecutor commandExecutor)
-
-
Method Detail
-
caseInstanceId
public HistoricCaseInstanceQueryImpl caseInstanceId(String caseInstanceId)
Description copied from interface:HistoricCaseInstanceQueryOnly select historic case instances with the given case instance id.- Specified by:
caseInstanceIdin interfaceHistoricCaseInstanceQuery
-
caseInstanceIds
public HistoricCaseInstanceQuery caseInstanceIds(Set<String> caseInstanceIds)
Description copied from interface:HistoricCaseInstanceQueryOnly select historic case instances whose id is in the given set of ids.- Specified by:
caseInstanceIdsin interfaceHistoricCaseInstanceQuery
-
caseDefinitionId
public HistoricCaseInstanceQueryImpl caseDefinitionId(String caseDefinitionId)
Description copied from interface:HistoricCaseInstanceQueryOnly select historic case instances for the given case definition- Specified by:
caseDefinitionIdin interfaceHistoricCaseInstanceQuery
-
caseDefinitionKey
public HistoricCaseInstanceQuery caseDefinitionKey(String caseDefinitionKey)
Description copied from interface:HistoricCaseInstanceQueryOnly select historic case instances that are defined by a case definition with the given key.- Specified by:
caseDefinitionKeyin interfaceHistoricCaseInstanceQuery
-
caseDefinitionName
public HistoricCaseInstanceQuery caseDefinitionName(String caseDefinitionName)
Description copied from interface:HistoricCaseInstanceQueryOnly select historic case instances that are defined by a case definition with the given name.- Specified by:
caseDefinitionNamein interfaceHistoricCaseInstanceQuery
-
caseDefinitionNameLike
public HistoricCaseInstanceQuery caseDefinitionNameLike(String nameLike)
Description copied from interface:HistoricCaseInstanceQueryOnly select historic case instances that are defined by case definition which name is like the given value.- Specified by:
caseDefinitionNameLikein interfaceHistoricCaseInstanceQuery- Parameters:
nameLike- The string can include the wildcard character '%' to express like-strategy: starts with (string%), ends with (%string) or contains (%string%).
-
caseInstanceBusinessKey
public HistoricCaseInstanceQuery caseInstanceBusinessKey(String businessKey)
Description copied from interface:HistoricCaseInstanceQueryOnly select historic case instances with the given business key- Specified by:
caseInstanceBusinessKeyin interfaceHistoricCaseInstanceQuery
-
caseInstanceBusinessKeyLike
public HistoricCaseInstanceQuery caseInstanceBusinessKeyLike(String businessKeyLike)
Description copied from interface:HistoricCaseInstanceQueryOnly select historic case instances which had a business key like the given value.- Specified by:
caseInstanceBusinessKeyLikein interfaceHistoricCaseInstanceQuery- Parameters:
businessKeyLike- The string can include the wildcard character '%' to express like-strategy: starts with (string%), ends with (%string) or contains (%string%).
-
createdBy
public HistoricCaseInstanceQuery createdBy(String userId)
Description copied from interface:HistoricCaseInstanceQueryOnly select historic case instance that are created by the given user.- Specified by:
createdByin interfaceHistoricCaseInstanceQuery
-
caseDefinitionKeyNotIn
public HistoricCaseInstanceQuery caseDefinitionKeyNotIn(List<String> caseDefinitionKeys)
Description copied from interface:HistoricCaseInstanceQueryOnly select historic case instances that don't have a case definition of which the key is present in the given list- Specified by:
caseDefinitionKeyNotInin interfaceHistoricCaseInstanceQuery
-
caseActivityIdIn
public HistoricCaseInstanceQuery caseActivityIdIn(String... caseActivityIds)
Description copied from interface:HistoricCaseInstanceQueryOnly selects historic case instances with historic case activity instances in at least one of the given case activity ids.
- Specified by:
caseActivityIdInin interfaceHistoricCaseInstanceQuery
-
createdAfter
public HistoricCaseInstanceQuery createdAfter(Date date)
Description copied from interface:HistoricCaseInstanceQueryOnly select historic case instances that were created after the given date.- Specified by:
createdAfterin interfaceHistoricCaseInstanceQuery
-
createdBefore
public HistoricCaseInstanceQuery createdBefore(Date date)
Description copied from interface:HistoricCaseInstanceQueryOnly select historic case instances that were created before the given date.- Specified by:
createdBeforein interfaceHistoricCaseInstanceQuery
-
closedAfter
public HistoricCaseInstanceQuery closedAfter(Date date)
Description copied from interface:HistoricCaseInstanceQueryOnly select historic case instances that were closed after the given date.- Specified by:
closedAfterin interfaceHistoricCaseInstanceQuery
-
closedBefore
public HistoricCaseInstanceQuery closedBefore(Date date)
Description copied from interface:HistoricCaseInstanceQueryOnly select historic case instances that were closed before the given date.- Specified by:
closedBeforein interfaceHistoricCaseInstanceQuery
-
superCaseInstanceId
public HistoricCaseInstanceQuery superCaseInstanceId(String superCaseInstanceId)
Description copied from interface:HistoricCaseInstanceQueryOnly select historic case instances started by the given case instance.- Specified by:
superCaseInstanceIdin interfaceHistoricCaseInstanceQuery
-
subCaseInstanceId
public HistoricCaseInstanceQuery subCaseInstanceId(String subCaseInstanceId)
Description copied from interface:HistoricCaseInstanceQueryOnly select historic case instances having a sub case instance with the given case instance id. Note that there will always be maximum only one such case instance that can be the result of this query.- Specified by:
subCaseInstanceIdin interfaceHistoricCaseInstanceQuery
-
superProcessInstanceId
public HistoricCaseInstanceQuery superProcessInstanceId(String superProcessInstanceId)
Description copied from interface:HistoricCaseInstanceQueryOnly select historic case instances started by the given process instance.- Specified by:
superProcessInstanceIdin interfaceHistoricCaseInstanceQuery
-
subProcessInstanceId
public HistoricCaseInstanceQuery subProcessInstanceId(String subProcessInstanceId)
Description copied from interface:HistoricCaseInstanceQueryOnly select historic case instances having a sub process instance with the given process instance id. Note that there will always be maximum only one such case instance that can be the result of this query.- Specified by:
subProcessInstanceIdin interfaceHistoricCaseInstanceQuery
-
tenantIdIn
public HistoricCaseInstanceQuery tenantIdIn(String... tenantIds)
Description copied from interface:HistoricCaseInstanceQueryOnly select historic case instances with one of the given tenant ids.- Specified by:
tenantIdInin interfaceHistoricCaseInstanceQuery
-
withoutTenantId
public HistoricCaseInstanceQuery withoutTenantId()
Description copied from interface:HistoricCaseInstanceQueryOnly selects historic case instances which have no tenant id.- Specified by:
withoutTenantIdin interfaceHistoricCaseInstanceQuery
-
active
public HistoricCaseInstanceQuery active()
Description copied from interface:HistoricCaseInstanceQueryOnly select historic case instances which are active- Specified by:
activein interfaceHistoricCaseInstanceQuery
-
completed
public HistoricCaseInstanceQuery completed()
Description copied from interface:HistoricCaseInstanceQueryOnly select historic case instances which are completed- Specified by:
completedin interfaceHistoricCaseInstanceQuery
-
terminated
public HistoricCaseInstanceQuery terminated()
Description copied from interface:HistoricCaseInstanceQueryOnly select historic case instances which are terminated- Specified by:
terminatedin interfaceHistoricCaseInstanceQuery
-
failed
public HistoricCaseInstanceQuery failed()
-
suspended
public HistoricCaseInstanceQuery suspended()
-
closed
public HistoricCaseInstanceQuery closed()
Description copied from interface:HistoricCaseInstanceQueryOnly select historic case instances which are closed- Specified by:
closedin interfaceHistoricCaseInstanceQuery
-
notClosed
public HistoricCaseInstanceQuery notClosed()
Description copied from interface:HistoricCaseInstanceQueryOnly select historic case instance that are not yet closed.- Specified by:
notClosedin interfaceHistoricCaseInstanceQuery
-
orderByCaseInstanceBusinessKey
public HistoricCaseInstanceQuery orderByCaseInstanceBusinessKey()
Description copied from interface:HistoricCaseInstanceQueryOrder by the business key (needs to be followed byQuery.asc()orQuery.desc()).- Specified by:
orderByCaseInstanceBusinessKeyin interfaceHistoricCaseInstanceQuery
-
orderByCaseInstanceDuration
public HistoricCaseInstanceQuery orderByCaseInstanceDuration()
Description copied from interface:HistoricCaseInstanceQueryOrder by the duration of the case instance (needs to be followed byQuery.asc()orQuery.desc()).- Specified by:
orderByCaseInstanceDurationin interfaceHistoricCaseInstanceQuery
-
orderByCaseInstanceCreateTime
public HistoricCaseInstanceQuery orderByCaseInstanceCreateTime()
Description copied from interface:HistoricCaseInstanceQueryOrder by the create time (needs to be followed byQuery.asc()orQuery.desc()).- Specified by:
orderByCaseInstanceCreateTimein interfaceHistoricCaseInstanceQuery
-
orderByCaseInstanceCloseTime
public HistoricCaseInstanceQuery orderByCaseInstanceCloseTime()
Description copied from interface:HistoricCaseInstanceQueryOrder by the close time (needs to be followed byQuery.asc()orQuery.desc()).- Specified by:
orderByCaseInstanceCloseTimein interfaceHistoricCaseInstanceQuery
-
orderByCaseDefinitionId
public HistoricCaseInstanceQuery orderByCaseDefinitionId()
Description copied from interface:HistoricCaseInstanceQueryOrder by the case definition id (needs to be followed byQuery.asc()orQuery.desc()).- Specified by:
orderByCaseDefinitionIdin interfaceHistoricCaseInstanceQuery
-
orderByCaseInstanceId
public HistoricCaseInstanceQuery orderByCaseInstanceId()
Description copied from interface:HistoricCaseInstanceQueryOrder by the case instance id (needs to be followed byQuery.asc()orQuery.desc()).- Specified by:
orderByCaseInstanceIdin interfaceHistoricCaseInstanceQuery
-
orderByTenantId
public HistoricCaseInstanceQuery orderByTenantId()
Description copied from interface:HistoricCaseInstanceQueryOrder by tenant id (needs to be followed byQuery.asc()orQuery.desc()). Note that the ordering of historic case instances without tenant id is database-specific.- Specified by:
orderByTenantIdin interfaceHistoricCaseInstanceQuery
-
executeCount
public long executeCount(CommandContext commandContext)
- Specified by:
executeCountin classAbstractVariableQueryImpl<HistoricCaseInstanceQuery,HistoricCaseInstance>
-
executeList
public List<HistoricCaseInstance> executeList(CommandContext commandContext, Page page)
Description copied from class:AbstractQueryExecutes the actual query to retrieve the list of results.- Specified by:
executeListin classAbstractVariableQueryImpl<HistoricCaseInstanceQuery,HistoricCaseInstance>page- used if the results must be paged. If null, no paging will be applied.
-
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<HistoricCaseInstanceQuery,HistoricCaseInstance>- Returns:
trueif the query does have excluding conditions,falseotherwise
-
getBusinessKey
public String getBusinessKey()
-
getBusinessKeyLike
public String getBusinessKeyLike()
-
getCaseDefinitionId
public String getCaseDefinitionId()
-
getCaseDefinitionKey
public String getCaseDefinitionKey()
-
getCaseDefinitionIdLike
public String getCaseDefinitionIdLike()
-
getCaseDefinitionName
public String getCaseDefinitionName()
-
getCaseDefinitionNameLike
public String getCaseDefinitionNameLike()
-
getCaseInstanceId
public String getCaseInstanceId()
-
getStartedBy
public String getStartedBy()
-
getSuperCaseInstanceId
public String getSuperCaseInstanceId()
-
setSuperCaseInstanceId
public void setSuperCaseInstanceId(String superCaseInstanceId)
-
getCreatedAfter
public Date getCreatedAfter()
-
getCreatedBefore
public Date getCreatedBefore()
-
getClosedAfter
public Date getClosedAfter()
-
getClosedBefore
public Date getClosedBefore()
-
getSubCaseInstanceId
public String getSubCaseInstanceId()
-
getSuperProcessInstanceId
public String getSuperProcessInstanceId()
-
getSubProcessInstanceId
public String getSubProcessInstanceId()
-
-