org.camunda.bpm.engine.impl
Class HistoricProcessInstanceQueryImpl

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<HistoricProcessInstanceQuery,HistoricProcessInstance>
                  extended by org.camunda.bpm.engine.impl.HistoricProcessInstanceQueryImpl
All Implemented Interfaces:
Serializable, HistoricProcessInstanceQuery, Command<Object>, Query<HistoricProcessInstanceQuery,HistoricProcessInstance>

public class HistoricProcessInstanceQueryImpl
extends AbstractVariableQueryImpl<HistoricProcessInstanceQuery,HistoricProcessInstance>
implements HistoricProcessInstanceQuery

Author:
Tom Baeyens, Falko Menge, Bernd Ruecker
See Also:
Serialized Form

Field Summary
protected  String businessKey
           
protected  String businessKeyLike
           
protected  String caseInstanceId
           
protected  Date finishDateBy
           
protected  Date finishDateOn
           
protected  Date finishDateOnBegin
           
protected  Date finishDateOnEnd
           
protected  boolean finished
           
protected  Date finishedAfter
           
protected  Date finishedBefore
           
protected  String processDefinitionId
           
protected  String processDefinitionKey
           
protected  String processDefinitionName
           
protected  String processDefinitionNameLike
           
protected  String processInstanceId
           
protected  Set<String> processInstanceIds
           
protected  List<String> processKeyNotIn
           
protected  Date startDateBy
           
protected  Date startDateOn
           
protected  Date startDateOnBegin
           
protected  Date startDateOnEnd
           
protected  Date startedAfter
           
protected  Date startedBefore
           
protected  String startedBy
           
protected  String subCaseInstanceId
           
protected  String subProcessInstanceId
           
protected  String superCaseInstanceId
           
protected  String superProcessInstanceId
           
protected  boolean unfinished
           
 
Fields inherited from class org.camunda.bpm.engine.impl.AbstractVariableQueryImpl
queryVariableValues
 
Fields inherited from class org.camunda.bpm.engine.impl.AbstractQuery
commandContext, commandExecutor, expressions, orderingProperties, 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, authUserId, isAuthorizationCheckEnabled, permissionChecks
 
Constructor Summary
HistoricProcessInstanceQueryImpl()
           
HistoricProcessInstanceQueryImpl(CommandContext commandContext)
           
