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
Modifier and TypeFieldDescriptionprotected String
protected String
protected String
protected Date
protected Date
protected String
protected String
protected String
protected String
protected String[]
protected String
protected String
protected String
protected String
protected boolean
protected boolean
protected boolean
protected boolean
protected boolean
protected String
protected String
protected String[]
protected boolean
protected String
protected String
protected String
protected List<PermissionCheck>
protected String
protected String
protected boolean
protected SuspensionState
protected String[]
protected Integer
protected String
protected String
Fields inherited from class org.camunda.bpm.engine.impl.AbstractQuery
commandExecutor, expressions, maxResultsLimitEnabled, resultType, SORTORDER_ASC, SORTORDER_DESC, validators
Fields inherited from class org.camunda.bpm.engine.impl.db.ListQueryParameterObject
authCheck, databaseType, firstResult, maxResults, orderingProperties, parameter, tenantCheck
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionactive()
Only selects process definitions which are activevoid
addProcessDefinitionCreatePermissionCheck
(CompositePermissionCheck processDefinitionCreatePermissionCheck) protected void
void
deployedAfter
(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) long
executeCount
(CommandContext commandContext) executeList
(CommandContext commandContext, Page page) Executes the actual query to retrieve the list of results.getId()
String[]
getIds()
getKey()
getName()
protected boolean
Whether 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.boolean
isLatest()
boolean
boolean
boolean
boolean
Only 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 definiton with the given id.processDefinitionIdIn
(String... ids) Only select process definiton with the given id.Only select process definition with the given key.processDefinitionKeyLike
(String keyLike) Only select process definitions where the key matches the given parameter.processDefinitionKeysIn
(String... keys) Only select process definitions with the given keysprocessDefinitionName
(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.void
setProcessDefinitionCreatePermissionChecks
(List<PermissionCheck> processDefinitionCreatePermissionChecks) void
setSuspensionState
(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, validate
Methods 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, 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.impl.interceptor.Command
isRetryable
Methods 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:ProcessDefinitionQuery
Only select process definiton with the given id.- Specified by:
processDefinitionId
in interfaceProcessDefinitionQuery
-
processDefinitionIdIn
Description copied from interface:ProcessDefinitionQuery
Only select process definiton with the given id.- Specified by:
processDefinitionIdIn
in interfaceProcessDefinitionQuery
-
processDefinitionCategory
Description copied from interface:ProcessDefinitionQuery
Only select process definitions with the given category.- Specified by:
processDefinitionCategory
in interfaceProcessDefinitionQuery
-
processDefinitionCategoryLike
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 interfaceProcessDefinitionQuery
-
processDefinitionName
Description copied from interface:ProcessDefinitionQuery
Only select process definitions with the given name.- Specified by:
processDefinitionName
in interfaceProcessDefinitionQuery
-
processDefinitionNameLike
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 interfaceProcessDefinitionQuery
-
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 interfaceProcessDefinitionQuery
-
deployedAfter
Description copied from interface:ProcessDefinitionQuery
Only select process definitions that were deployed after the given Date (exclusive).- Specified by:
deployedAfter
in interfaceProcessDefinitionQuery
-
deployedAt
Description copied from interface:ProcessDefinitionQuery
Only select process definitions that were deployed at the given Date.- Specified by:
deployedAt
in interfaceProcessDefinitionQuery
-
processDefinitionKey
Description copied from interface:ProcessDefinitionQuery
Only select process definition with the given key.- Specified by:
processDefinitionKey
in interfaceProcessDefinitionQuery
-
processDefinitionKeysIn
Description copied from interface:ProcessDefinitionQuery
Only select process definitions with the given keys- Specified by:
processDefinitionKeysIn
in interfaceProcessDefinitionQuery
-
processDefinitionKeyLike
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 interfaceProcessDefinitionQuery
-
processDefinitionResourceName
Description copied from interface:ProcessDefinitionQuery
Only select process definition with the given resource name.- Specified by:
processDefinitionResourceName
in interfaceProcessDefinitionQuery
-
processDefinitionResourceNameLike
Description copied from interface:ProcessDefinitionQuery
Only select process definition with a resource name like the given .- Specified by:
processDefinitionResourceNameLike
in interfaceProcessDefinitionQuery
-
processDefinitionVersion
Description copied from interface:ProcessDefinitionQuery
Only select process definition with a certain version. Particulary useful when used in combination withProcessDefinitionQuery.processDefinitionKey(String)
- Specified by:
processDefinitionVersion
in interfaceProcessDefinitionQuery
-
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 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:
latestVersion
in interfaceProcessDefinitionQuery
-
active
Description copied from interface:ProcessDefinitionQuery
Only selects process definitions which are active- Specified by:
active
in interfaceProcessDefinitionQuery
-
suspended
Description copied from interface:ProcessDefinitionQuery
Only selects process definitions which are suspended- Specified by:
suspended
in interfaceProcessDefinitionQuery
-
messageEventSubscription
- Specified by:
messageEventSubscription
in interfaceProcessDefinitionQuery
- See Also:
-
messageEventSubscriptionName
Description copied from interface:ProcessDefinitionQuery
Selects the single process definition which has a start message event with the messageName.- Specified by:
messageEventSubscriptionName
in interfaceProcessDefinitionQuery
-
processDefinitionStarter
-
eventSubscription
-
incidentType
Description copied from interface:ProcessDefinitionQuery
Only selects process definitions with the given incident type.- Specified by:
incidentType
in interfaceProcessDefinitionQuery
-
incidentId
Description copied from interface:ProcessDefinitionQuery
Only selects process definitions with the given incident id.- Specified by:
incidentId
in interfaceProcessDefinitionQuery
-
incidentMessage
Description copied from interface:ProcessDefinitionQuery
Only selects process definitions with the given incident message.- Specified by:
incidentMessage
in interfaceProcessDefinitionQuery
-
incidentMessageLike
Description copied from interface:ProcessDefinitionQuery
Only selects process definitions with an incident message like the given.- Specified by:
incidentMessageLike
in interfaceProcessDefinitionQuery
-
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 classAbstractQuery<ProcessDefinitionQuery,
ProcessDefinition> - Returns:
true
if the query does have excluding conditions,false
otherwise
-
tenantIdIn
Description copied from interface:ProcessDefinitionQuery
Only select process definitions with one of the given tenant ids.- Specified by:
tenantIdIn
in interfaceProcessDefinitionQuery
-
withoutTenantId
Description copied from interface:ProcessDefinitionQuery
Only select process definitions which have no tenant id.- Specified by:
withoutTenantId
in interfaceProcessDefinitionQuery
-
includeProcessDefinitionsWithoutTenantId
Description copied from interface:ProcessDefinitionQuery
Select process definitions which have no tenant id. Can be used in combination withProcessDefinitionQuery.tenantIdIn(String...)
.- Specified by:
includeProcessDefinitionsWithoutTenantId
in interfaceProcessDefinitionQuery
-
versionTag
Description copied from interface:ProcessDefinitionQuery
Only selects process definitions with a specific version tag- Specified by:
versionTag
in interfaceProcessDefinitionQuery
-
versionTagLike
Description copied from interface:ProcessDefinitionQuery
Only selects process definitions with a version tag like the given- Specified by:
versionTagLike
in interfaceProcessDefinitionQuery
-
withoutVersionTag
Description copied from interface:ProcessDefinitionQuery
Only selects process definitions without a version tag- Specified by:
withoutVersionTag
in interfaceProcessDefinitionQuery
-
startableInTasklist
Description copied from interface:ProcessDefinitionQuery
Select process definitions which could be started in Tasklist.- Specified by:
startableInTasklist
in interfaceProcessDefinitionQuery
-
notStartableInTasklist
Description copied from interface:ProcessDefinitionQuery
Select process definitions which could not be started in Tasklist.- Specified by:
notStartableInTasklist
in interfaceProcessDefinitionQuery
-
startablePermissionCheck
- Specified by:
startablePermissionCheck
in interfaceProcessDefinitionQuery
-
orderByDeploymentId
Description copied from interface:ProcessDefinitionQuery
Order by deployment id (needs to be followed byQuery.asc()
orQuery.desc()
).- Specified by:
orderByDeploymentId
in interfaceProcessDefinitionQuery
-
orderByDeploymentTime
Description copied from interface:ProcessDefinitionQuery
Order by deployment time (needs to be followed byQuery.asc()
orQuery.desc()
).- Specified by:
orderByDeploymentTime
in interfaceProcessDefinitionQuery
-
orderByProcessDefinitionKey
Description copied from interface:ProcessDefinitionQuery
Order by process definition key (needs to be followed byQuery.asc()
orQuery.desc()
).- Specified by:
orderByProcessDefinitionKey
in interfaceProcessDefinitionQuery
-
orderByProcessDefinitionCategory
Description copied from interface:ProcessDefinitionQuery
Order by the category of the process definitions (needs to be followed byQuery.asc()
orQuery.desc()
).- Specified by:
orderByProcessDefinitionCategory
in interfaceProcessDefinitionQuery
-
orderByProcessDefinitionId
Description copied from interface:ProcessDefinitionQuery
Order by the id of the process definitions (needs to be followed byQuery.asc()
orQuery.desc()
).- Specified by:
orderByProcessDefinitionId
in interfaceProcessDefinitionQuery
-
orderByProcessDefinitionVersion
Description copied from interface:ProcessDefinitionQuery
Order by the version of the process definitions (needs to be followed byQuery.asc()
orQuery.desc()
).- Specified by:
orderByProcessDefinitionVersion
in interfaceProcessDefinitionQuery
-
orderByProcessDefinitionName
Description copied from interface:ProcessDefinitionQuery
Order by the name of the process definitions (needs to be followed byQuery.asc()
orQuery.desc()
).- Specified by:
orderByProcessDefinitionName
in interfaceProcessDefinitionQuery
-
orderByTenantId
Description copied from interface:ProcessDefinitionQuery
Order 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:
orderByTenantId
in interfaceProcessDefinitionQuery
-
orderByVersionTag
Description copied from interface:ProcessDefinitionQuery
Order 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:
orderByVersionTag
in interfaceProcessDefinitionQuery
-
executeCount
- Specified by:
executeCount
in classAbstractQuery<ProcessDefinitionQuery,
ProcessDefinition>
-
executeList
Description copied from class:AbstractQuery
Executes the actual query to retrieve the list of results.- Specified by:
executeList
in classAbstractQuery<ProcessDefinitionQuery,
ProcessDefinition> page
- used if the results must be paged. If null, no paging will be applied.
-
addProcessDefinitionToCacheAndRetrieveDocumentation
-
checkQueryOk
public void checkQueryOk()- Overrides:
checkQueryOk
in 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
-
startableByUser
Description copied from interface:ProcessDefinitionQuery
Only selects process definitions which given userId is authorized to start- Specified by:
startableByUser
in interfaceProcessDefinitionQuery
-