org.camunda.bpm.engine.impl
Class ProcessDefinitionQueryImpl

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

public class ProcessDefinitionQueryImpl
extends AbstractQuery<ProcessDefinitionQuery,ProcessDefinition>
implements ProcessDefinitionQuery

Author:
Tom Baeyens, Joram Barrez, Daniel Meyer, Saeid Mirzaei
See Also:
Serialized Form

Field Summary
protected  String authorizationUserId
           
protected  String category
           
protected  String categoryLike
           
protected  String deploymentId
           
protected  String eventSubscriptionName
           
protected  String eventSubscriptionType
           
protected  String id
           
protected  String incidentId
           
protected  String incidentMessage
           
protected  String incidentMessageLike
           
protected  String incidentType
           
protected  String key
           
protected  String keyLike
           
protected  boolean latest
           
protected  String name
           
protected  String nameLike
           
protected  String procDefId
           
protected  String resourceName
           
protected  String resourceNameLike
           
protected  SuspensionState suspensionState
           
protected  Integer version
           
 
Fields inherited from class org.camunda.bpm.engine.impl.AbstractQuery
commandContext, commandExecutor, orderBy, orderProperty, resultType, SORTORDER_ASC, SORTORDER_DESC
 
Fields inherited from class org.camunda.bpm.engine.impl.db.ListQueryParameterObject
databaseType, firstResult, maxResults, parameter
 
Fields inherited from class org.camunda.bpm.engine.impl.db.AuthorizationCheck
authDefaultPerm, authGroupIds, authPerms, authResourceId, authResourceIdQueryParam, authResourceType, authUserId, isAuthorizationCheckEnabled
 
Constructor Summary
ProcessDefinitionQueryImpl()
           
ProcessDefinitionQueryImpl(CommandContext commandContext)
           