HistoricProcessInstanceQueryImpl(CommandExecutor commandExecutor)
           
 
Method Summary
 HistoricProcessInstanceQuery caseInstanceId(String caseInstanceId)
          Only select historic process instances which are associated with the given case instance id.
 long executeCount(CommandContext commandContext)
           
 List<HistoricProcessInstance> executeList(CommandContext commandContext, Page page)
          Executes the actual query to retrieve the list of results.
 HistoricProcessInstanceQuery finishDateBy(Date date)
          Deprecated. 
 HistoricProcessInstanceQuery finishDateOn(Date date)
          Deprecated. 
 HistoricProcessInstanceQuery finished()
          Only select historic process instances that are completely finished.
 HistoricProcessInstanceQuery finishedAfter(Date date)
          Only select historic process instances that were started after the given date.
 HistoricProcessInstanceQuery finishedBefore(Date date)
          Only select historic process instances that were started before the given date.
 String getBusinessKey()
           
 String getBusinessKeyLike()
           
 String getCaseInstanceId()
           
 Date getFinishedAfter()
           
 Date getFinishedBefore()
           
 String getProcessDefinitionId()
           
 String getProcessDefinitionIdLike()
           
 String getProcessDefinitionKey()
           
 String getProcessDefinitionName()
           
 String getProcessDefinitionNameLike()
           
 String getProcessInstanceId()
           
 Set<String> getProcessInstanceIds()
           
 List<String> getProcessKeyNotIn()
           
 Date getStartedAfter()
           
 Date getStartedBefore()
           
 String getStartedBy()
           
 String getSubCaseInstanceId()
           
 String getSubProcessInstanceId()
           
 String getSuperCaseInstanceId()
           
 String getSuperProcessInstanceId()
           
 boolean isOpen()
           
 HistoricProcessInstanceQuery orderByProcessDefinitionId()
          Order by the process definition id (needs to be followed by Query.asc() or Query.desc()).
 HistoricProcessInstanceQuery orderByProcessInstanceBusinessKey()
          Order by the business key (needs to be followed by Query.asc() or Query.desc()).
 HistoricProcessInstanceQuery orderByProcessInstanceDuration()
          Order by the duration of the process instance (needs to be followed by Query.asc() or Query.desc()).
 HistoricProcessInstanceQuery orderByProcessInstanceEndTime()
          Order by the end time (needs to be followed by Query.asc() or Query.desc()).
 HistoricProcessInstanceQuery orderByProcessInstanceId()
          Order by the process instance id (needs to be followed by Query.asc() or Query.desc()).
 HistoricProcessInstanceQuery orderByProcessInstanceStartTime()
          Order by the start time (needs to be followed by Query.asc() or Query.desc()).
 HistoricProcessInstanceQueryImpl processDefinitionId(String processDefinitionId)
          Only select historic process instances for the given process definition
 HistoricProcessInstanceQuery processDefinitionKey(String processDefinitionKey)
          Only select historic process instances that are defined by a process definition with the given key.
 HistoricProcessInstanceQuery processDefinitionKeyNotIn(List<String> processDefinitionKeys)
          Only select historic process instances that don't have a process-definition of which the key is present in the given list
 HistoricProcessInstanceQuery processDefinitionName(String processDefinitionName)
          Only select historic process instances that are defined by a process definition with the given name.
 HistoricProcessInstanceQuery processDefinitionNameLike(String nameLike)
          Only select historic process instances that are defined by process definition which name is like the given value.
 HistoricProcessInstanceQuery processInstanceBusinessKey(String businessKey)
          Only select historic process instances with the given business key
 HistoricProcessInstanceQuery processInstanceBusinessKeyLike(String businessKeyLike)
          Only select historic process instances which had a business key like the given value.
 HistoricProcessInstanceQueryImpl processInstanceId(String processInstanceId)
          Only select historic process instances with the given process instance.
 HistoricProcessInstanceQuery processInstanceIds(Set<String> processInstanceIds)
          Only select historic process instances whose id is in the given set of ids.
 void setSuperProcessInstanceId(String superProcessInstanceId)
           
 HistoricProcessInstanceQuery startDateBy(Date date)
          Deprecated. 
 HistoricProcessInstanceQuery startDateOn(Date date)
          Deprecated. 
 HistoricProcessInstanceQuery startedAfter(Date date)
          Only select historic process instances that were started after the given date.
 HistoricProcessInstanceQuery startedBefore(Date date)
          Only select historic process instances that were started before the given date.
 HistoricProcessInstanceQuery startedBy(String userId)
          Only select historic process instance that are started by the given user.
 HistoricProcessInstanceQuery subCaseInstanceId(String subCaseInstanceId)
          Only select historic process instances having a sub case instance with the given case instance id.
 HistoricProcessInstanceQuery subProcessInstanceId(String subProcessInstanceId)
          Only select historic process instances having a sub process instance with the given process instance id.
 HistoricProcessInstanceQuery superCaseInstanceId(String superCaseInstanceId)
          Only select historic process instances started by the given case instance.
 HistoricProcessInstanceQuery superProcessInstanceId(String superProcessInstanceId)
          Only select historic process instances started by the given process instance.
 HistoricProcessInstanceQuery unfinished()
          Only select historic process instance that are not yet finished.
 
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, asc, checkQueryOk, count, desc, direction, evaluateExpressions, evaluateExpressionsAndExecuteCount, evaluateExpressionsAndExecuteList, execute, executeSingleResult, extend, getExpressions, getMethod, getOrderBy, getOrderingProperties, list, listPage, mergeExpressions, mergeOrdering, orderBy, orderBy, setCommandExecutor, setExpressions, setOrderingProperties, 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
addPermissionCheck, getAuthDefaultPerm, getAuthGroupIds, getAuthUserId, getPermissionChecks, isAuthorizationCheckEnabled, setAuthDefaultPerm, setAuthGroupIds, setAuthorizationCheckEnabled, setAuthUserId, setPermissionChecks
 
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.HistoricProcessInstanceQuery
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

processInstanceId

protected String processInstanceId

processDefinitionId

protected String processDefinitionId

processDefinitionName

protected String processDefinitionName

processDefinitionNameLike

protected String processDefinitionNameLike

businessKey

protected String businessKey

businessKeyLike

protected String businessKeyLike

finished

