public interface QueryBuilder<T>
Modifier and Type | Interface and Description |
---|---|
static class |
QueryBuilder.Direction
The sort order of the result set of a query.
|
Modifier and Type | Method and Description |
---|---|
T |
and(T condition1,
T condition2)
Return a condition which holds if both sub conditions hold.
|
T |
contains(java.lang.String relPath,
java.lang.String searchExpr)
Create a full text search condition.
|
T |
eq(java.lang.String relPath,
Value value)
Create a condition which holds if the node of an
Authorizable has a
property at relPath which is equal to value . |
T |
exists(java.lang.String relPath)
Create a condition which holds if the node of an
Authorizable has a
property at relPath . |
T |
ge(java.lang.String relPath,
Value value)
Create a condition which holds if the node of an
Authorizable has a
property at relPath which is greater than or equal to value . |
T |
gt(java.lang.String relPath,
Value value)
Create a condition which holds if the node of an
Authorizable has a
property at relPath which is greater than value . |
T |
impersonates(java.lang.String name)
Create a condition which holds for
Authorizable s which can impersonate as
name . |
T |
le(java.lang.String relPath,
Value value)
Create a condition which holds if the node of an
Authorizable has a
property at relPath which is smaller than or equal to value . |
T |
like(java.lang.String relPath,
java.lang.String pattern)
Create a condition which holds if the node of an
Authorizable has a
property at relPath which matches the pattern in pattern . |
T |
lt(java.lang.String relPath,
Value value)
Create a condition which holds if the node of an
Authorizable has a
property at relPath which is smaller than value . |
T |
nameMatches(java.lang.String pattern)
Create a condition which holds if the name of the
Authorizable
matches a pattern . |
T |
neq(java.lang.String relPath,
Value value)
Create a condition which holds if the node of an
Authorizable has a
property at relPath which is not equal to value . |
T |
not(T condition)
Return a condition which holds if
condition does not hold. |
T |
or(T condition1,
T condition2)
Return a condition which holds if any of the two sub conditions hold.
|
void |
setCondition(T condition)
Set the condition for the query.
|
void |
setLimit(Value bound,
long maxCount)
Set limits for the query.
|
void |
setScope(java.lang.String groupName,
boolean declaredOnly)
Set the scope for the query.
|
void |
setSelector(java.lang.Class<? extends Authorizable> selector)
Set the selector for the query.
|
void |
setSortOrder(java.lang.String propertyName,
QueryBuilder.Direction direction)
Set the sort order of the
Authorizable s returned by the query. |
void |
setSortOrder(java.lang.String propertyName,
QueryBuilder.Direction direction,
boolean ignoreCase)
Set the sort order of the
Authorizable s returned by the query. |
void setSelector(java.lang.Class<? extends Authorizable> selector)
Authorizable
s or just User
s respectively Group
s.selector
- The selector for the queryvoid setScope(java.lang.String groupName, boolean declaredOnly)
groupName
- Name of the group to restrict the query to.declaredOnly
- If true
only declared members of the groups are returned.
Otherwise indirect memberships are also considered.void setCondition(T condition)
Authorizable
s
for which this condition holds.condition
- Condition upon which Authorizables
are included in the query resultvoid setSortOrder(java.lang.String propertyName, QueryBuilder.Direction direction, boolean ignoreCase)
Authorizable
s returned by the query.
The format of the propertyName
is the same as in XPath:
@propertyName
sorts on a property of the current node.
relative/path/@propertyName
sorts on a property of a
descendant node.propertyName
- The name of the property to sort ondirection
- Direction to sort. Either QueryBuilder.Direction.ASCENDING
or QueryBuilder.Direction.DESCENDING
ignoreCase
- Ignore character case in sort if true
. Note: For false
sorting is done lexicographically even for non string properties.void setSortOrder(java.lang.String propertyName, QueryBuilder.Direction direction)
Authorizable
s returned by the query.
The format of the propertyName
is the same as in XPath:
@propertyName
sorts on a property of the current node.
relative/path/@propertyName
sorts on a property of a
descendant node. Character case is taken into account for the sort order.propertyName
- The name of the property to sort ondirection
- Direction to sort. Either QueryBuilder.Direction.ASCENDING
or QueryBuilder.Direction.DESCENDING
void setLimit(Value bound, long maxCount)
sort order
property. The
query returns at most maxCount
Authorizable
s whose
values of the sort order property follow bound
in the sort
direction. This method has no effect if the sort order is not specified.bound
- Bound from where to start returning results. null
for no boundmaxCount
- Maximal number of results to return. -1 for no limit.T nameMatches(java.lang.String pattern)
Authorizable
matches a pattern
.
The percent character "%" represents any string of zero or more characters and the
underscore character "_" represents any single character. Any literal use of these characters
and the backslash character "\" must be escaped with a backslash character.
The pattern is matched against the id
and the
principal
.pattern
- Pattern to match the name of an authorizable.T neq(java.lang.String relPath, Value value)
Authorizable
has a
property at relPath
which is not equal to value
.
The format of the relPath
argument is the same as in XPath:
@attributeName
for an attribute on this node and
relative/path/@attributeName
for an attribute of a descendant node.relPath
- Relative path from the authorizable's node to the propertyvalue
- Value to compare the property at relPath
toT eq(java.lang.String relPath, Value value)
Authorizable
has a
property at relPath
which is equal to value
.
The format of the relPath
argument is the same as in XPath:
@attributeName
for an attribute on this node and
relative/path/@attributeName
for an attribute of a descendant node.relPath
- Relative path from the authorizable's node to the propertyvalue
- Value to compare the property at relPath
toT lt(java.lang.String relPath, Value value)
Authorizable
has a
property at relPath
which is smaller than value
.
The format of the relPath
argument is the same as in XPath:
@attributeName
for an attribute on this node and
relative/path/@attributeName
for an attribute of a descendant node.relPath
- Relative path from the authorizable's node to the propertyvalue
- Value to compare the property at relPath
toT le(java.lang.String relPath, Value value)
Authorizable
has a
property at relPath
which is smaller than or equal to value
.
The format of the relPath
argument is the same as in XPath:
@attributeName
for an attribute on this node and
relative/path/@attributeName
for an attribute of a descendant node.relPath
- Relative path from the authorizable's node to the propertyvalue
- Value to compare the property at relPath
toT gt(java.lang.String relPath, Value value)
Authorizable
has a
property at relPath
which is greater than value
.
The format of the relPath
argument is the same as in XPath:
@attributeName
for an attribute on this node and
relative/path/@attributeName
for an attribute of a descendant node.relPath
- Relative path from the authorizable's node to the propertyvalue
- Value to compare the property at relPath
toT ge(java.lang.String relPath, Value value)
Authorizable
has a
property at relPath
which is greater than or equal to value
.
The format of the relPath
argument is the same as in XPath:
@attributeName
for an attribute on this node and
relative/path/@attributeName
for an attribute of a descendant node.relPath
- Relative path from the authorizable's node to the propertyvalue
- Value to compare the property at relPath
toT exists(java.lang.String relPath)
Authorizable
has a
property at relPath
.
The format of the relPath
argument is the same as in XPath:
@attributeName
for an attribute on this node and
relative/path/@attributeName
for an attribute of a descendant node.relPath
- Relative path from the authorizable's node to the propertyT like(java.lang.String relPath, java.lang.String pattern)
Authorizable
has a
property at relPath
which matches the pattern in pattern
.
The percent character "%" represents any string of zero or more characters and the
underscore character "_" represents any single character. Any literal use of these characters
and the backslash character "\" must be escaped with a backslash character.
The format of the relPath
argument is the same as in XPath:
@attributeName
for an attribute on this node and
relative/path/@attributeName
for an attribute of a descendant node.relPath
- Relative path from the authorizable's node to the propertypattern
- Pattern to match the property at relPath
againstT contains(java.lang.String relPath, java.lang.String searchExpr)
Authorizable
has a property at relPath
for which
searchExpr
yields results.
The format of the relPath
argument is the same as in XPath:
.
searches all properties of the current node, @attributeName
searches the attributeName property of the current node, relative/path/.
searches all properties of the descendant node at relative/path and
relative/path/@attributeName
searches the attributeName property
of the descendant node at relative/path.
The syntax of searchExpr
is [-]value { [OR] [-]value }.
relPath
- Relative path from the authorizable's node to the propertysearchExpr
- A full text search expressionT impersonates(java.lang.String name)
Authorizable
s which can impersonate as
name
.name
- Name of an authorizableT not(T condition)
condition
does not hold.condition
- Condition to negateT and(T condition1, T condition2)
condition1
- first sub conditioncondition2
- second sub condition"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"