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 String
businessKey
protected String
businessKeyLike
protected String[]
caseActivityIds
protected String
caseDefinitionId
protected String
caseDefinitionKey
protected String
caseDefinitionName
protected String
caseDefinitionNameLike
protected String
caseInstanceId
protected Set<String>
caseInstanceIds
protected List<String>
caseKeyNotIn
protected Date
closedAfter
protected Date
closedBefore
protected Date
createdAfter
protected Date
createdBefore
protected String
createdBy
protected boolean
isTenantIdSet
protected Boolean
notClosed
protected Integer
state
protected String
subCaseInstanceId
protected String
subProcessInstanceId
protected String
superCaseInstanceId
protected String
superProcessInstanceId
protected 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 HistoricCaseInstanceQuery
active()
Only select historic case instances which are activeHistoricCaseInstanceQuery
caseActivityIdIn(String... caseActivityIds)
Only selects historic case instances with historic case activity instances in at least one of the given case activity ids.HistoricCaseInstanceQueryImpl
caseDefinitionId(String caseDefinitionId)
Only select historic case instances for the given case definitionHistoricCaseInstanceQuery
caseDefinitionKey(String caseDefinitionKey)
Only select historic case instances that are defined by a case definition with the given key.HistoricCaseInstanceQuery
caseDefinitionKeyNotIn(List<String> caseDefinitionKeys)
Only select historic case instances that don't have a case definition of which the key is present in the given listHistoricCaseInstanceQuery
caseDefinitionName(String caseDefinitionName)
Only select historic case instances that are defined by a case definition with the given name.HistoricCaseInstanceQuery
caseDefinitionNameLike(String nameLike)
Only select historic case instances that are defined by case definition which name is like the given value.HistoricCaseInstanceQuery
caseInstanceBusinessKey(String businessKey)
Only select historic case instances with the given business keyHistoricCaseInstanceQuery
caseInstanceBusinessKeyLike(String businessKeyLike)
Only select historic case instances which had a business key like the given value.HistoricCaseInstanceQueryImpl
caseInstanceId(String caseInstanceId)
Only select historic case instances with the given case instance id.HistoricCaseInstanceQuery
caseInstanceIds(Set<String> caseInstanceIds)
Only select historic case instances whose id is in the given set of ids.HistoricCaseInstanceQuery
closed()
Only select historic case instances which are closedHistoricCaseInstanceQuery
closedAfter(Date date)
Only select historic case instances that were closed after the given date.HistoricCaseInstanceQuery
closedBefore(Date date)
Only select historic case instances that were closed before the given date.HistoricCaseInstanceQuery
completed()
Only select historic case instances which are completedHistoricCaseInstanceQuery
createdAfter(Date date)
Only select historic case instances that were created after the given date.HistoricCaseInstanceQuery
createdBefore(Date date)
Only select historic case instances that were created before the given date.HistoricCaseInstanceQuery
createdBy(String userId)
Only select historic case instance that are created by the given user.long
executeCount(CommandContext commandContext)
List<HistoricCaseInstance>
executeList(CommandContext commandContext, Page page)
Executes the actual query to retrieve the list of results.HistoricCaseInstanceQuery
failed()
String
getBusinessKey()
String
getBusinessKeyLike()
String
getCaseDefinitionId()
String
getCaseDefinitionIdLike()
String
getCaseDefinitionKey()
String
getCaseDefinitionName()
String
getCaseDefinitionNameLike()
String
getCaseInstanceId()
Set<String>
getCaseInstanceIds()
List<String>
getCaseKeyNotIn()
Date
getClosedAfter()
Date
getClosedBefore()
Date
getCreatedAfter()
Date
getCreatedBefore()
String
getStartedBy()
String
getSubCaseInstanceId()
String
getSubProcessInstanceId()
String
getSuperCaseInstanceId()
String
getSuperProcessInstanceId()
protected boolean
hasExcludingConditions()
Whether or not the query has excluding conditions.HistoricCaseInstanceQuery
notClosed()
Only select historic case instance that are not yet closed.HistoricCaseInstanceQuery
orderByCaseDefinitionId()
Order by the case definition id (needs to be followed byQuery.asc()
orQuery.desc()
).HistoricCaseInstanceQuery
orderByCaseInstanceBusinessKey()
Order by the business key (needs to be followed byQuery.asc()
orQuery.desc()
).HistoricCaseInstanceQuery
orderByCaseInstanceCloseTime()
Order by the close time (needs to be followed byQuery.asc()
orQuery.desc()
).HistoricCaseInstanceQuery
orderByCaseInstanceCreateTime()
Order by the create time (needs to be followed byQuery.asc()
orQuery.desc()
).HistoricCaseInstanceQuery
orderByCaseInstanceDuration()
Order by the duration of the case instance (needs to be followed byQuery.asc()
orQuery.desc()
).HistoricCaseInstanceQuery
orderByCaseInstanceId()
Order by the case instance id (needs to be followed byQuery.asc()
orQuery.desc()
).HistoricCaseInstanceQuery
orderByTenantId()
Order by tenant id (needs to be followed byQuery.asc()
orQuery.desc()
).void
setSuperCaseInstanceId(String superCaseInstanceId)
HistoricCaseInstanceQuery
subCaseInstanceId(String subCaseInstanceId)
Only select historic case instances having a sub case instance with the given case instance id.HistoricCaseInstanceQuery
subProcessInstanceId(String subProcessInstanceId)
Only select historic case instances having a sub process instance with the given process instance id.HistoricCaseInstanceQuery
superCaseInstanceId(String superCaseInstanceId)
Only select historic case instances started by the given case instance.HistoricCaseInstanceQuery
superProcessInstanceId(String superProcessInstanceId)
Only select historic case instances started by the given process instance.HistoricCaseInstanceQuery
suspended()
HistoricCaseInstanceQuery
tenantIdIn(String... tenantIds)
Only select historic case instances with one of the given tenant ids.HistoricCaseInstanceQuery
terminated()
Only select historic case instances which are terminatedHistoricCaseInstanceQuery
withoutTenantId()
Only selects historic case instances which have no tenant id.-
Methods inherited from class org.camunda.bpm.engine.impl.AbstractVariableQueryImpl
addVariable, createQueryVariableValue, ensureVariablesInitialized, getQueryVariableValues, isVariableNamesIgnoreCase, isVariableValuesIgnoreCase, matchVariableNamesIgnoreCase, matchVariableValuesIgnoreCase, validateVariable, 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:HistoricCaseInstanceQuery
Only select historic case instances with the given case instance id.- Specified by:
caseInstanceId
in interfaceHistoricCaseInstanceQuery
-
caseInstanceIds
public HistoricCaseInstanceQuery caseInstanceIds(Set<String> caseInstanceIds)
Description copied from interface:HistoricCaseInstanceQuery
Only select historic case instances whose id is in the given set of ids.- Specified by:
caseInstanceIds
in interfaceHistoricCaseInstanceQuery
-
caseDefinitionId
public HistoricCaseInstanceQueryImpl caseDefinitionId(String caseDefinitionId)
Description copied from interface:HistoricCaseInstanceQuery
Only select historic case instances for the given case definition- Specified by:
caseDefinitionId
in interfaceHistoricCaseInstanceQuery
-
caseDefinitionKey
public HistoricCaseInstanceQuery caseDefinitionKey(String caseDefinitionKey)
Description copied from interface:HistoricCaseInstanceQuery
Only select historic case instances that are defined by a case definition with the given key.- Specified by:
caseDefinitionKey
in interfaceHistoricCaseInstanceQuery
-
caseDefinitionName
public HistoricCaseInstanceQuery caseDefinitionName(String caseDefinitionName)
Description copied from interface:HistoricCaseInstanceQuery
Only select historic case instances that are defined by a case definition with the given name.- Specified by:
caseDefinitionName
in interfaceHistoricCaseInstanceQuery
-
caseDefinitionNameLike
public HistoricCaseInstanceQuery caseDefinitionNameLike(String nameLike)
Description copied from interface:HistoricCaseInstanceQuery
Only select historic case instances that are defined by case definition which name is like the given value.- Specified by:
caseDefinitionNameLike
in 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:HistoricCaseInstanceQuery
Only select historic case instances with the given business key- Specified by:
caseInstanceBusinessKey
in interfaceHistoricCaseInstanceQuery
-
caseInstanceBusinessKeyLike
public HistoricCaseInstanceQuery caseInstanceBusinessKeyLike(String businessKeyLike)
Description copied from interface:HistoricCaseInstanceQuery
Only select historic case instances which had a business key like the given value.- Specified by:
caseInstanceBusinessKeyLike
in 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:HistoricCaseInstanceQuery
Only select historic case instance that are created by the given user.- Specified by:
createdBy
in interfaceHistoricCaseInstanceQuery
-
caseDefinitionKeyNotIn
public HistoricCaseInstanceQuery caseDefinitionKeyNotIn(List<String> caseDefinitionKeys)
Description copied from interface:HistoricCaseInstanceQuery
Only select historic case instances that don't have a case definition of which the key is present in the given list- Specified by:
caseDefinitionKeyNotIn
in interfaceHistoricCaseInstanceQuery
-
caseActivityIdIn
public HistoricCaseInstanceQuery caseActivityIdIn(String... caseActivityIds)
Description copied from interface:HistoricCaseInstanceQuery
Only selects historic case instances with historic case activity instances in at least one of the given case activity ids.
- Specified by:
caseActivityIdIn
in interfaceHistoricCaseInstanceQuery
-
createdAfter
public HistoricCaseInstanceQuery createdAfter(Date date)
Description copied from interface:HistoricCaseInstanceQuery
Only select historic case instances that were created after the given date.- Specified by:
createdAfter
in interfaceHistoricCaseInstanceQuery
-
createdBefore
public HistoricCaseInstanceQuery createdBefore(Date date)
Description copied from interface:HistoricCaseInstanceQuery
Only select historic case instances that were created before the given date.- Specified by:
createdBefore
in interfaceHistoricCaseInstanceQuery
-
closedAfter
public HistoricCaseInstanceQuery closedAfter(Date date)
Description copied from interface:HistoricCaseInstanceQuery
Only select historic case instances that were closed after the given date.- Specified by:
closedAfter
in interfaceHistoricCaseInstanceQuery
-
closedBefore
public HistoricCaseInstanceQuery closedBefore(Date date)
Description copied from interface:HistoricCaseInstanceQuery
Only select historic case instances that were closed before the given date.- Specified by:
closedBefore
in interfaceHistoricCaseInstanceQuery
-
superCaseInstanceId
public HistoricCaseInstanceQuery superCaseInstanceId(String superCaseInstanceId)
Description copied from interface:HistoricCaseInstanceQuery
Only select historic case instances started by the given case instance.- Specified by:
superCaseInstanceId
in interfaceHistoricCaseInstanceQuery
-
subCaseInstanceId
public HistoricCaseInstanceQuery subCaseInstanceId(String subCaseInstanceId)
Description copied from interface:HistoricCaseInstanceQuery
Only 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:
subCaseInstanceId
in interfaceHistoricCaseInstanceQuery
-
superProcessInstanceId
public HistoricCaseInstanceQuery superProcessInstanceId(String superProcessInstanceId)
Description copied from interface:HistoricCaseInstanceQuery
Only select historic case instances started by the given process instance.- Specified by:
superProcessInstanceId
in interfaceHistoricCaseInstanceQuery
-
subProcessInstanceId
public HistoricCaseInstanceQuery subProcessInstanceId(String subProcessInstanceId)
Description copied from interface:HistoricCaseInstanceQuery
Only 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:
subProcessInstanceId
in interfaceHistoricCaseInstanceQuery
-
tenantIdIn
public HistoricCaseInstanceQuery tenantIdIn(String... tenantIds)
Description copied from interface:HistoricCaseInstanceQuery
Only select historic case instances with one of the given tenant ids.- Specified by:
tenantIdIn
in interfaceHistoricCaseInstanceQuery
-
withoutTenantId
public HistoricCaseInstanceQuery withoutTenantId()
Description copied from interface:HistoricCaseInstanceQuery
Only selects historic case instances which have no tenant id.- Specified by:
withoutTenantId
in interfaceHistoricCaseInstanceQuery
-
active
public HistoricCaseInstanceQuery active()
Description copied from interface:HistoricCaseInstanceQuery
Only select historic case instances which are active- Specified by:
active
in interfaceHistoricCaseInstanceQuery
-
completed
public HistoricCaseInstanceQuery completed()
Description copied from interface:HistoricCaseInstanceQuery
Only select historic case instances which are completed- Specified by:
completed
in interfaceHistoricCaseInstanceQuery
-
terminated
public HistoricCaseInstanceQuery terminated()
Description copied from interface:HistoricCaseInstanceQuery
Only select historic case instances which are terminated- Specified by:
terminated
in interfaceHistoricCaseInstanceQuery
-
failed
public HistoricCaseInstanceQuery failed()
-
suspended
public HistoricCaseInstanceQuery suspended()
-
closed
public HistoricCaseInstanceQuery closed()
Description copied from interface:HistoricCaseInstanceQuery
Only select historic case instances which are closed- Specified by:
closed
in interfaceHistoricCaseInstanceQuery
-
notClosed
public HistoricCaseInstanceQuery notClosed()
Description copied from interface:HistoricCaseInstanceQuery
Only select historic case instance that are not yet closed.- Specified by:
notClosed
in interfaceHistoricCaseInstanceQuery
-
orderByCaseInstanceBusinessKey
public HistoricCaseInstanceQuery orderByCaseInstanceBusinessKey()
Description copied from interface:HistoricCaseInstanceQuery
Order by the business key (needs to be followed byQuery.asc()
orQuery.desc()
).- Specified by:
orderByCaseInstanceBusinessKey
in interfaceHistoricCaseInstanceQuery
-
orderByCaseInstanceDuration
public HistoricCaseInstanceQuery orderByCaseInstanceDuration()
Description copied from interface:HistoricCaseInstanceQuery
Order by the duration of the case instance (needs to be followed byQuery.asc()
orQuery.desc()
).- Specified by:
orderByCaseInstanceDuration
in interfaceHistoricCaseInstanceQuery
-
orderByCaseInstanceCreateTime
public HistoricCaseInstanceQuery orderByCaseInstanceCreateTime()
Description copied from interface:HistoricCaseInstanceQuery
Order by the create time (needs to be followed byQuery.asc()
orQuery.desc()
).- Specified by:
orderByCaseInstanceCreateTime
in interfaceHistoricCaseInstanceQuery
-
orderByCaseInstanceCloseTime
public HistoricCaseInstanceQuery orderByCaseInstanceCloseTime()
Description copied from interface:HistoricCaseInstanceQuery
Order by the close time (needs to be followed byQuery.asc()
orQuery.desc()
).- Specified by:
orderByCaseInstanceCloseTime
in interfaceHistoricCaseInstanceQuery
-
orderByCaseDefinitionId
public HistoricCaseInstanceQuery orderByCaseDefinitionId()
Description copied from interface:HistoricCaseInstanceQuery
Order by the case definition id (needs to be followed byQuery.asc()
orQuery.desc()
).- Specified by:
orderByCaseDefinitionId
in interfaceHistoricCaseInstanceQuery
-
orderByCaseInstanceId
public HistoricCaseInstanceQuery orderByCaseInstanceId()
Description copied from interface:HistoricCaseInstanceQuery
Order by the case instance id (needs to be followed byQuery.asc()
orQuery.desc()
).- Specified by:
orderByCaseInstanceId
in interfaceHistoricCaseInstanceQuery
-
orderByTenantId
public HistoricCaseInstanceQuery orderByTenantId()
Description copied from interface:HistoricCaseInstanceQuery
Order 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:
orderByTenantId
in interfaceHistoricCaseInstanceQuery
-
executeCount
public long executeCount(CommandContext commandContext)
- Specified by:
executeCount
in classAbstractVariableQueryImpl<HistoricCaseInstanceQuery,HistoricCaseInstance>
-
executeList
public List<HistoricCaseInstance> executeList(CommandContext commandContext, Page page)
Description copied from class:AbstractQuery
Executes the actual query to retrieve the list of results.- Specified by:
executeList
in 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: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<HistoricCaseInstanceQuery,HistoricCaseInstance>
- Returns:
true
if the query does have excluding conditions,false
otherwise
-
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()
-
-