protected boolean finished

unfinished

protected boolean unfinished

startedBy

protected String startedBy

superProcessInstanceId

protected String superProcessInstanceId

subProcessInstanceId

protected String subProcessInstanceId

superCaseInstanceId

protected String superCaseInstanceId

subCaseInstanceId

protected String subCaseInstanceId

processKeyNotIn

protected List<String> processKeyNotIn

startedBefore

protected Date startedBefore

startedAfter

protected Date startedAfter

finishedBefore

protected Date finishedBefore

finishedAfter

protected Date finishedAfter

processDefinitionKey

protected String processDefinitionKey

processInstanceIds

protected Set<String> processInstanceIds

caseInstanceId

protected String caseInstanceId

startDateBy

protected Date startDateBy

startDateOn

protected Date startDateOn

finishDateBy

protected Date finishDateBy

finishDateOn

protected Date finishDateOn

startDateOnBegin

protected Date startDateOnBegin

startDateOnEnd

protected Date startDateOnEnd

finishDateOnBegin

protected Date finishDateOnBegin

finishDateOnEnd

protected Date finishDateOnEnd
Constructor Detail

HistoricProcessInstanceQueryImpl

public HistoricProcessInstanceQueryImpl()

HistoricProcessInstanceQueryImpl

public HistoricProcessInstanceQueryImpl(CommandContext commandContext)

HistoricProcessInstanceQueryImpl

public HistoricProcessInstanceQueryImpl(CommandExecutor commandExecutor)
Method Detail

processInstanceId

public HistoricProcessInstanceQueryImpl processInstanceId(String processInstanceId)
Description copied from interface: HistoricProcessInstanceQuery
Only select historic process instances with the given process instance. ProcessInstance) ids and {@link HistoricProcessInstance} ids match.

Specified by:
processInstanceId in interface HistoricProcessInstanceQuery

processInstanceIds

public HistoricProcessInstanceQuery processInstanceIds(Set<String> processInstanceIds)
Description copied from interface: HistoricProcessInstanceQuery
Only select historic process instances whose id is in the given set of ids. ProcessInstance) ids and {@link HistoricProcessInstance} ids match.

Specified by:
processInstanceIds in interface HistoricProcessInstanceQuery

processDefinitionId

public HistoricProcessInstanceQueryImpl processDefinitionId(String processDefinitionId)
Description copied from interface: HistoricProcessInstanceQuery
Only select historic process instances for the given process definition

Specified by:
processDefinitionId in interface HistoricProcessInstanceQuery

processDefinitionKey

public HistoricProcessInstanceQuery processDefinitionKey(String processDefinitionKey)
Description copied from interface: HistoricProcessInstanceQuery
Only select historic process instances that are defined by a process definition with the given key.

Specified by:
processDefinitionKey in interface HistoricProcessInstanceQuery

processDefinitionName

public HistoricProcessInstanceQuery processDefinitionName(String processDefinitionName)
Description copied from interface: HistoricProcessInstanceQuery
Only select historic process instances that are defined by a process definition with the given name.

Specified by:
processDefinitionName in interface HistoricProcessInstanceQuery

processDefinitionNameLike

public HistoricProcessInstanceQuery processDefinitionNameLike(String nameLike)
Description copied from interface: HistoricProcessInstanceQuery
Only select historic process instances that are defined by process definition which name is like the given value.

Specified by:
processDefinitionNameLike in interface HistoricProcessInstanceQuery
Parameters:
nameLike - The string can include the wildcard character '%' to express like-strategy: starts with (string%), ends with (%string) or contains (%string%).

processInstanceBusinessKey

public HistoricProcessInstanceQuery processInstanceBusinessKey(String businessKey)
Description copied from interface: HistoricProcessInstanceQuery
Only select historic process instances with the given business key

Specified by:
processInstanceBusinessKey in interface HistoricProcessInstanceQuery

processInstanceBusinessKeyLike

public HistoricProcessInstanceQuery processInstanceBusinessKeyLike(String businessKeyLike)
Description copied from interface: HistoricProcessInstanceQuery
Only select historic process instances which had a business key like the given value.

Specified by:
processInstanceBusinessKeyLike in interface HistoricProcessInstanceQuery

finished

public HistoricProcessInstanceQuery finished()
Description copied from interface: HistoricProcessInstanceQuery
Only select historic process instances that are completely finished.

