Class SpacePermissionQueryBuilderImpl
- java.lang.Object
-
- com.atlassian.confluence.impl.security.query.SpacePermissionQueryBuilderImpl
-
- All Implemented Interfaces:
SpacePermissionQueryBuilder
@Internal public class SpacePermissionQueryBuilderImpl extends Object implements SpacePermissionQueryBuilder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getHqlPermissionFilterString(String spacePermissionTableAlias)
Creates an HQL string of conditions / filter to add to the "WHERE" clause of an HQL query, filtering down to SpacePermission rows which match / grant access to the user.String
getPermissionType()
@Nullable ConfluenceUser
getUser()
Returns the user this query builder was constructed for.void
substituteHqlQueryParameters(org.hibernate.query.Query query)
Substitutes values into the parameters added bySpacePermissionQueryBuilder.getHqlPermissionFilterString(java.lang.String)
-
-
-
Method Detail
-
getHqlPermissionFilterString
public String getHqlPermissionFilterString(String spacePermissionTableAlias)
Description copied from interface:SpacePermissionQueryBuilder
Creates an HQL string of conditions / filter to add to the "WHERE" clause of an HQL query, filtering down to SpacePermission rows which match / grant access to the user. Note:SpacePermissionQueryBuilder.substituteHqlQueryParameters(org.hibernate.query.Query)
MUST be called subsequently, to substitute in the required parameters.- Specified by:
getHqlPermissionFilterString
in interfaceSpacePermissionQueryBuilder
- Parameters:
spacePermissionTableAlias
- alias of the SpacePermission table being queried- Returns:
- an HQL string of conditions, to be appended as part of the "WHERE" clause
-
substituteHqlQueryParameters
public void substituteHqlQueryParameters(org.hibernate.query.Query query)
Description copied from interface:SpacePermissionQueryBuilder
Substitutes values into the parameters added bySpacePermissionQueryBuilder.getHqlPermissionFilterString(java.lang.String)
- Specified by:
substituteHqlQueryParameters
in interfaceSpacePermissionQueryBuilder
- Parameters:
query
- the full HQL query, containing the contents of a previous call toSpacePermissionQueryBuilder.getHqlPermissionFilterString(java.lang.String)
(as well as other SQL clauses added elsewhere)
-
getUser
public @Nullable ConfluenceUser getUser()
Description copied from interface:SpacePermissionQueryBuilder
Returns the user this query builder was constructed for. Will benull
for anonymous.- Specified by:
getUser
in interfaceSpacePermissionQueryBuilder
-
getPermissionType
public String getPermissionType()
- Specified by:
getPermissionType
in interfaceSpacePermissionQueryBuilder
- Returns:
- permission type
-
-