ProcessDefinitionQueryImpl(CommandExecutor commandExecutor)
           
 
Method Summary
 ProcessDefinitionQuery active()
          Only selects process definitions which are active
 void checkQueryOk()
           
 ProcessDefinitionQueryImpl deploymentId(String deploymentId)
          Only select process definitions that are deployed in a deployment with the given deployment id
 ProcessDefinitionQuery eventSubscription(String eventType, String eventName)
           
 long executeCount(CommandContext commandContext)
           
 List<ProcessDefinition> executeList(CommandContext commandContext, Page page)
          Executes the actual query to retrieve the list of results.
 String getCategory()
           
 String getCategoryLike()
           
 String getDeploymentId()
           
 String getId()
           
 String getIncidentId()
           
 String getIncidentMessage()
           
 String getIncidentMessageLike()
           
 String getIncidentType()
           
 String getKey()
           
 String getKeyLike()
           
 String getName()
           
 String getNameLike()
           
 String getResourceName()
           
 String getResourceNameLike()
           
 SuspensionState getSuspensionState()
           
 Integer getVersion()
           
 ProcessDefinitionQuery incidentId(String incidentId)
          Only selects process definitions with the given incident id.
 ProcessDefinitionQuery incidentMessage(String incidentMessage)
          Only selects process definitions with the given incident message.
 ProcessDefinitionQuery incidentMessageLike(String incidentMessageLike)
          Only selects process definitions with an incident message like the given.
 ProcessDefinitionQuery incidentType(String incidentType)
          Only selects process definitions with the given incident type.
 boolean isLatest()
           
 ProcessDefinitionQueryImpl latestVersion()
          Only select the process definitions which are the latest deployed (ie.
 ProcessDefinitionQuery messageEventSubscription(String messageName)
           
 ProcessDefinitionQuery messageEventSubscriptionName(String messageName)
          Selects the single process definition which has a start message event with the messageName.
 ProcessDefinitionQuery orderByDeploymentId()
          Order by deployment id (needs to be followed by Query.asc() or Query.desc()).
 ProcessDefinitionQuery orderByProcessDefinitionCategory()
          Order by the category of the process definitions (needs to be followed by Query.asc() or Query.desc()).
 ProcessDefinitionQuery orderByProcessDefinitionId()
          Order by the id of the process definitions (needs to be followed by Query.asc() or Query.desc()).
 ProcessDefinitionQuery orderByProcessDefinitionKey()
          Order by process definition key (needs to be followed by Query.asc() or Query.desc()).
 ProcessDefinitionQuery orderByProcessDefinitionName()
          Order by the name of the process definitions (needs to be followed by Query.asc() or Query.desc()).
 ProcessDefinitionQuery orderByProcessDefinitionVersion()
          Order by the version of the process definitions (needs to be followed by Query.asc() or Query.desc()).
 ProcessDefinitionQueryImpl processDefinitionCategory(String category)
          Only select process definitions with the given category.
 ProcessDefinitionQueryImpl processDefinitionCategoryLike(String categoryLike)
          Only select process definitions where the category matches the given parameter.
 ProcessDefinitionQueryImpl processDefinitionId(String processDefinitionId)
          Only select process definiton with the given id.
 ProcessDefinitionQueryImpl processDefinitionKey(String key)
          Only select process definition with the given key.
 ProcessDefinitionQueryImpl processDefinitionKeyLike(String keyLike)
          Only select process definitions where the key matches the given parameter.
 ProcessDefinitionQueryImpl processDefinitionName(String name)
          Only select process definitions with the given name.
 ProcessDefinitionQueryImpl processDefinitionNameLike(String nameLike)
          Only select process definitions where the name matches the given parameter.
 ProcessDefinitionQueryImpl processDefinitionResourceName(String resourceName)
          Only select process definition with the given resource name.
 ProcessDefinitionQueryImpl processDefinitionResourceNameLike(String resourceNameLike)
          Only select process definition with a resource name like the given .
 ProcessDefinitionQuery processDefinitionStarter(String procDefId)
           
 ProcessDefinitionQueryImpl processDefinitionVersion(Integer version)
          Only select process definition with a certain version.
 void setSuspensionState(SuspensionState suspensionState)
           
 ProcessDefinitionQueryImpl startableByUser(String userId)
          Only selects process definitions which given userId is authorized to start
 ProcessDefinitionQuery suspended()
          Only selects process definitions which are suspended
 
Methods inherited from class org.camunda.bpm.engine.impl.AbstractQuery
addOrder, asc, assertParamNotNull, assertParamNotNull, count, desc, direction, execute, executeSingleResult, getOrderBy, list, listPage, orderBy, setCommandExecutor, 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.query.Query
asc, count, desc, list, listPage, singleResult
 

Field Detail

id

protected String id

category

protected String category

categoryLike

protected String categoryLike

name

protected String name

nameLike

protected String nameLike

deploymentId

protected String deploymentId

key

protected String key

keyLike

protected String keyLike

resourceName

protected String resourceName

resourceNameLike

protected String resourceNameLike

version

protected Integer version

latest

protected boolean latest

suspensionState

protected SuspensionState suspensionState

authorizationUserId

protected String authorizationUserId

procDefId

protected String procDefId

incidentType

protected String incidentType

incidentId

protected String incidentId

incidentMessage

protected String incidentMessage

incidentMessageLike

protected String incidentMessageLike

eventSubscriptionName

protected String eventSubscriptionName

eventSubscriptionType

protected String eventSubscriptionType
Constructor Detail

ProcessDefinitionQueryImpl

public ProcessDefinitionQueryImpl()

ProcessDefinitionQueryImpl

public ProcessDefinitionQueryImpl(CommandContext commandContext)

ProcessDefinitionQueryImpl

public ProcessDefinitionQueryImpl(CommandExecutor commandExecutor)
Method Detail

processDefinitionId

public ProcessDefinitionQueryImpl processDefinitionId(String processDefinitionId)
Description copied from interface: ProcessDefinitionQuery
Only select process definiton with the given id.

Specified by:
processDefinitionId in interface ProcessDefinitionQuery

processDefinitionCategory

public ProcessDefinitionQueryImpl processDefinitionCategory(String category)
Description copied from interface: ProcessDefinitionQuery
Only select process definitions with the given category.

Specified by:
processDefinitionCategory in interface ProcessDefinitionQuery

processDefinitionCategoryLike

public ProcessDefinitionQueryImpl processDefinitionCategoryLike(String categoryLike)
Description copied from interface: ProcessDefinitionQuery
Only select process definitions where the category matches the given parameter. The syntax that should be used is the same as in SQL, eg. %activiti%

Specified by:
processDefinitionCategoryLike in interface ProcessDefinitionQuery

processDefinitionName

public ProcessDefinitionQueryImpl processDefinitionName(String name)
Description copied from interface: ProcessDefinitionQuery
Only select process definitions with the given name.

Specified by:
processDefinitionName in interface ProcessDefinitionQuery

processDefinitionNameLike

public ProcessDefinitionQueryImpl processDefinitionNameLike(String nameLike)
Description copied from interface: ProcessDefinitionQuery
Only select process definitions where the name matches the given parameter. The syntax that should be used is the same as in SQL, eg. %activiti%

Specified by:
processDefinitionNameLike in interface ProcessDefinitionQuery

deploymentId

public ProcessDefinitionQueryImpl deploymentId(String deploymentId)
Description copied from interface: ProcessDefinitionQuery
Only select process definitions that are deployed in a deployment with the given deployment id

Specified by:
deploymentId in interface ProcessDefinitionQuery

processDefinitionKey

public ProcessDefinitionQueryImpl processDefinitionKey(String key)
Description copied from interface: ProcessDefinitionQuery
Only select process definition with the given key.

Specified by:
processDefinitionKey in interface ProcessDefinitionQuery

processDefinitionKeyLike

public ProcessDefinitionQueryImpl processDefinitionKeyLike(String keyLike)
Description copied from interface: ProcessDefinitionQuery
Only select process definitions where the key matches the given parameter. The syntax that should be used is the same as in SQL, eg. %activiti%

Specified by:
processDefinitionKeyLike in interface ProcessDefinitionQuery

processDefinitionResourceName

public ProcessDefinitionQueryImpl processDefinitionResourceName(String resourceName)
Description copied from interface: ProcessDefinitionQuery
Only select process definition with the given resource name.

Specified by:
processDefinitionResourceName in interface ProcessDefinitionQuery

processDefinitionResourceNameLike

public ProcessDefinitionQueryImpl processDefinitionResourceNameLike(String resourceNameLike)
Description copied from interface: ProcessDefinitionQuery
Only select process definition with a resource name like the given .

Specified by:
processDefinitionResourceNameLike in interface ProcessDefinitionQuery

processDefinitionVersion

public ProcessDefinitionQueryImpl processDefinitionVersion(Integer version)
Description copied from interface: ProcessDefinitionQuery
Only select process definition with a certain version. Particulary useful when used in combination with ProcessDefinitionQuery.processDefinitionKey(String)

Specified by:
processDefinitionVersion in interface ProcessDefinitionQuery

latestVersion

public ProcessDefinitionQueryImpl latestVersion()
Description copied from interface: ProcessDefinitionQuery
Only select the process definitions which are the latest deployed (ie. which have the highest version number for the given key). Can only be used in combinatioin with ProcessDefinitionQuery.processDefinitionKey(String) of ProcessDefinitionQuery.processDefinitionKeyLike(String). Can also be used without any other criteria (ie. query.latest().list()), which will then give all the latest versions of all the deployed process definitions.

Specified by:
latestVersion in interface ProcessDefinitionQuery

active

public ProcessDefinitionQuery active()
Description copied from interface: ProcessDefinitionQuery
Only selects process definitions which are active

Specified by:
active in interface ProcessDefinitionQuery

suspended

public ProcessDefinitionQuery suspended()
Description copied from interface: ProcessDefinitionQuery
Only selects process definitions which are suspended

Specified by:
suspended in interface ProcessDefinitionQuery

messageEventSubscription

public ProcessDefinitionQuery messageEventSubscription(String messageName)
Specified by:
messageEventSubscription in interface ProcessDefinitionQuery
See Also:
ProcessDefinitionQuery.messageEventSubscriptionName(String)

messageEventSubscriptionName

public ProcessDefinitionQuery messageEventSubscriptionName(String messageName)
Description copied from interface: ProcessDefinitionQuery
Selects the single process definition which has a start message event with the messageName.

Specified by:
messageEventSubscriptionName in interface ProcessDefinitionQuery

processDefinitionStarter

public ProcessDefinitionQuery processDefinitionStarter(String procDefId)

eventSubscription

public ProcessDefinitionQuery eventSubscription(String eventType,
                                                String eventName)

incidentType

public ProcessDefinitionQuery incidentType(String incidentType)
Description copied from interface: ProcessDefinitionQuery
Only selects process definitions with the given incident type.

Specified by:
incidentType in interface ProcessDefinitionQuery

incidentId

public ProcessDefinitionQuery incidentId(String incidentId)
Description copied from interface: ProcessDefinitionQuery
Only selects process definitions with the given incident id.

Specified by:
incidentId in interface ProcessDefinitionQuery

incidentMessage

public ProcessDefinitionQuery incidentMessage(String incidentMessage)
Description copied from interface: ProcessDefinitionQuery
Only selects process definitions with the given incident message.

Specified by:
incidentMessage in interface ProcessDefinitionQuery

incidentMessageLike

public ProcessDefinitionQuery incidentMessageLike(String incidentMessageLike)
Description copied from interface: ProcessDefinitionQuery
Only selects process definitions with an incident message like the given.

Specified by:
incidentMessageLike in interface ProcessDefinitionQuery

orderByDeploymentId

public ProcessDefinitionQuery orderByDeploymentId()
Description copied from interface: ProcessDefinitionQuery
Order by deployment id (needs to be followed by Query.asc() or Query.desc()).

Specified by:
orderByDeploymentId in interface ProcessDefinitionQuery

orderByProcessDefinitionKey

public ProcessDefinitionQuery orderByProcessDefinitionKey()
Description copied from interface: ProcessDefinitionQuery
Order by process definition key (needs to be followed by Query.asc() or Query.desc()).

Specified by:
orderByProcessDefinitionKey in interface ProcessDefinitionQuery

orderByProcessDefinitionCategory

public ProcessDefinitionQuery orderByProcessDefinitionCategory()
Description copied from interface: ProcessDefinitionQuery
Order by the category of the process definitions (needs to be followed by Query.asc() or Query.desc()).

Specified by:
orderByProcessDefinitionCategory in interface ProcessDefinitionQuery

orderByProcessDefinitionId

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

Specified by:
orderByProcessDefinitionId in interface ProcessDefinitionQuery

orderByProcessDefinitionVersion

public ProcessDefinitionQuery orderByProcessDefinitionVersion()
Description copied from interface: ProcessDefinitionQuery
Order by the version of the process definitions (needs to be followed by Query.asc() or Query.desc()).

Specified by:
orderByProcessDefinitionVersion in interface ProcessDefinitionQuery

orderByProcessDefinitionName

public ProcessDefinitionQuery orderByProcessDefinitionName()
Description copied from interface: ProcessDefinitionQuery
Order by the name of the process definitions (needs to be followed by Query.asc() or Query.desc()).

Specified by:
orderByProcessDefinitionName in interface ProcessDefinitionQuery

executeCount

public long executeCount(CommandContext commandContext)
Specified by:
executeCount in class AbstractQuery<ProcessDefinitionQuery,ProcessDefinition>

executeList

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

checkQueryOk

public void checkQueryOk()
Overrides:
checkQueryOk in class AbstractQuery<ProcessDefinitionQuery,ProcessDefinition>

getDeploymentId

public String getDeploymentId()

getId

public String getId()

getName

public String getName()

getNameLike

public String getNameLike()

getKey

public String getKey()

getKeyLike

public String getKeyLike()

getVersion

public Integer getVersion()

isLatest

public boolean isLatest()

getCategory

public String getCategory()

getCategoryLike

public String getCategoryLike()

getResourceName

public String getResourceName()

getResourceNameLike

public String getResourceNameLike()

getSuspensionState

public SuspensionState getSuspensionState()

setSuspensionState

public void setSuspensionState(SuspensionState suspensionState)

getIncidentId

public String getIncidentId()

getIncidentType

public String getIncidentType()

getIncidentMessage

public String getIncidentMessage()

getIncidentMessageLike

public String getIncidentMessageLike()

startableByUser

public ProcessDefinitionQueryImpl startableByUser(String userId)
Description copied from interface: ProcessDefinitionQuery
Only selects process definitions which given userId is authorized to start

Specified by:
startableByUser in interface ProcessDefinitionQuery


Copyright © 2014 camunda services GmbH. All Rights Reserved.