Specified by:
finished in interface HistoricProcessInstanceQuery

unfinished

public HistoricProcessInstanceQuery unfinished()
Description copied from interface: HistoricProcessInstanceQuery
Only select historic process instance that are not yet finished.

Specified by:
unfinished in interface HistoricProcessInstanceQuery

startedBy

public HistoricProcessInstanceQuery startedBy(String userId)
Description copied from interface: HistoricProcessInstanceQuery
Only select historic process instance that are started by the given user.

Specified by:
startedBy in interface HistoricProcessInstanceQuery

processDefinitionKeyNotIn

public HistoricProcessInstanceQuery processDefinitionKeyNotIn(List<String> processDefinitionKeys)
Description copied from interface: HistoricProcessInstanceQuery
Only select historic process instances that don't have a process-definition of which the key is present in the given list

Specified by:
processDefinitionKeyNotIn in interface HistoricProcessInstanceQuery

startedAfter

public HistoricProcessInstanceQuery startedAfter(Date date)
Description copied from interface: HistoricProcessInstanceQuery
Only select historic process instances that were started after the given date.

Specified by:
startedAfter in interface HistoricProcessInstanceQuery

startedBefore

public HistoricProcessInstanceQuery startedBefore(Date date)
Description copied from interface: HistoricProcessInstanceQuery
Only select historic process instances that were started before the given date.

Specified by:
startedBefore in interface HistoricProcessInstanceQuery

finishedAfter

public HistoricProcessInstanceQuery finishedAfter(Date date)
Description copied from interface: HistoricProcessInstanceQuery
Only select historic process instances that were started after the given date.

Specified by:
finishedAfter in interface HistoricProcessInstanceQuery

finishedBefore

public HistoricProcessInstanceQuery finishedBefore(Date date)
Description copied from interface: HistoricProcessInstanceQuery
Only select historic process instances that were started before the given date.

Specified by:
finishedBefore in interface HistoricProcessInstanceQuery

superProcessInstanceId

public HistoricProcessInstanceQuery superProcessInstanceId(String superProcessInstanceId)
Description copied from interface: HistoricProcessInstanceQuery
Only select historic process instances started by the given process instance. ProcessInstance) ids and {@link HistoricProcessInstance} ids match.

Specified by:
superProcessInstanceId in interface HistoricProcessInstanceQuery

subProcessInstanceId

public HistoricProcessInstanceQuery subProcessInstanceId(String subProcessInstanceId)
Description copied from interface: HistoricProcessInstanceQuery
Only select historic process instances having a sub process instance with the given process instance id. Note that there will always be maximum only one such process instance that can be the result of this query.

Specified by:
subProcessInstanceId in interface HistoricProcessInstanceQuery

superCaseInstanceId

public HistoricProcessInstanceQuery superCaseInstanceId(String superCaseInstanceId)
Description copied from interface: HistoricProcessInstanceQuery
Only select historic process instances started by the given case instance.

Specified by:
superCaseInstanceId in interface HistoricProcessInstanceQuery

subCaseInstanceId

public HistoricProcessInstanceQuery subCaseInstanceId(String subCaseInstanceId)
Description copied from interface: HistoricProcessInstanceQuery
Only select historic process instances having a sub case instance with the given case instance id. Note that there will always be maximum only one such process instance that can be the result of this query.

Specified by:
subCaseInstanceId in interface HistoricProcessInstanceQuery

caseInstanceId

public HistoricProcessInstanceQuery caseInstanceId(String caseInstanceId)
Description copied from interface: HistoricProcessInstanceQuery
Only select historic process instances which are associated with the given case instance id.

Specified by:
caseInstanceId in interface HistoricProcessInstanceQuery

orderByProcessInstanceBusinessKey

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

Specified by:
orderByProcessInstanceBusinessKey in interface HistoricProcessInstanceQuery

orderByProcessInstanceDuration

public HistoricProcessInstanceQuery orderByProcessInstanceDuration()
Description copied from interface: HistoricProcessInstanceQuery
Order by the duration of the process instance (needs to be followed by Query.asc() or Query.desc()).

Specified by:
orderByProcessInstanceDuration in interface HistoricProcessInstanceQuery

orderByProcessInstanceStartTime

