org.camunda.bpm.engine.impl.cmmn.entity.repository
Class CaseDefinitionQueryImpl

java.lang.Object
  extended by org.camunda.bpm.engine.impl.db.ListQueryParameterObject
      extended by org.camunda.bpm.engine.impl.AbstractQuery<CaseDefinitionQuery,CaseDefinition>
          extended by org.camunda.bpm.engine.impl.cmmn.entity.repository.CaseDefinitionQueryImpl
All Implemented Interfaces:
Serializable, Command<Object>, Query<CaseDefinitionQuery,CaseDefinition>, CaseDefinitionQuery

public class CaseDefinitionQueryImpl
extends AbstractQuery<CaseDefinitionQuery,CaseDefinition>
implements CaseDefinitionQuery

Author:
Roman Smirnov
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.camunda.bpm.engine.impl.AbstractQuery
AbstractQuery.ResultType
 
Field Summary
protected  String category
           
protected  String categoryLike
           
protected  String deploymentId
           
protected  String id
           
protected  String[] ids
           
protected  boolean includeDefinitionsWithoutTenantId
           
protected  boolean isTenantIdSet
           
protected  String key
           
protected  String keyLike
           
protected  boolean latest
           
protected  String name
           
protected  String nameLike
           
protected  String resourceName
           
protected  String resourceNameLike
           
protected  String[] tenantIds
           
protected  Integer version
           
 
Fields inherited from class org.camunda.bpm.engine.impl.AbstractQuery
commandExecutor, expressions, orderingProperties, resultType, SORTORDER_ASC, SORTORDER_DESC, validators
 
Fields inherited from class org.camunda.bpm.engine.impl.db.ListQueryParameterObject
authCheck, databaseType, DEFAULT_ORDER_BY, firstResult, maxResults, orderBy, parameter, tenantCheck
 
Constructor Summary
CaseDefinitionQueryImpl()
           
CaseDefinitionQueryImpl(CommandExecutor commandExecutor)
           
 
Method Summary
 CaseDefinitionQuery caseDefinitionCategory(String caseDefinitionCategory)
          Only select case definitions with the given category.
 CaseDefinitionQuery caseDefinitionCategoryLike(String caseDefinitionCategoryLike)
          Only select case definitions where the category matches the given parameter.
 CaseDefinitionQuery caseDefinitionId(String caseDefinitionId)
          Only select case definition with the given id.
 CaseDefinitionQuery caseDefinitionIdIn(String... ids)
          Only select case definitions with the given ids.
 CaseDefinitionQuery caseDefinitionKey(String caseDefinitionKey)
          Only select case definition with the given key.
 CaseDefinitionQuery caseDefinitionKeyLike(String caseDefinitionKeyLike)
          Only select case definitions where the key matches the given parameter.
 CaseDefinitionQuery caseDefinitionName(String caseDefinitionName)
          Only select case definitions with the given name.
 CaseDefinitionQuery caseDefinitionNameLike(String caseDefinitionNameLike)
          Only select case definitions where the name matches the given parameter.
 CaseDefinitionQuery caseDefinitionResourceName(String resourceName)
          Only select case definition with the given resource name.
 CaseDefinitionQuery caseDefinitionResourceNameLike(String resourceNameLike)
          Only select case definition with a resource name like the given.
 CaseDefinitionQuery caseDefinitionVersion(Integer caseDefinitionVersion)
          Only select case definition with a certain version.
 void checkQueryOk()
           
 CaseDefinitionQuery deploymentId(String deploymentId)
          Only select case definitions that are deployed in a deployment with the given deployment id.
 long executeCount(CommandContext commandContext)
           
 List<CaseDefinition> executeList(CommandContext commandContext, Page page)
          Executes the actual query to retrieve the list of results.
 String getCategory()
           
 String getCategoryLike()
           
 String getDeploymentId()
           
 String getId()
           
 String[] getIds()
           
 String getKey()
           
 String getKeyLike()
           
 String getName()
           
 String getNameLike()
           
 String getResourceName()
           
 String getResourceNameLike()
           
 Integer getVersion()
           
