org.camunda.bpm.engine.impl
Class HistoricCaseInstanceQueryImpl

java.lang.Object
  extended by org.camunda.bpm.engine.impl.db.AuthorizationCheck
      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

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 superCaseInstanceId
           
 
Fields inherited from class org.camunda.bpm.engine.impl.AbstractVariableQueryImpl
queryVariableValues
 
Fields inherited from class org.camunda.bpm.engine.impl.AbstractQuery
commandContext, commandExecutor, expressions, orderProperty, resultType, SORTORDER_ASC, SORTORDER_DESC
 
Fields inherited from class org.camunda.bpm.engine.impl.db.ListQueryParameterObject
databaseType, DEFAULT_ORDER_BY, firstResult, maxResults, orderBy, parameter
 
Fields inherited from class org.camunda.bpm.engine.impl.db.AuthorizationCheck
authDefaultPerm, authGroupIds, authPerms, authResourceId, authResourceIdQueryParam, authResourceType, authUserId, isAuthorizationCheckEnabled
 
Constructor Summary
HistoricCaseInstanceQueryImpl()
           
HistoricCaseInstanceQueryImpl(CommandContext commandContext)
           
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 getSuperCaseInstanceId()
           
 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()).
 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 superCaseInstanceId(String superCaseInstanceId)
          Only select historic case instances started by the given case instance.
 HistoricCaseInstanceQuery suspended()
           
 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, addOrder, asc, checkQueryOk, count, desc, direction, evaluateExpressions, evaluateExpressionsAndExecuteCount, evaluateExpressionsAndExecuteList, execute, executeSingleResult, extend, getExpressions, getMethod, getOrderBy, getOrderProperty, list, listPage, mergeExpressions, mergeOrdering, orderBy, setCommandExecutor, setExpressions, singleResult
 
Methods inherited from class org.camunda.bpm.engine.impl.db.ListQueryParameterObject
getDatabaseType, getFirstResult, getFirstRow, getLastRow, getMaxResults, getParameter, setDatabaseType, setFirstResult, setMaxResults, setOrderBy, setParameter
 
Methods inherited from class org.camunda.bpm.engine.impl.db.AuthorizationCheck
getAuthDefaultPerm, getAuthGroupIds, getAuthPerms, getAuthResourceId, getAuthResourceIdQueryParam, getAuthResourceType, getAuthUserId, isAuthorizationCheckEnabled, setAuthDefaultPerm, setAuthGroupIds, setAuthorizationCheckEnabled, setAuthPerms, setAuthResourceId, setAuthResourceIdQueryParam, setAuthResourceType, setAuthUserId
 
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

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
Constructor Detail

HistoricCaseInstanceQueryImpl

public HistoricCaseInstanceQueryImpl()

HistoricCaseInstanceQueryImpl

public HistoricCaseInstanceQueryImpl(CommandContext commandContext)

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

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

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.

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


Copyright © 2014 camunda services GmbH. All rights reserved.