org.camunda.bpm.engine.impl
Class HistoricCaseInstanceQueryImpl

java.lang.Object
  extended by org.camunda.bpm.engine.impl.db.ListQueryParameterObject
      extended by org.camunda.bpm.engine.impl.AbstractQuery<T,U>
          extended by org.camunda.bpm.engine.impl.AbstractVariableQueryImpl<HistoricCaseInstanceQuery,HistoricCaseInstance>
              extended by 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
protected  String businessKey
           
protected  String businessKeyLike
           
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 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
 
Fields inherited from class org.camunda.bpm.engine.impl.AbstractQuery
commandExecutor, expressions, orderingProperties, resultType, SORTORDER_ASC, SORTORDER_DESC, validators
 
Fields inherited from class org.camunda.bpm.engine.impl.db.ListQueryParameterObject
authCheck, databaseType, DEFAULT_ORDER_BY, firstResult, maxResults, orderBy, parameter, tenantCheck
 
Constructor Summary
HistoricCaseInstanceQueryImpl()
           
HistoricCaseInstanceQueryImpl(CommandExecutor commandExecutor)
           
 
Method Summary
 HistoricCaseInstanceQuery active()
          Only select historic case instances which are active
 HistoricCaseInstanceQueryImpl caseDefinitionId(String caseDefinitionId)
          Only select historic case instances for the given case definition
 HistoricCaseInstanceQuery 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 list
 HistoricCaseInstanceQuery 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 key
 HistoricCaseInstanceQuery 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 closed
 HistoricCaseInstanceQuery 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 completed
 HistoricCaseInstanceQuery 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 by Query.asc() or Query.desc()).
 HistoricCaseInstanceQuery orderByCaseInstanceBusinessKey()
          Order by the business key (needs to be followed by Query.asc() or Query.desc()).
 HistoricCaseInstanceQuery orderByCaseInstanceCloseTime()
          Order by the close time (needs to be followed by Query.asc() or Query.desc()).
 HistoricCaseInstanceQuery orderByCaseInstanceCreateTime()
          Order by the create time (needs to be followed by Query.asc() or Query.desc()).
 HistoricCaseInstanceQuery orderByCaseInstanceDuration()
          Order by the duration of the case instance (needs to be followed by Query.asc() or Query.desc()).
 HistoricCaseInstanceQuery orderByCaseInstanceId()
          Order by the case instance id (needs to be followed by Query.asc() or Query.desc()).
 HistoricCaseInstanceQuery orderByTenantId()
          Order by tenant id (needs to be followed by Query.asc() or Query.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 terminated
 
Methods inherited from class org.camunda.bpm.engine.impl.AbstractVariableQueryImpl
addVariable, ensureVariablesInitialized, getQueryVariableValues, variableValueEquals, variableValueGreaterThan, variableValueGreaterThanOrEqual, variableValueLessThan, variableValueLessThanOrEqual, variableValueLike, variableValueNotEquals
 
Methods inherited from class org.camunda.bpm.engine.impl.AbstractQuery
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
 
Methods inherited from class org.camunda.bpm.engine.impl.db.ListQueryParameterObject
getAuthCheck, getDatabaseType, getFirstResult, getFirstRow, getLastRow, getMaxResults, getParameter, getTenantCheck, setAuthCheck, setDatabaseType, setFirstResult, setMaxResults, setOrderBy, 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.history.HistoricCaseInstanceQuery
variableValueEquals, variableValueGreaterThan, variableValueGreaterThanOrEqual, variableValueLessThan, variableValueLessThanOrEqual, variableValueLike, variableValueNotEquals
 
Methods inherited from interface org.camunda.bpm.engine.query.Query
asc, count, desc, list, listPage, singleResult
 

Field Detail

caseInstanceId

protected String caseInstanceId

caseInstanceIds

protected Set<String> caseInstanceIds

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

caseKeyNotIn

protected List<String> caseKeyNotIn

createdBefore

protected Date createdBefore

createdAfter

protected Date createdAfter

closedBefore

protected Date closedBefore

closedAfter

protected Date closedAfter

caseDefinitionKey

protected String caseDefinitionKey

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 interface HistoricCaseInstanceQuery

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 interface HistoricCaseInstanceQuery

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 interface HistoricCaseInstanceQuery

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 interface HistoricCaseInstanceQuery

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 interface HistoricCaseInstanceQuery

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 interface HistoricCaseInstanceQuery
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 interface HistoricCaseInstanceQuery

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 interface HistoricCaseInstanceQuery
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 interface HistoricCaseInstanceQuery

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 interface HistoricCaseInstanceQuery

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 interface HistoricCaseInstanceQuery

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 interface HistoricCaseInstanceQuery

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 interface HistoricCaseInstanceQuery

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 interface HistoricCaseInstanceQuery

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 interface HistoricCaseInstanceQuery

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 interface HistoricCaseInstanceQuery

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 interface HistoricCaseInstanceQuery

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 interface HistoricCaseInstanceQuery

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 interface HistoricCaseInstanceQuery

active

public HistoricCaseInstanceQuery active()
Description copied from interface: HistoricCaseInstanceQuery
Only select historic case instances which are active

Specified by:
active in interface HistoricCaseInstanceQuery

completed

public HistoricCaseInstanceQuery completed()
Description copied from interface: HistoricCaseInstanceQuery
Only select historic case instances which are completed

Specified by:
completed in interface HistoricCaseInstanceQuery

terminated

public HistoricCaseInstanceQuery terminated()
Description copied from interface: HistoricCaseInstanceQuery
Only select historic case instances which are terminated

Specified by:
terminated in interface HistoricCaseInstanceQuery

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 interface HistoricCaseInstanceQuery

notClosed

public HistoricCaseInstanceQuery notClosed()
Description copied from interface: HistoricCaseInstanceQuery
Only select historic case instance that are not yet closed.

Specified by:
notClosed in interface HistoricCaseInstanceQuery

orderByCaseInstanceBusinessKey

public HistoricCaseInstanceQuery orderByCaseInstanceBusinessKey()
Description copied from interface: HistoricCaseInstanceQuery
Order by the business key (needs to be followed by Query.asc() or Query.desc()).

Specified by:
orderByCaseInstanceBusinessKey in interface HistoricCaseInstanceQuery

orderByCaseInstanceDuration

public HistoricCaseInstanceQuery orderByCaseInstanceDuration()
Description copied from interface: HistoricCaseInstanceQuery
Order by the duration of the case instance (needs to be followed by Query.asc() or Query.desc()).

Specified by:
orderByCaseInstanceDuration in interface HistoricCaseInstanceQuery

orderByCaseInstanceCreateTime

public HistoricCaseInstanceQuery orderByCaseInstanceCreateTime()
Description copied from interface: HistoricCaseInstanceQuery
Order by the create time (needs to be followed by Query.asc() or Query.desc()).

Specified by:
orderByCaseInstanceCreateTime in interface HistoricCaseInstanceQuery

orderByCaseInstanceCloseTime

public HistoricCaseInstanceQuery orderByCaseInstanceCloseTime()
Description copied from interface: HistoricCaseInstanceQuery
Order by the close time (needs to be followed by Query.asc() or Query.desc()).

Specified by:
orderByCaseInstanceCloseTime in interface HistoricCaseInstanceQuery

orderByCaseDefinitionId

public HistoricCaseInstanceQuery orderByCaseDefinitionId()
Description copied from interface: HistoricCaseInstanceQuery
Order by the case definition id (needs to be followed by Query.asc() or Query.desc()).

Specified by:
orderByCaseDefinitionId in interface HistoricCaseInstanceQuery

orderByCaseInstanceId

public HistoricCaseInstanceQuery orderByCaseInstanceId()
Description copied from interface: HistoricCaseInstanceQuery
Order by the case instance id (needs to be followed by Query.asc() or Query.desc()).

Specified by:
orderByCaseInstanceId in interface HistoricCaseInstanceQuery

orderByTenantId

public HistoricCaseInstanceQuery orderByTenantId()
Description copied from interface: HistoricCaseInstanceQuery
Order by tenant id (needs to be followed by Query.asc() or Query.desc()). Note that the ordering of historic case instances without tenant id is database-specific.

Specified by:
orderByTenantId in interface HistoricCaseInstanceQuery

executeCount

public long executeCount(CommandContext commandContext)
Specified by:
executeCount in class AbstractVariableQueryImpl<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 class AbstractVariableQueryImpl<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 class AbstractQuery<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()

getCaseInstanceIds

public Set<String> getCaseInstanceIds()

getStartedBy

public String getStartedBy()

getSuperCaseInstanceId

public String getSuperCaseInstanceId()

setSuperCaseInstanceId

public void setSuperCaseInstanceId(String superCaseInstanceId)

getCaseKeyNotIn

public List<String> getCaseKeyNotIn()

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()


Copyright © 2016 camunda services GmbH. All rights reserved.