Package org.camunda.bpm.engine.impl
Class ProcessDefinitionQueryImpl
java.lang.Object
org.camunda.bpm.engine.impl.db.ListQueryParameterObject
org.camunda.bpm.engine.impl.AbstractQuery<ProcessDefinitionQuery,ProcessDefinition>
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:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.camunda.bpm.engine.impl.AbstractQuery
AbstractQuery.ResultType -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected Stringprotected Stringprotected Dateprotected Dateprotected Stringprotected Stringprotected Stringprotected Stringprotected String[]protected Stringprotected Stringprotected Stringprotected Stringprotected booleanprotected booleanprotected booleanprotected booleanprotected booleanprotected Stringprotected Stringprotected String[]protected booleanprotected Stringprotected Stringprotected Stringprotected List<PermissionCheck>protected Stringprotected Stringprotected booleanprotected SuspensionStateprotected String[]protected Integerprotected Stringprotected StringFields inherited from class org.camunda.bpm.engine.impl.AbstractQuery
commandExecutor, expressions, maxResultsLimitEnabled, resultType, SORTORDER_ASC, SORTORDER_DESC, validatorsFields inherited from class org.camunda.bpm.engine.impl.db.ListQueryParameterObject
authCheck, databaseType, firstResult, maxResults, orderingProperties, parameter, tenantCheck -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionactive()Only selects process definitions which are activevoidaddProcessDefinitionCreatePermissionCheck(CompositePermissionCheck processDefinitionCreatePermissionCheck) protected voidvoiddeployedAfter(Date deployedAfter) Only select process definitions that were deployed after the given Date (exclusive).deployedAt(Date deployedAt) Only select process definitions that were deployed at the given Date.deploymentId(String deploymentId) Only select process definitions that are deployed in a deployment with the given deployment ideventSubscription(EventType eventType, String eventName) longexecuteCount(CommandContext commandContext) executeList(CommandContext commandContext, Page page) Executes the actual query to retrieve the list of results.getId()String[]getIds()getKey()getName()protected booleanWhether or not the query has excluding conditions.incidentId(String incidentId) Only selects process definitions with the given incident id.incidentMessage(String incidentMessage) Only selects process definitions with the given incident message.incidentMessageLike(String incidentMessageLike) Only selects process definitions with an incident message like the given.incidentType(String incidentType) Only selects process definitions with the given incident type.Select process definitions which have no tenant id.booleanisLatest()booleanbooleanbooleanbooleanOnly select the process definitions which are the latest deployed (ie.messageEventSubscription(String messageName) messageEventSubscriptionName(String messageName) Selects the single process definition which has a start message event with the messageName.Select process definitions which could not be started in Tasklist.Order by deployment id (needs to be followed byQuery.asc()orQuery.desc()).Order by deployment time (needs to be followed byQuery.asc()orQuery.desc()).Order by the category of the process definitions (needs to be followed byQuery.asc()orQuery.desc()).Order by the id of the process definitions (needs to be followed byQuery.asc()orQuery.desc()).Order by process definition key (needs to be followed byQuery.asc()orQuery.desc()).Order by the name of the process definitions (needs to be followed byQuery.asc()orQuery.desc()).Order by the version of the process definitions (needs to be followed byQuery.asc()orQuery.desc()).Order by tenant id (needs to be followed byQuery.asc()orQuery.desc()).Order by version tag (needs to be followed byQuery.asc()orQuery.desc()).processDefinitionCategory(String category) Only select process definitions with the given category.processDefinitionCategoryLike(String categoryLike) Only select process definitions where the category matches the given parameter.processDefinitionId(String processDefinitionId) Only select process definition with the given id.processDefinitionIdIn(String... ids) Only select process definition with the given id.Only select process definition with the given key.processDefinitionKeyIn(String... processDefinitionKeys) Only select process definitions with the given keys.processDefinitionKeyLike(String keyLike) Only select process definitions where the key matches the given parameter.processDefinitionKeysIn(String... processDefinitionKeys) Only select process definitions with the given keys.processDefinitionName(String name) Only select process definitions with the given name.processDefinitionNameLike(String nameLike) Only select process definitions where the name matches the given parameter.processDefinitionResourceName(String resourceName) Only select process definition with the given resource name.processDefinitionResourceNameLike(String resourceNameLike) Only select process definition with a resource name like the given .processDefinitionStarter(String procDefId) processDefinitionVersion(Integer version) Only select process definition with a certain version.voidsetProcessDefinitionCreatePermissionChecks(List<PermissionCheck> processDefinitionCreatePermissionChecks) voidsetSuspensionState(SuspensionState suspensionState) startableByUser(String userId) Only selects process definitions which given userId is authorized to startSelect process definitions which could be started in Tasklist.Only selects process definitions which are suspendedtenantIdIn(String... tenantIds) Only select process definitions with one of the given tenant ids.versionTag(String versionTag) Only selects process definitions with a specific version tagversionTagLike(String versionTagLike) Only selects process definitions with a version tag like the givenOnly select process definitions which have no tenant id.Only selects process definitions without a version tagMethods inherited from class org.camunda.bpm.engine.impl.AbstractQuery
addExpression, addValidator, asc, checkMaxResultsLimit, 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, validateMethods 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, setTenantCheckMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.camunda.bpm.engine.query.Query
asc, count, desc, list, listPage, singleResult, unlimitedList
-
Field Details
-
id
-
ids
-
category
-
categoryLike
-
name
-
nameLike
-
deploymentId
-
deployedAfter
-
deployedAt
-
key
-
keys
-
keyLike
-
resourceName
-
resourceNameLike
-
version
-
latest
protected boolean latest -
suspensionState
-
authorizationUserId
-
cachedCandidateGroups
-
procDefId
-
incidentType
-
incidentId
-
incidentMessage
-
incidentMessageLike
-
eventSubscriptionName
-
eventSubscriptionType
-
isTenantIdSet
protected boolean isTenantIdSet -
tenantIds
-
includeDefinitionsWithoutTenantId
protected boolean includeDefinitionsWithoutTenantId -
isVersionTagSet
protected boolean isVersionTagSet -
versionTag
-
versionTagLike
-
isStartableInTasklist
protected boolean isStartableInTasklist -
isNotStartableInTasklist
protected boolean isNotStartableInTasklist -
startablePermissionCheck
protected boolean startablePermissionCheck -
processDefinitionCreatePermissionChecks
-
-
Constructor Details
-
ProcessDefinitionQueryImpl
public ProcessDefinitionQueryImpl() -
ProcessDefinitionQueryImpl
-
-
Method Details
-
processDefinitionId
Description copied from interface:ProcessDefinitionQueryOnly select process definition with the given id.- Specified by:
processDefinitionIdin interfaceProcessDefinitionQuery
-
processDefinitionIdIn
Description copied from interface:ProcessDefinitionQueryOnly select process definition with the given id.- Specified by:
processDefinitionIdInin interfaceProcessDefinitionQuery
-
processDefinitionCategory
Description copied from interface:ProcessDefinitionQueryOnly select process definitions with the given category.- Specified by:
processDefinitionCategoryin interfaceProcessDefinitionQuery
-
processDefinitionCategoryLike
Description copied from interface:ProcessDefinitionQueryOnly 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:
processDefinitionCategoryLikein interfaceProcessDefinitionQuery
-
processDefinitionName
Description copied from interface:ProcessDefinitionQueryOnly select process definitions with the given name.- Specified by:
processDefinitionNamein interfaceProcessDefinitionQuery
-
processDefinitionNameLike
Description copied from interface:ProcessDefinitionQueryOnly 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:
processDefinitionNameLikein interfaceProcessDefinitionQuery
-
deploymentId
Description copied from interface:ProcessDefinitionQueryOnly select process definitions that are deployed in a deployment with the given deployment id- Specified by:
deploymentIdin interfaceProcessDefinitionQuery
-
deployedAfter
Description copied from interface:ProcessDefinitionQueryOnly select process definitions that were deployed after the given Date (exclusive).- Specified by:
deployedAfterin interfaceProcessDefinitionQuery
-
deployedAt
Description copied from interface:ProcessDefinitionQueryOnly select process definitions that were deployed at the given Date.- Specified by:
deployedAtin interfaceProcessDefinitionQuery
-
processDefinitionKey
Description copied from interface:ProcessDefinitionQueryOnly select process definition with the given key.- Specified by:
processDefinitionKeyin interfaceProcessDefinitionQuery
-
processDefinitionKeysIn
Description copied from interface:ProcessDefinitionQueryOnly select process definitions with the given keys.Deprecated: use
ProcessDefinitionQuery.processDefinitionKeyIn(String...)- Specified by:
processDefinitionKeysInin interfaceProcessDefinitionQuery
-
processDefinitionKeyIn
Description copied from interface:ProcessDefinitionQueryOnly select process definitions with the given keys.- Specified by:
processDefinitionKeyInin interfaceProcessDefinitionQuery- Parameters:
processDefinitionKeys- keys to look for during query.- Returns:
- query builder.
-
processDefinitionKeyLike
Description copied from interface:ProcessDefinitionQueryOnly 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:
processDefinitionKeyLikein interfaceProcessDefinitionQuery
-
processDefinitionResourceName
Description copied from interface:ProcessDefinitionQueryOnly select process definition with the given resource name.- Specified by:
processDefinitionResourceNamein interfaceProcessDefinitionQuery
-
processDefinitionResourceNameLike
Description copied from interface:ProcessDefinitionQueryOnly select process definition with a resource name like the given .- Specified by:
processDefinitionResourceNameLikein interfaceProcessDefinitionQuery
-
processDefinitionVersion
Description copied from interface:ProcessDefinitionQueryOnly select process definition with a certain version. Particularly useful when used in combination withProcessDefinitionQuery.processDefinitionKey(String)- Specified by:
processDefinitionVersionin interfaceProcessDefinitionQuery
-
latestVersion
Description copied from interface:ProcessDefinitionQueryOnly 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 combination with
ProcessDefinitionQuery.processDefinitionKey(String)ofProcessDefinitionQuery.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.For multi-tenancy: select the latest deployed process definitions for each tenant. If a process definition is deployed for multiple tenants then all process definitions are selected.
- Specified by:
latestVersionin interfaceProcessDefinitionQuery
-
active
Description copied from interface:ProcessDefinitionQueryOnly selects process definitions which are active- Specified by:
activein interfaceProcessDefinitionQuery
-
suspended
Description copied from interface:ProcessDefinitionQueryOnly selects process definitions which are suspended- Specified by:
suspendedin interfaceProcessDefinitionQuery
-
messageEventSubscription
- Specified by:
messageEventSubscriptionin interfaceProcessDefinitionQuery- See Also:
-
messageEventSubscriptionName
Description copied from interface:ProcessDefinitionQuerySelects the single process definition which has a start message event with the messageName.- Specified by:
messageEventSubscriptionNamein interfaceProcessDefinitionQuery
-
processDefinitionStarter
-
eventSubscription
-
incidentType
Description copied from interface:ProcessDefinitionQueryOnly selects process definitions with the given incident type.- Specified by:
incidentTypein interfaceProcessDefinitionQuery
-
incidentId
Description copied from interface:ProcessDefinitionQueryOnly selects process definitions with the given incident id.- Specified by:
incidentIdin interfaceProcessDefinitionQuery
-
incidentMessage
Description copied from interface:ProcessDefinitionQueryOnly selects process definitions with the given incident message.- Specified by:
incidentMessagein interfaceProcessDefinitionQuery
-
incidentMessageLike
Description copied from interface:ProcessDefinitionQueryOnly selects process definitions with an incident message like the given.- Specified by:
incidentMessageLikein interfaceProcessDefinitionQuery
-
tenantIdIn
Description copied from interface:ProcessDefinitionQueryOnly select process definitions with one of the given tenant ids.- Specified by:
tenantIdInin interfaceProcessDefinitionQuery
-
withoutTenantId
Description copied from interface:ProcessDefinitionQueryOnly select process definitions which have no tenant id.- Specified by:
withoutTenantIdin interfaceProcessDefinitionQuery
-
includeProcessDefinitionsWithoutTenantId
Description copied from interface:ProcessDefinitionQuerySelect process definitions which have no tenant id. Can be used in combination withProcessDefinitionQuery.tenantIdIn(String...).- Specified by:
includeProcessDefinitionsWithoutTenantIdin interfaceProcessDefinitionQuery
-
versionTag
Description copied from interface:ProcessDefinitionQueryOnly selects process definitions with a specific version tag- Specified by:
versionTagin interfaceProcessDefinitionQuery
-
versionTagLike
Description copied from interface:ProcessDefinitionQueryOnly selects process definitions with a version tag like the given- Specified by:
versionTagLikein interfaceProcessDefinitionQuery
-
withoutVersionTag
Description copied from interface:ProcessDefinitionQueryOnly selects process definitions without a version tag- Specified by:
withoutVersionTagin interfaceProcessDefinitionQuery
-
startableInTasklist
Description copied from interface:ProcessDefinitionQuerySelect process definitions which could be started in Tasklist.- Specified by:
startableInTasklistin interfaceProcessDefinitionQuery
-
notStartableInTasklist
Description copied from interface:ProcessDefinitionQuerySelect process definitions which could not be started in Tasklist.- Specified by:
notStartableInTasklistin interfaceProcessDefinitionQuery
-
startablePermissionCheck
- Specified by:
startablePermissionCheckin interfaceProcessDefinitionQuery
-
orderByDeploymentId
Description copied from interface:ProcessDefinitionQueryOrder by deployment id (needs to be followed byQuery.asc()orQuery.desc()).- Specified by:
orderByDeploymentIdin interfaceProcessDefinitionQuery
-
orderByDeploymentTime
Description copied from interface:ProcessDefinitionQueryOrder by deployment time (needs to be followed byQuery.asc()orQuery.desc()).- Specified by:
orderByDeploymentTimein interfaceProcessDefinitionQuery
-
orderByProcessDefinitionKey
Description copied from interface:ProcessDefinitionQueryOrder by process definition key (needs to be followed byQuery.asc()orQuery.desc()).- Specified by:
orderByProcessDefinitionKeyin interfaceProcessDefinitionQuery
-
orderByProcessDefinitionCategory
Description copied from interface:ProcessDefinitionQueryOrder by the category of the process definitions (needs to be followed byQuery.asc()orQuery.desc()).- Specified by:
orderByProcessDefinitionCategoryin interfaceProcessDefinitionQuery
-
orderByProcessDefinitionId
Description copied from interface:ProcessDefinitionQueryOrder by the id of the process definitions (needs to be followed byQuery.asc()orQuery.desc()).- Specified by:
orderByProcessDefinitionIdin interfaceProcessDefinitionQuery
-
orderByProcessDefinitionVersion
Description copied from interface:ProcessDefinitionQueryOrder by the version of the process definitions (needs to be followed byQuery.asc()orQuery.desc()).- Specified by:
orderByProcessDefinitionVersionin interfaceProcessDefinitionQuery
-
orderByProcessDefinitionName
Description copied from interface:ProcessDefinitionQueryOrder by the name of the process definitions (needs to be followed byQuery.asc()orQuery.desc()).- Specified by:
orderByProcessDefinitionNamein interfaceProcessDefinitionQuery
-
orderByTenantId
Description copied from interface:ProcessDefinitionQueryOrder by tenant id (needs to be followed byQuery.asc()orQuery.desc()). Note that the ordering of process instances without tenant id is database-specific.- Specified by:
orderByTenantIdin interfaceProcessDefinitionQuery
-
orderByVersionTag
Description copied from interface:ProcessDefinitionQueryOrder by version tag (needs to be followed byQuery.asc()orQuery.desc()). Note: sorting by versionTag is a string based sort. There is no interpretation of the version which can lead to a sorting like: v0.1.0 v0.10.0 v0.2.0.- Specified by:
orderByVersionTagin interfaceProcessDefinitionQuery
-
startableByUser
Description copied from interface:ProcessDefinitionQueryOnly selects process definitions which given userId is authorized to start- Specified by:
startableByUserin interfaceProcessDefinitionQuery
-
hasExcludingConditions
protected boolean hasExcludingConditions()Description copied from class:AbstractQueryWhether 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:
hasExcludingConditionsin classAbstractQuery<ProcessDefinitionQuery,ProcessDefinition> - Returns:
trueif the query does have excluding conditions,falseotherwise
-
executeCount
- Specified by:
executeCountin classAbstractQuery<ProcessDefinitionQuery,ProcessDefinition>
-
executeList
Description copied from class:AbstractQueryExecutes the actual query to retrieve the list of results.- Specified by:
executeListin classAbstractQuery<ProcessDefinitionQuery,ProcessDefinition> page- used if the results must be paged. If null, no paging will be applied.
-
addProcessDefinitionToCacheAndRetrieveDocumentation
-
checkQueryOk
public void checkQueryOk()- Overrides:
checkQueryOkin classAbstractQuery<ProcessDefinitionQuery,ProcessDefinition>
-
getDeploymentId
-
getDeployedAfter
-
getDeployedAt
-
getId
-
getIds
-
getName
-
getNameLike
-
getKey
-
getKeyLike
-
getVersion
-
isLatest
public boolean isLatest() -
getCategory
-
getCategoryLike
-
getResourceName
-
getResourceNameLike
-
getSuspensionState
-
setSuspensionState
-
getIncidentId
-
getIncidentType
-
getIncidentMessage
-
getIncidentMessageLike
-
getVersionTag
-
isStartableInTasklist
public boolean isStartableInTasklist() -
isNotStartableInTasklist
public boolean isNotStartableInTasklist() -
isStartablePermissionCheck
public boolean isStartablePermissionCheck() -
setProcessDefinitionCreatePermissionChecks
public void setProcessDefinitionCreatePermissionChecks(List<PermissionCheck> processDefinitionCreatePermissionChecks) -
getProcessDefinitionCreatePermissionChecks
-
isShouldJoinDeploymentTable
public boolean isShouldJoinDeploymentTable() -
addProcessDefinitionCreatePermissionCheck
public void addProcessDefinitionCreatePermissionCheck(CompositePermissionCheck processDefinitionCreatePermissionCheck) -
getCandidateGroups
-