Package org.camunda.bpm.engine.impl
Class AuthorizationQueryImpl
- java.lang.Object
- 
- org.camunda.bpm.engine.impl.db.ListQueryParameterObject
- 
- org.camunda.bpm.engine.impl.AbstractQuery<AuthorizationQuery,Authorization>
- 
- org.camunda.bpm.engine.impl.AuthorizationQueryImpl
 
 
 
- 
- All Implemented Interfaces:
- java.io.Serializable,- AuthorizationQuery,- Command<java.lang.Object>,- Query<AuthorizationQuery,Authorization>
 
 public class AuthorizationQueryImpl extends AbstractQuery<AuthorizationQuery,Authorization> implements AuthorizationQuery - Author:
- Daniel Meyer
- See Also:
- Serialized Form
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class org.camunda.bpm.engine.impl.AbstractQueryAbstractQuery.ResultType
 
- 
 - 
Field SummaryFields Modifier and Type Field Description protected java.lang.IntegerauthorizationTypeprotected java.lang.String[]groupIdsprotected java.lang.Stringidprotected intpermissionprotected booleanqueryByPermissionprotected booleanqueryByResourceTypeprotected java.lang.StringresourceIdprotected intresourceTypeprotected java.lang.String[]userIds- 
Fields inherited from class org.camunda.bpm.engine.impl.AbstractQuerycommandExecutor, expressions, maxResultsLimitEnabled, resultType, SORTORDER_ASC, SORTORDER_DESC, validators
 - 
Fields inherited from class org.camunda.bpm.engine.impl.db.ListQueryParameterObjectauthCheck, databaseType, firstResult, maxResults, orderingProperties, parameter, tenantCheck
 
- 
 - 
Constructor SummaryConstructors Constructor Description AuthorizationQueryImpl()AuthorizationQueryImpl(CommandExecutor commandExecutor)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description AuthorizationQueryauthorizationId(java.lang.String id)only selects authorizations for the given idAuthorizationQueryauthorizationType(java.lang.Integer type)only selects authorizations for the given type.longexecuteCount(CommandContext commandContext)java.util.List<Authorization>executeList(CommandContext commandContext, Page page)Executes the actual query to retrieve the list of results.java.lang.String[]getGroupIds()java.lang.StringgetId()intgetPermission()java.lang.StringgetResourceId()java.util.Set<Resource>getResourcesIntersection()intgetResourceType()java.lang.String[]getUserIds()AuthorizationQuerygroupIdIn(java.lang.String... groupIdIn)only selects authorizations for the given group idsprotected booleanhasExcludingConditions()Whether or not the query has excluding conditions.AuthorizationQueryhasPermission(Permission p)only selects authorizations which grant the permissions represented by the parameter.booleanisQueryByPermission()booleanisQueryByResourceType()AuthorizationQueryorderByResourceId()Order by resource id (needs to be followed byQuery.asc()orQuery.desc()).AuthorizationQueryorderByResourceType()Order by resource type (needs to be followed byQuery.asc()orQuery.desc()).AuthorizationQueryresourceId(java.lang.String resourceId)only selects authorizations for the given resource idAuthorizationQueryresourceType(int resourceType)only selects authorizations for the given resource typeAuthorizationQueryresourceType(Resource resource)only selects authorizations for the given resource typeAuthorizationQueryuserIdIn(java.lang.String... userIdIn)only selects authorizations for the given user ids- 
Methods inherited from class org.camunda.bpm.engine.impl.AbstractQueryaddExpression, addValidator, asc, checkMaxResultsLimit, checkQueryOk, 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.ListQueryParameterObjectgetAuthCheck, getDatabaseType, getFirstResult, getFirstRow, getLastRow, getMaxResults, getOrderingProperties, getParameter, getTenantCheck, setAuthCheck, setDatabaseType, setFirstResult, setMaxResults, setOrderingProperties, setParameter, setTenantCheck
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.camunda.bpm.engine.impl.interceptor.CommandisRetryable
 - 
Methods inherited from interface org.camunda.bpm.engine.query.Queryasc, count, desc, list, listPage, singleResult, unlimitedList
 
- 
 
- 
- 
- 
Field Detail- 
idprotected java.lang.String id 
 - 
userIdsprotected java.lang.String[] userIds 
 - 
groupIdsprotected java.lang.String[] groupIds 
 - 
resourceTypeprotected int resourceType 
 - 
resourceIdprotected java.lang.String resourceId 
 - 
permissionprotected int permission 
 - 
authorizationTypeprotected java.lang.Integer authorizationType 
 - 
queryByPermissionprotected boolean queryByPermission 
 - 
queryByResourceTypeprotected boolean queryByResourceType 
 
