Interface SpacePermissionQueryBuilder
-
- All Known Implementing Classes:
SpacePermissionQueryBuilderImpl
@Internal public interface SpacePermissionQueryBuilderA centralised place for construction of database query conditions to filter or join on the "spacepermissions" table. This could be extended to support query languages other than HQL in future.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description StringgetHqlPermissionFilterString(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.default StringgetPermissionType()@Nullable ConfluenceUsergetUser()Returns the user this query builder was constructed for.voidsubstituteHqlQueryParameters(org.hibernate.query.Query query)Substitutes values into the parameters added bygetHqlPermissionFilterString(java.lang.String)
-
-
-
Method Detail
-
getHqlPermissionFilterString
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. Note:substituteHqlQueryParameters(org.hibernate.query.Query)MUST be called subsequently, to substitute in the required parameters.- 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
void substituteHqlQueryParameters(org.hibernate.query.Query query)
Substitutes values into the parameters added bygetHqlPermissionFilterString(java.lang.String)- Parameters:
query- the full HQL query, containing the contents of a previous call togetHqlPermissionFilterString(java.lang.String)(as well as other SQL clauses added elsewhere)
-
getUser
@Nullable ConfluenceUser getUser()
Returns the user this query builder was constructed for. Will benullfor anonymous.
-
getPermissionType
default String getPermissionType()
- Returns:
- permission type
- Since:
- 7.11.0
-
-