protected  boolean hasExcludingConditions()
          Whether or not the query has excluding conditions.
 CaseDefinitionQuery includeCaseDefinitionsWithoutTenantId()
          Select case definitions which have no tenant id.
 boolean isLatest()
           
 CaseDefinitionQuery latestVersion()
          Only select the case definitions which are the latest deployed (ie.
 CaseDefinitionQuery orderByCaseDefinitionCategory()
          Order by the category of the case definitions (needs to be followed by Query.asc() or Query.desc()).
 CaseDefinitionQuery orderByCaseDefinitionId()
          Order by the id of the case definitions (needs to be followed by Query.asc() or Query.desc()).
 CaseDefinitionQuery orderByCaseDefinitionKey()
          Order by case definition key (needs to be followed by Query.asc() or Query.desc()).
 CaseDefinitionQuery orderByCaseDefinitionName()
          Order by the name of the case definitions (needs to be followed by Query.asc() or Query.desc()).
 CaseDefinitionQuery orderByCaseDefinitionVersion()
          Order by the version of the case definitions (needs to be followed by Query.asc() or Query.desc()).
 CaseDefinitionQuery orderByDeploymentId()
          Order by deployment id (needs to be followed by Query.asc() or Query.desc()).
 CaseDefinitionQuery orderByTenantId()
          Order by tenant id (needs to be followed by Query.asc() or Query.desc()).
 CaseDefinitionQuery tenantIdIn(String... tenantIds)
          Only select case definitions with one of the given tenant ids.
 CaseDefinitionQuery withoutTenantId()
          Only select case definitions which have no tenant id.
 
Methods inherited from class org.camunda.bpm.engine.impl.AbstractQuery
addExpression, addValidator, asc, count, desc, direction, evaluateExpressions, evaluateExpressionsAndExecuteCount, evaluateExpressionsAndExecuteList, execute, executeSingleResult, extend, getExpressions, getMethod, getOrderBy, getOrderingProperties, list, listPage, mergeExpressions, mergeOrdering, orderBy, orderBy, removeValidator, setCommandExecutor, setExpressions, setOrderingProperties, singleResult, validate, validate
 
Methods inherited from class org.camunda.bpm.engine.impl.db.ListQueryParameterObject
getAuthCheck, getDatabaseType, getFirstResult, getFirstRow, getLastRow, getMaxResults, getParameter, getTenantCheck, setAuthCheck, setDatabaseType, setFirstResult, setMaxResults, setOrderBy, 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.query.Query
asc, count, desc, list, listPage, singleResult
 

Field Detail

id

protected String id

ids

protected String[] ids

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

isTenantIdSet

protected boolean isTenantIdSet

tenantIds

protected String[] tenantIds

includeDefinitionsWithoutTenantId

protected boolean includeDefinitionsWithoutTenantId
Constructor Detail

CaseDefinitionQueryImpl

public CaseDefinitionQueryImpl()

CaseDefinitionQueryImpl

public CaseDefinitionQueryImpl(CommandExecutor commandExecutor)
Method Detail

caseDefinitionId

public CaseDefinitionQuery caseDefinitionId(String caseDefinitionId)
Description copied from interface: CaseDefinitionQuery
Only select case definition with the given id.

Specified by:
caseDefinitionId in interface CaseDefinitionQuery
Parameters:
caseDefinitionId - the id of the case definition

caseDefinitionIdIn

public CaseDefinitionQuery caseDefinitionIdIn(String... ids)
Description copied from interface: CaseDefinitionQuery
Only select case definitions with the given ids.

Specified by:
caseDefinitionIdIn in interface CaseDefinitionQuery
Parameters:
ids - list of case definition ids

caseDefinitionCategory

public CaseDefinitionQuery caseDefinitionCategory(String caseDefinitionCategory)
Description copied from interface: CaseDefinitionQuery
Only select case definitions with the given category.

Specified by:
caseDefinitionCategory in interface CaseDefinitionQuery
Parameters:
caseDefinitionCategory - the category of the case definition

caseDefinitionCategoryLike

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

Specified by:
caseDefinitionCategoryLike in interface CaseDefinitionQuery
Parameters:
caseDefinitionCategoryLike - the pattern to match the case definition category

caseDefinitionName

public CaseDefinitionQuery caseDefinitionName(String caseDefinitionName)
Description copied from interface: CaseDefinitionQuery
Only select case definitions with the given name.

Specified by:
caseDefinitionName in interface CaseDefinitionQuery
Parameters:
caseDefinitionName - the name of the case definition

caseDefinitionNameLike

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

Specified by:
caseDefinitionNameLike in interface CaseDefinitionQuery
Parameters:
caseDefinitionNameLike - the pattern to match the case definition name

caseDefinitionKey

public CaseDefinitionQuery caseDefinitionKey(String caseDefinitionKey)
Description copied from interface: CaseDefinitionQuery
Only select case definition with the given key.

Specified by:
caseDefinitionKey in interface CaseDefinitionQuery
Parameters:
caseDefinitionKey - the key of the case definition

caseDefinitionKeyLike

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

Specified by:
caseDefinitionKeyLike in interface CaseDefinitionQuery
Parameters:
caseDefinitionKeyLike - the pattern to match the case definition key

deploymentId

public CaseDefinitionQuery deploymentId(String deploymentId)
Description copied from interface: CaseDefinitionQuery
Only select case definitions that are deployed in a deployment with the given deployment id.

Specified by:
deploymentId in interface CaseDefinitionQuery
Parameters:
deploymentId - the id of the deployment

caseDefinitionVersion

public CaseDefinitionQuery caseDefinitionVersion(Integer caseDefinitionVersion)
Description copied from interface: CaseDefinitionQuery
Only select case definition with a certain version. Particularly useful when used in combination with CaseDefinitionQuery.caseDefinitionKey(String)

Specified by:
caseDefinitionVersion in interface CaseDefinitionQuery
Parameters:
caseDefinitionVersion - the version of the case definition

latestVersion

public CaseDefinitionQuery latestVersion()
Description copied from interface: CaseDefinitionQuery
Only select the case definitions which are the latest deployed (ie. which have the highest version number for the given key). Can only be used in combination with CaseDefinitionQuery.caseDefinitionKey(String) or CaseDefinitionQuery.caseDefinitionKeyLike(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 case definitions.

Specified by:
latestVersion in interface CaseDefinitionQuery

caseDefinitionResourceName

public CaseDefinitionQuery caseDefinitionResourceName(String resourceName)
Description copied from interface: CaseDefinitionQuery
Only select case definition with the given resource name.

Specified by:
caseDefinitionResourceName in interface CaseDefinitionQuery
Parameters:
resourceName - the name of the resource

caseDefinitionResourceNameLike

public CaseDefinitionQuery caseDefinitionResourceNameLike(String resourceNameLike)
Description copied from interface: CaseDefinitionQuery
Only select case definition with a resource name like the given. The syntax that should be used is the same as in SQL, eg. %activiti%

Specified by:
caseDefinitionResourceNameLike in interface CaseDefinitionQuery
Parameters:
resourceNameLike - the pattern to match the resource name

tenantIdIn

public CaseDefinitionQuery tenantIdIn(String... tenantIds)
Description copied from interface: CaseDefinitionQuery
Only select case definitions with one of the given tenant ids.

Specified by:
tenantIdIn in interface CaseDefinitionQuery

withoutTenantId

public CaseDefinitionQuery withoutTenantId()
Description copied from interface: CaseDefinitionQuery
Only select case definitions which have no tenant id.

Specified by:
withoutTenantId in interface CaseDefinitionQuery

includeCaseDefinitionsWithoutTenantId

public CaseDefinitionQuery includeCaseDefinitionsWithoutTenantId()
Description copied from interface: CaseDefinitionQuery
Select case definitions which have no tenant id. Can be used in combination with CaseDefinitionQuery.tenantIdIn(String...).

Specified by:
includeCaseDefinitionsWithoutTenantId in interface CaseDefinitionQuery

orderByCaseDefinitionCategory

public CaseDefinitionQuery orderByCaseDefinitionCategory()
Description copied from interface: CaseDefinitionQuery
Order by the category of the case definitions (needs to be followed by Query.asc() or Query.desc()).

Specified by:
orderByCaseDefinitionCategory in interface CaseDefinitionQuery

orderByCaseDefinitionKey

public CaseDefinitionQuery orderByCaseDefinitionKey()
Description copied from interface: CaseDefinitionQuery
Order by case definition key (needs to be followed by Query.asc() or Query.desc()).

Specified by:
orderByCaseDefinitionKey in interface CaseDefinitionQuery

orderByCaseDefinitionId

public CaseDefinitionQuery orderByCaseDefinitionId()
Description copied from interface: CaseDefinitionQuery
Order by the id of the case definitions (needs to be followed by Query.asc() or Query.desc()).

Specified by:
orderByCaseDefinitionId in interface CaseDefinitionQuery

orderByCaseDefinitionVersion

public CaseDefinitionQuery orderByCaseDefinitionVersion()
Description copied from interface: CaseDefinitionQuery
Order by the version of the case definitions (needs to be followed by Query.asc() or Query.desc()).

Specified by:
orderByCaseDefinitionVersion in interface CaseDefinitionQuery

orderByCaseDefinitionName

public CaseDefinitionQuery orderByCaseDefinitionName()
Description copied from interface: CaseDefinitionQuery
Order by the name of the case definitions (needs to be followed by Query.asc() or Query.desc()).

Specified by:
orderByCaseDefinitionName in interface CaseDefinitionQuery

orderByDeploymentId

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

Specified by:
orderByDeploymentId in interface CaseDefinitionQuery

orderByTenantId

public CaseDefinitionQuery orderByTenantId()
Description copied from interface: CaseDefinitionQuery
Order by tenant id (needs to be followed by Query.asc() or Query.desc()). Note that the ordering of case instances without tenant id is database-specific.

Specified by:
orderByTenantId in interface CaseDefinitionQuery

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 class AbstractQuery<CaseDefinitionQuery,CaseDefinition>
Returns:
true if the query does have excluding conditions, false otherwise

executeCount

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

executeList

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

checkQueryOk

public void checkQueryOk()
Overrides:
checkQueryOk in class AbstractQuery<CaseDefinitionQuery,CaseDefinition>

getId

public String getId()

getIds

public String[] getIds()

getCategory

public String getCategory()

getCategoryLike

public String getCategoryLike()

getName

public String getName()

getNameLike

public String getNameLike()

getDeploymentId

public String getDeploymentId()

getKey

public String getKey()

getKeyLike

public String getKeyLike()

getResourceName

public String getResourceName()

getResourceNameLike

public String getResourceNameLike()

getVersion

public Integer getVersion()

isLatest

public boolean isLatest()


Copyright © 2016 camunda services GmbH. All rights reserved.