- 
 - 
Constructor Detail- 
AuthorizationQueryImplpublic AuthorizationQueryImpl() 
 - 
AuthorizationQueryImplpublic AuthorizationQueryImpl(CommandExecutor commandExecutor) 
 
- 
 - 
Method Detail- 
authorizationIdpublic AuthorizationQuery authorizationId(java.lang.String id) Description copied from interface:AuthorizationQueryonly selects authorizations for the given id- Specified by:
- authorizationIdin interface- AuthorizationQuery
 
 - 
userIdInpublic AuthorizationQuery userIdIn(java.lang.String... userIdIn) Description copied from interface:AuthorizationQueryonly selects authorizations for the given user ids- Specified by:
- userIdInin interface- AuthorizationQuery
 
 - 
groupIdInpublic AuthorizationQuery groupIdIn(java.lang.String... groupIdIn) Description copied from interface:AuthorizationQueryonly selects authorizations for the given group ids- Specified by:
- groupIdInin interface- AuthorizationQuery
 
 - 
resourceTypepublic AuthorizationQuery resourceType(Resource resource) Description copied from interface:AuthorizationQueryonly selects authorizations for the given resource type- Specified by:
- resourceTypein interface- AuthorizationQuery
 
 - 
resourceTypepublic AuthorizationQuery resourceType(int resourceType) Description copied from interface:AuthorizationQueryonly selects authorizations for the given resource type- Specified by:
- resourceTypein interface- AuthorizationQuery
 
 - 
resourceIdpublic AuthorizationQuery resourceId(java.lang.String resourceId) Description copied from interface:AuthorizationQueryonly selects authorizations for the given resource id- Specified by:
- resourceIdin interface- AuthorizationQuery
 
 - 
hasPermissionpublic AuthorizationQuery hasPermission(Permission p) Description copied from interface:AuthorizationQueryonly selects authorizations which grant the permissions represented by the parameter. If this method is called multiple times, all passed-in permissions will be checked with AND semantics. Example:authorizationQuery.userId("user1") .resourceType("processDefinition") .resourceId("2313") .hasPermission(Permissions.READ) .hasPermission(Permissions.UPDATE) .hasPermission(Permissions.DELETE) .list();Selects all Authorization objects which provide READ,UPDATE,DELETE Permissions for the given user.- Specified by:
- hasPermissionin interface- AuthorizationQuery
 
 - 
authorizationTypepublic AuthorizationQuery authorizationType(java.lang.Integer type) Description copied from interface:AuthorizationQueryonly selects authorizations for the given type. Legal values:Authorization.AUTH_TYPE_GLOBAL,Authorization.AUTH_TYPE_GRANTAuthorization.AUTH_TYPE_REVOKE- Specified by:
- authorizationTypein interface- AuthorizationQuery
 
 - 
executeCountpublic long executeCount(CommandContext commandContext) - Specified by:
- executeCountin class- AbstractQuery<AuthorizationQuery,Authorization>
 
 - 
executeListpublic java.util.List<Authorization> executeList(CommandContext commandContext, Page page) Description copied from class:AbstractQueryExecutes the actual query to retrieve the list of results.- Specified by:
- executeListin class- AbstractQuery<AuthorizationQuery,Authorization>
- page- used if the results must be paged. If null, no paging will be applied.
 
 - 
hasExcludingConditionsprotected 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 class- AbstractQuery<AuthorizationQuery,Authorization>
- Returns:
- trueif the query does have excluding conditions,- falseotherwise
 
 - 
getIdpublic java.lang.String getId() 
 - 
isQueryByPermissionpublic boolean isQueryByPermission() 
 - 
getUserIdspublic java.lang.String[] getUserIds() 
 - 
getGroupIdspublic java.lang.String[] getGroupIds() 
 - 
getResourceTypepublic int getResourceType() 
 - 
getResourceIdpublic java.lang.String getResourceId() 
 - 
getPermissionpublic int getPermission() 
 - 
isQueryByResourceTypepublic boolean isQueryByResourceType() 
 - 
getResourcesIntersectionpublic java.util.Set<Resource> getResourcesIntersection() 
 - 
orderByResourceTypepublic AuthorizationQuery orderByResourceType() Description copied from interface:AuthorizationQueryOrder by resource type (needs to be followed byQuery.asc()orQuery.desc()).- Specified by:
- orderByResourceTypein interface- AuthorizationQuery
 
 - 
orderByResourceIdpublic AuthorizationQuery orderByResourceId() Description copied from interface:AuthorizationQueryOrder by resource id (needs to be followed byQuery.asc()orQuery.desc()).- Specified by:
- orderByResourceIdin interface- AuthorizationQuery
 
 
- 
 
-