public abstract class QueryObjectModelFactoryImpl
extends java.lang.Object
QueryObjectModelFactoryImpl
implements the query object model
factory from JSR 283.Constructor and Description |
---|
QueryObjectModelFactoryImpl(NamePathResolver resolver) |
Modifier and Type | Method and Description |
---|---|
And |
and(Constraint constraint1,
Constraint constraint2)
Performs a logical conjunction of two other constraints.
|
Ordering |
ascending(DynamicOperand operand)
Orders by the value of the specified operand, in ascending order.
|
BindVariableValue |
bindVariable(java.lang.String bindVariableName)
Evaluates to the value of a bind variable.
|
ChildNode |
childNode(java.lang.String path)
Tests whether a node in the default selector is a child of a node
reachable by a specified absolute path.
|
ChildNode |
childNode(java.lang.String selectorName,
java.lang.String path)
Tests whether a node in the specified selector is a child of a node
reachable by a specified absolute path.
|
ChildNodeJoinCondition |
childNodeJoinCondition(java.lang.String childSelectorName,
java.lang.String parentSelectorName)
Tests whether a first selector's node is a child of a second selector's
node.
|
Column |
column(java.lang.String propertyName)
Identifies a property in the default selector to include in the tabular
view of query results.
|
Column |
column(java.lang.String propertyName,
java.lang.String columnName)
Identifies a property in the default selector to include in the tabular
view of query results.
|
Column |
column(java.lang.String selectorName,
java.lang.String propertyName,
java.lang.String columnName)
Identifies a property in the specified selector to include in the tabular
view of query results.
|
Comparison |
comparison(DynamicOperand left,
java.lang.String operatorName,
StaticOperand right)
Filters node-tuples based on the outcome of a binary operation.
|
QueryObjectModel |
createQuery(Selector selector,
Constraint constraint,
Ordering[] orderings,
Column[] columns)
Creates a query with one selector.
|
QueryObjectModel |
createQuery(Source source,
Constraint constraint,
Ordering[] orderings,
Column[] columns)
Creates a query with one or more selectors.
|
DescendantNode |
descendantNode(java.lang.String path)
Tests whether a node in the default selector is a descendant of a node
reachable by a specified absolute path.
|
DescendantNode |
descendantNode(java.lang.String selectorName,
java.lang.String path)
Tests whether a node in the specified selector is a descendant of a node
reachable by a specified absolute path.
|
DescendantNodeJoinCondition |
descendantNodeJoinCondition(java.lang.String descendantSelectorName,
java.lang.String ancestorSelectorName)
Tests whether a first selector's node is a descendant of a second
selector's node.
|
Ordering |
descending(DynamicOperand operand)
Orders by the value of the specified operand, in descending order.
|
EquiJoinCondition |
equiJoinCondition(java.lang.String selector1Name,
java.lang.String property1Name,
java.lang.String selector2Name,
java.lang.String property2Name)
Tests whether the value of a property in a first selector is equal to the
value of a property in a second selector.
|
FullTextSearch |
fullTextSearch(java.lang.String propertyName,
StaticOperand fullTextSearchExpression)
Performs a full-text search against the default selector.
|
FullTextSearch |
fullTextSearch(java.lang.String selectorName,
java.lang.String propertyName,
StaticOperand fullTextSearchExpression)
Performs a full-text search against the specified selector.
|
FullTextSearchScore |
fullTextSearchScore()
Evaluates to a
DOUBLE value equal to the full-text search
score of a node in the default selector. |
FullTextSearchScore |
fullTextSearchScore(java.lang.String selectorName)
Evaluates to a
DOUBLE value equal to the full-text search
score of a node in the specified selector. |
Join |
join(Source left,
Source right,
java.lang.String joinTypeName,
JoinCondition joinCondition)
Performs a join between two node-tuple sources.
|
Length |
length(PropertyValue propertyValue)
Evaluates to the length (or lengths, if multi-valued) of a property.
|
Literal |
literal(Value value)
Evaluates to a literal value.
|
LowerCase |
lowerCase(DynamicOperand operand)
Evaluates to the lower-case string value (or values, if multi-valued) of
an operand.
|
NodeLocalName |
nodeLocalName()
Evaluates to a
NAME value equal to the local (unprefixed)
name of a node in the default selector. |
NodeLocalName |
nodeLocalName(java.lang.String selectorName)
Evaluates to a
NAME value equal to the local (unprefixed)
name of a node in the specified selector. |
NodeName |
nodeName()
Evaluates to a
NAME value equal to the prefix-qualified name
of a node in the default selector. |
NodeName |
nodeName(java.lang.String selectorName)
Evaluates to a
NAME value equal to the prefix-qualified name
of a node in the specified selector. |
Not |
not(Constraint constraint)
Performs a logical negation of another constraint.
|
Or |
or(Constraint constraint1,
Constraint constraint2)
Performs a logical disjunction of two other constraints.
|
PropertyExistence |
propertyExistence(java.lang.String propertyName)
Tests the existence of a property in the default selector.
|
PropertyExistence |
propertyExistence(java.lang.String selectorName,
java.lang.String propertyName)
Tests the existence of a property in the specified selector.
|
PropertyValue |
propertyValue(java.lang.String propertyName)
Evaluates to the value (or values, if multi-valued) of a property of the
default selector.
|
PropertyValue |
propertyValue(java.lang.String selectorName,
java.lang.String propertyName)
Evaluates to the value (or values, if multi-valued) of a property in the
specified selector.
|
SameNode |
sameNode(java.lang.String path)
Tests whether a node in the default selector is reachable by a specified
absolute path.
|
SameNode |
sameNode(java.lang.String selectorName,
java.lang.String path)
Tests whether a node in the specified selector is reachable by a
specified absolute path.
|
SameNodeJoinCondition |
sameNodeJoinCondition(java.lang.String selector1Name,
java.lang.String selector2Name)
Tests whether a first selector's node is the same as a second selector's
node.
|
SameNodeJoinCondition |
sameNodeJoinCondition(java.lang.String selector1Name,
java.lang.String selector2Name,
java.lang.String selector2Path)
Tests whether a first selector's node is the same as a node identified by
relative path from a second selector's node.
|
Selector |
selector(java.lang.String nodeTypeName)
Selects a subset of the nodes in the repository based on node type.
|
Selector |
selector(java.lang.String nodeTypeName,
java.lang.String selectorName)
Selects a subset of the nodes in the repository based on node type.
|
UpperCase |
upperCase(DynamicOperand operand)
Evaluates to the upper-case string value (or values, if multi-valued) of
an operand.
|
public QueryObjectModelFactoryImpl(NamePathResolver resolver)
public QueryObjectModel createQuery(Selector selector, Constraint constraint, Ordering[] orderings, Column[] columns) throws InvalidQueryException, RepositoryException
The specified selector will be the default selector of the query.
selector
- the selector; non-nullconstraint
- the constraint, or null if noneorderings
- zero or more orderings; null is equivalent to a
zero-length arraycolumns
- the columns; null is equivalent to a zero-length arrayjavax.jcr.query.InvalidQueryException
- if the query is invalidjavax.jcr.RepositoryException
- if the operation otherwise failsInvalidQueryException
RepositoryException
public QueryObjectModel createQuery(Source source, Constraint constraint, Ordering[] orderings, Column[] columns) throws InvalidQueryException, RepositoryException
If source
is a selector, that selector is the default
selector of the query. Otherwise the query does not have a default
selector.
source
- the node-tuple source; non-nullconstraint
- the constraint, or null if noneorderings
- zero or more orderings; null is equivalent to a
zero-length arraycolumns
- the columns; null is equivalent to a zero-length arrayjavax.jcr.query.InvalidQueryException
- if the query is invalidjavax.jcr.RepositoryException
- if the operation otherwise failsInvalidQueryException
RepositoryException
public Selector selector(java.lang.String nodeTypeName) throws InvalidQueryException, RepositoryException
The selector name is the node type name.
nodeTypeName
- the name of the required node type; non-nulljavax.jcr.query.InvalidQueryException
- if the query is invalidjavax.jcr.RepositoryException
- if the operation otherwise failsInvalidQueryException
RepositoryException
public Selector selector(java.lang.String nodeTypeName, java.lang.String selectorName) throws InvalidQueryException, RepositoryException
nodeTypeName
- the name of the required node type; non-nullselectorName
- the selector name; non-nulljavax.jcr.query.InvalidQueryException
- if the query is invalidjavax.jcr.RepositoryException
- if the operation otherwise failsInvalidQueryException
RepositoryException
public Join join(Source left, Source right, java.lang.String joinTypeName, JoinCondition joinCondition) throws InvalidQueryException, RepositoryException
left
- the left node-tuple source; non-nullright
- the right node-tuple source; non-nulljoinTypeName
- either QueryObjectModelConstants#JCR_JOIN_TYPE_INNER
,QueryObjectModelConstants#JCR_JOIN_TYPE_LEFT_OUTER
,QueryObjectModelConstants#JCR_JOIN_TYPE_RIGHT_OUTER
joinCondition
- the join condition; non-nulljavax.jcr.query.InvalidQueryException
- if the query is invalidjavax.jcr.RepositoryException
- if the operation otherwise failsInvalidQueryException
RepositoryException
public EquiJoinCondition equiJoinCondition(java.lang.String selector1Name, java.lang.String property1Name, java.lang.String selector2Name, java.lang.String property2Name) throws InvalidQueryException, RepositoryException
selector1Name
- the name of the first selector; non-nullproperty1Name
- the property name in the first selector; non-nullselector2Name
- the name of the second selector; non-nullproperty2Name
- the property name in the second selector; non-nulljavax.jcr.query.InvalidQueryException
- if the query is invalidjavax.jcr.RepositoryException
- if the operation otherwise failsInvalidQueryException
RepositoryException
public SameNodeJoinCondition sameNodeJoinCondition(java.lang.String selector1Name, java.lang.String selector2Name) throws InvalidQueryException, RepositoryException
selector1Name
- the name of the first selector; non-nullselector2Name
- the name of the second selector; non-nulljavax.jcr.query.InvalidQueryException
- if the query is invalidjavax.jcr.RepositoryException
- if the operation otherwise failsInvalidQueryException
RepositoryException
public SameNodeJoinCondition sameNodeJoinCondition(java.lang.String selector1Name, java.lang.String selector2Name, java.lang.String selector2Path) throws InvalidQueryException, RepositoryException
selector1Name
- the name of the first selector; non-nullselector2Name
- the name of the second selector; non-nullselector2Path
- the path relative to the second selector; non-nulljavax.jcr.query.InvalidQueryException
- if the query is invalidjavax.jcr.RepositoryException
- if the operation otherwise failsInvalidQueryException
RepositoryException
public ChildNodeJoinCondition childNodeJoinCondition(java.lang.String childSelectorName, java.lang.String parentSelectorName) throws InvalidQueryException, RepositoryException
childSelectorName
- the name of the child selector; non-nullparentSelectorName
- the name of the parent selector; non-nulljavax.jcr.query.InvalidQueryException
- if the query is invalidjavax.jcr.RepositoryException
- if the operation otherwise failsInvalidQueryException
RepositoryException
public DescendantNodeJoinCondition descendantNodeJoinCondition(java.lang.String descendantSelectorName, java.lang.String ancestorSelectorName) throws InvalidQueryException, RepositoryException
descendantSelectorName
- the name of the descendant selector;
non-nullancestorSelectorName
- the name of the ancestor selector;
non-nulljavax.jcr.query.InvalidQueryException
- if the query is invalidjavax.jcr.RepositoryException
- if the operation otherwise failsInvalidQueryException
RepositoryException
public And and(Constraint constraint1, Constraint constraint2) throws InvalidQueryException, RepositoryException
constraint1
- the first constraint; non-nullconstraint2
- the second constraint; non-nullAnd
constraint; non-nulljavax.jcr.query.InvalidQueryException
- if the query is invalidjavax.jcr.RepositoryException
- if the operation otherwise failsInvalidQueryException
RepositoryException
public Or or(Constraint constraint1, Constraint constraint2) throws InvalidQueryException, RepositoryException
constraint1
- the first constraint; non-nullconstraint2
- the second constraint; non-nullOr
constraint; non-nulljavax.jcr.query.InvalidQueryException
- if the query is invalidjavax.jcr.RepositoryException
- if the operation otherwise failsInvalidQueryException
RepositoryException
public Not not(Constraint constraint) throws InvalidQueryException, RepositoryException
constraint
- the constraint to be negated; non-nullNot
constraint; non-nulljavax.jcr.query.InvalidQueryException
- if the query is invalidjavax.jcr.RepositoryException
- if the operation otherwise failsInvalidQueryException
RepositoryException
public Comparison comparison(DynamicOperand left, java.lang.String operatorName, StaticOperand right) throws InvalidQueryException, RepositoryException
left
- the first operand; non-nulloperatorName
- the operator; either #JCR_OPERATOR_EQUAL_TO
,#JCR_OPERATOR_NOT_EQUAL_TO
,#JCR_OPERATOR_LESS_THAN
,#JCR_OPERATOR_LESS_THAN_OR_EQUAL_TO
,#JCR_OPERATOR_GREATER_THAN
,#JCR_OPERATOR_GREATER_THAN_OR_EQUAL_TO
, or#JCR_OPERATOR_LIKE
right
- the second operand; non-nulljavax.jcr.query.InvalidQueryException
- if the query is invalidjavax.jcr.RepositoryException
- if the operation otherwise failsInvalidQueryException
RepositoryException
public PropertyExistence propertyExistence(java.lang.String propertyName) throws InvalidQueryException, RepositoryException
propertyName
- the property name; non-nulljavax.jcr.query.InvalidQueryException
- if the query has no default
selector or is otherwise invalidjavax.jcr.RepositoryException
- if the operation otherwise failsInvalidQueryException
RepositoryException
public PropertyExistence propertyExistence(java.lang.String selectorName, java.lang.String propertyName) throws InvalidQueryException, RepositoryException
selectorName
- the selector name; non-nullpropertyName
- the property name; non-nulljavax.jcr.query.InvalidQueryException
- if the query is invalidjavax.jcr.RepositoryException
- if the operation otherwise failsInvalidQueryException
RepositoryException
public FullTextSearch fullTextSearch(java.lang.String propertyName, StaticOperand fullTextSearchExpression) throws InvalidQueryException, RepositoryException
propertyName
- the property name, or null to search all
full-text indexed properties of the node
(or node subtree, in some implementations)fullTextSearchExpression
- the full-text search expression;
non-nulljavax.jcr.query.InvalidQueryException
- if the query has no default
selector or is otherwise invalidjavax.jcr.RepositoryException
- if the operation otherwise failsInvalidQueryException
RepositoryException
public FullTextSearch fullTextSearch(java.lang.String selectorName, java.lang.String propertyName, StaticOperand fullTextSearchExpression) throws InvalidQueryException, RepositoryException
selectorName
- the selector name; non-nullpropertyName
- the property name, or null to search all
full-text indexed properties of the node
(or node subtree, in some implementations)fullTextSearchExpression
- the full-text search expression;
non-nulljavax.jcr.query.InvalidQueryException
- if the query is invalidjavax.jcr.RepositoryException
- if the operation otherwise failsInvalidQueryException
RepositoryException
public SameNode sameNode(java.lang.String path) throws InvalidQueryException, RepositoryException
path
- an absolute path; non-nulljavax.jcr.query.InvalidQueryException
- if the query has no default
selector or is otherwise invalidjavax.jcr.RepositoryException
- if the operation otherwise failsInvalidQueryException
RepositoryException
public SameNode sameNode(java.lang.String selectorName, java.lang.String path) throws InvalidQueryException, RepositoryException
selectorName
- the selector name; non-nullpath
- an absolute path; non-nulljavax.jcr.query.InvalidQueryException
- if the query is invalidjavax.jcr.RepositoryException
- if the operation otherwise failsInvalidQueryException
RepositoryException
public ChildNode childNode(java.lang.String path) throws InvalidQueryException, RepositoryException
path
- an absolute path; non-nulljavax.jcr.query.InvalidQueryException
- if the query has no default
selector or is otherwise invalidjavax.jcr.RepositoryException
- if the operation otherwise failsInvalidQueryException
RepositoryException
public ChildNode childNode(java.lang.String selectorName, java.lang.String path) throws InvalidQueryException, RepositoryException
selectorName
- the selector name; non-nullpath
- an absolute path; non-nulljavax.jcr.query.InvalidQueryException
- if the query is invalidjavax.jcr.RepositoryException
- if the operation otherwise failsInvalidQueryException
RepositoryException
public DescendantNode descendantNode(java.lang.String path) throws InvalidQueryException, RepositoryException
path
- an absolute path; non-nulljavax.jcr.query.InvalidQueryException
- if the query has no default
selector or is otherwise invalidjavax.jcr.RepositoryException
- if the operation otherwise failsInvalidQueryException
RepositoryException
public DescendantNode descendantNode(java.lang.String selectorName, java.lang.String path) throws InvalidQueryException, RepositoryException
selectorName
- the selector name; non-nullpath
- an absolute path; non-nulljavax.jcr.query.InvalidQueryException
- if the query is invalidjavax.jcr.RepositoryException
- if the operation otherwise failsInvalidQueryException
RepositoryException
public PropertyValue propertyValue(java.lang.String propertyName) throws InvalidQueryException, RepositoryException
propertyName
- the property name; non-nulljavax.jcr.query.InvalidQueryException
- if the query has no default
selector or is otherwise invalidjavax.jcr.RepositoryException
- if the operation otherwise failsInvalidQueryException
RepositoryException
public PropertyValue propertyValue(java.lang.String selectorName, java.lang.String propertyName) throws InvalidQueryException, RepositoryException
selectorName
- the selector name; non-nullpropertyName
- the property name; non-nulljavax.jcr.query.InvalidQueryException
- if the query is invalidjavax.jcr.RepositoryException
- if the operation otherwise failsInvalidQueryException
RepositoryException
public Length length(PropertyValue propertyValue) throws InvalidQueryException, RepositoryException
propertyValue
- the property value for which to compute the length;
non-nulljavax.jcr.query.InvalidQueryException
- if the query is invalidjavax.jcr.RepositoryException
- if the operation otherwise failsInvalidQueryException
RepositoryException
public NodeName nodeName() throws InvalidQueryException, RepositoryException
NAME
value equal to the prefix-qualified name
of a node in the default selector.javax.jcr.query.InvalidQueryException
- if the query has no default
selector or is otherwise invalidjavax.jcr.RepositoryException
- if the operation otherwise failsInvalidQueryException
RepositoryException
public NodeName nodeName(java.lang.String selectorName) throws InvalidQueryException, RepositoryException
NAME
value equal to the prefix-qualified name
of a node in the specified selector.selectorName
- the selector name; non-nulljavax.jcr.query.InvalidQueryException
- if the query is invalidjavax.jcr.RepositoryException
- if the operation otherwise failsInvalidQueryException
RepositoryException
public NodeLocalName nodeLocalName() throws InvalidQueryException, RepositoryException
NAME
value equal to the local (unprefixed)
name of a node in the default selector.javax.jcr.query.InvalidQueryException
- if the query has no default
selector or is otherwise invalidjavax.jcr.RepositoryException
- if the operation otherwise failsInvalidQueryException
RepositoryException
public NodeLocalName nodeLocalName(java.lang.String selectorName) throws InvalidQueryException, RepositoryException
NAME
value equal to the local (unprefixed)
name of a node in the specified selector.selectorName
- the selector name; non-nulljavax.jcr.query.InvalidQueryException
- if the query is invalidjavax.jcr.RepositoryException
- if the operation otherwise failsInvalidQueryException
RepositoryException
public FullTextSearchScore fullTextSearchScore() throws InvalidQueryException, RepositoryException
DOUBLE
value equal to the full-text search
score of a node in the default selector.javax.jcr.query.InvalidQueryException
- if the query has no default
selector or is otherwise invalidjavax.jcr.RepositoryException
- if the operation otherwise failsInvalidQueryException
RepositoryException
public FullTextSearchScore fullTextSearchScore(java.lang.String selectorName) throws InvalidQueryException, RepositoryException
DOUBLE
value equal to the full-text search
score of a node in the specified selector.selectorName
- the selector name; non-nulljavax.jcr.query.InvalidQueryException
- if the query is invalidjavax.jcr.RepositoryException
- if the operation otherwise failsInvalidQueryException
RepositoryException
public LowerCase lowerCase(DynamicOperand operand) throws InvalidQueryException, RepositoryException
operand
- the operand whose value is converted to a lower-case
string; non-nulljavax.jcr.query.InvalidQueryException
- if the query is invalidjavax.jcr.RepositoryException
- if the operation otherwise failsInvalidQueryException
RepositoryException
public UpperCase upperCase(DynamicOperand operand) throws InvalidQueryException, RepositoryException
operand
- the operand whose value is converted to a upper-case
string; non-nulljavax.jcr.query.InvalidQueryException
- if the query is invalidjavax.jcr.RepositoryException
- if the operation otherwise failsInvalidQueryException
RepositoryException
public BindVariableValue bindVariable(java.lang.String bindVariableName) throws InvalidQueryException, RepositoryException
bindVariableName
- the bind variable name; non-nulljavax.jcr.query.InvalidQueryException
- if the query is invalidjavax.jcr.RepositoryException
- if the operation otherwise failsInvalidQueryException
RepositoryException
public Literal literal(Value value) throws InvalidQueryException, RepositoryException
value
- a JCR value; non-nullInvalidQueryException
- if the query is invalidRepositoryException
- if the operation otherwise failspublic Ordering ascending(DynamicOperand operand) throws InvalidQueryException, RepositoryException
operand
- the operand by which to order; non-nulljavax.jcr.query.InvalidQueryException
- if the query is invalidjavax.jcr.RepositoryException
- if the operation otherwise failsInvalidQueryException
RepositoryException
public Ordering descending(DynamicOperand operand) throws InvalidQueryException, RepositoryException
operand
- the operand by which to order; non-nulljavax.jcr.query.InvalidQueryException
- if the query is invalidjavax.jcr.RepositoryException
- if the operation otherwise failsInvalidQueryException
RepositoryException
public Column column(java.lang.String propertyName) throws InvalidQueryException, RepositoryException
The column name is the property name.
propertyName
- the property name, or null to include a column for
each single-value non-residual property of the
selector's node typejavax.jcr.query.InvalidQueryException
- if the query has no default
selector or is otherwise invalidjavax.jcr.RepositoryException
- if the operation otherwise failsInvalidQueryException
RepositoryException
public Column column(java.lang.String propertyName, java.lang.String columnName) throws InvalidQueryException, RepositoryException
propertyName
- the property name, or null to include a column for
each single-value non-residual property of the
selector's node typecolumnName
- the column name; must be null if propertyName
is nulljavax.jcr.query.InvalidQueryException
- if the query has no default
selector or is otherwise invalidjavax.jcr.RepositoryException
- if the operation otherwise failsInvalidQueryException
RepositoryException
public Column column(java.lang.String selectorName, java.lang.String propertyName, java.lang.String columnName) throws InvalidQueryException, RepositoryException
selectorName
- the selector name; non-nullpropertyName
- the property name, or null to include a column for
each single-value non-residual property of the
selector's node typecolumnName
- the column name; if null, defaults to
propertyName
; must be null if
propertyName
is nulljavax.jcr.query.InvalidQueryException
- if the query is invalidjavax.jcr.RepositoryException
- if the operation otherwise failsInvalidQueryException
RepositoryException
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"