public HistoricProcessInstanceQuery orderByProcessInstanceStartTime()
Description copied from interface: HistoricProcessInstanceQuery
Order by the start time (needs to be followed by Query.asc() or Query.desc()).

Specified by:
orderByProcessInstanceStartTime in interface HistoricProcessInstanceQuery

orderByProcessInstanceEndTime

public HistoricProcessInstanceQuery orderByProcessInstanceEndTime()
Description copied from interface: HistoricProcessInstanceQuery
Order by the end time (needs to be followed by Query.asc() or Query.desc()).

Specified by:
orderByProcessInstanceEndTime in interface HistoricProcessInstanceQuery

orderByProcessDefinitionId

public HistoricProcessInstanceQuery orderByProcessDefinitionId()
Description copied from interface: HistoricProcessInstanceQuery
Order by the process definition id (needs to be followed by Query.asc() or Query.desc()).

Specified by:
orderByProcessDefinitionId in interface HistoricProcessInstanceQuery

orderByProcessInstanceId

public HistoricProcessInstanceQuery orderByProcessInstanceId()
Description copied from interface: HistoricProcessInstanceQuery
Order by the process instance id (needs to be followed by Query.asc() or Query.desc()).

Specified by:
orderByProcessInstanceId in interface HistoricProcessInstanceQuery

executeCount

public long executeCount(CommandContext commandContext)
Specified by:
executeCount in class AbstractVariableQueryImpl<HistoricProcessInstanceQuery,HistoricProcessInstance>

executeList

public List<HistoricProcessInstance> 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<HistoricProcessInstanceQuery,HistoricProcessInstance>
page - used if the results must be paged. If null, no paging will be applied.

getBusinessKey

public String getBusinessKey()

getBusinessKeyLike

public String getBusinessKeyLike()

isOpen

public boolean isOpen()

getProcessDefinitionId

public String getProcessDefinitionId()

getProcessDefinitionKey

public String getProcessDefinitionKey()

getProcessDefinitionIdLike

public String getProcessDefinitionIdLike()

getProcessDefinitionName

public String getProcessDefinitionName()

getProcessDefinitionNameLike

public String getProcessDefinitionNameLike()

getProcessInstanceId

public String getProcessInstanceId()

getProcessInstanceIds

public Set<String> getProcessInstanceIds()

getStartedBy

public String getStartedBy()

getSuperProcessInstanceId

public String getSuperProcessInstanceId()

setSuperProcessInstanceId

public void setSuperProcessInstanceId(String superProcessInstanceId)

getProcessKeyNotIn

public List<String> getProcessKeyNotIn()

getStartedAfter

public Date getStartedAfter()

getStartedBefore

public Date getStartedBefore()

getFinishedAfter

public Date getFinishedAfter()

getFinishedBefore

public Date getFinishedBefore()

getCaseInstanceId

public String getCaseInstanceId()

startDateBy

@Deprecated
public HistoricProcessInstanceQuery startDateBy(Date date)
Deprecated. 

Description copied from interface: HistoricProcessInstanceQuery
Only select historic process instances that were started as of the provided date. (Date will be adjusted to reflect midnight)

Specified by:
startDateBy in interface HistoricProcessInstanceQuery

startDateOn

@Deprecated
public HistoricProcessInstanceQuery startDateOn(Date date)
Deprecated. 

Description copied from interface: HistoricProcessInstanceQuery
Only select historic process instances that were started on the provided date.

Specified by:
startDateOn in interface HistoricProcessInstanceQuery

finishDateBy

@Deprecated
public HistoricProcessInstanceQuery finishDateBy(Date date)
Deprecated. 

Description copied from interface: HistoricProcessInstanceQuery
Only select historic process instances that were finished as of the provided date. (Date will be adjusted to reflect one second before midnight)

Specified by:
finishDateBy in interface HistoricProcessInstanceQuery

finishDateOn

@Deprecated
public HistoricProcessInstanceQuery finishDateOn(Date date)
Deprecated. 

Description copied from interface: HistoricProcessInstanceQuery
Only select historic process instances that were finished on provided date.

Specified by:
finishDateOn in interface HistoricProcessInstanceQuery

getSubProcessInstanceId

public String getSubProcessInstanceId()

getSuperCaseInstanceId

public String getSuperCaseInstanceId()

getSubCaseInstanceId

public String getSubCaseInstanceId()


Copyright © 2015 camunda services GmbH. All rights reserved.