Class QueryObjectModelFactoryImpl
- java.lang.Object
-
- org.apache.jackrabbit.spi.commons.query.qom.QueryObjectModelFactoryImpl
-
- All Implemented Interfaces:
QueryObjectModelConstants
,QueryObjectModelFactory
public abstract class QueryObjectModelFactoryImpl extends java.lang.Object implements QueryObjectModelFactory
QueryObjectModelFactoryImpl
implements the query object model factory from JSR 283.
-
-
Field Summary
-
Fields inherited from interface javax.jcr.query.qom.QueryObjectModelConstants
JCR_JOIN_TYPE_INNER, JCR_JOIN_TYPE_LEFT_OUTER, JCR_JOIN_TYPE_RIGHT_OUTER, JCR_OPERATOR_EQUAL_TO, JCR_OPERATOR_GREATER_THAN, JCR_OPERATOR_GREATER_THAN_OR_EQUAL_TO, JCR_OPERATOR_LESS_THAN, JCR_OPERATOR_LESS_THAN_OR_EQUAL_TO, JCR_OPERATOR_LIKE, JCR_OPERATOR_NOT_EQUAL_TO, JCR_ORDER_ASCENDING, JCR_ORDER_DESCENDING
-
-
Constructor Summary
Constructors Constructor Description QueryObjectModelFactoryImpl(NamePathResolver resolver)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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 selectorName, java.lang.String propertyName, StaticOperand fullTextSearchExpression)
Performs a full-text search against the specified selector.FullTextSearch
fullTextSearch(java.lang.String propertyName, StaticOperand fullTextSearchExpression)
Performs a full-text search against the default selector.FullTextSearchScore
fullTextSearchScore()
Evaluates to aDOUBLE
value equal to the full-text search score of a node in the default selector.FullTextSearchScore
fullTextSearchScore(java.lang.String selectorName)
Evaluates to aDOUBLE
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 aNAME
value equal to the local (unprefixed) name of a node in the default selector.NodeLocalName
nodeLocalName(java.lang.String selectorName)
Evaluates to aNAME
value equal to the local (unprefixed) name of a node in the specified selector.NodeName
nodeName()
Evaluates to aNAME
value equal to the prefix-qualified name of a node in the default selector.NodeName
nodeName(java.lang.String selectorName)
Evaluates to aNAME
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.
-
-
-
Constructor Detail
-
QueryObjectModelFactoryImpl
public QueryObjectModelFactoryImpl(NamePathResolver resolver)
-
-
Method Detail
-
createQuery
public QueryObjectModel createQuery(Selector selector, Constraint constraint, Ordering[] orderings, Column[] columns) throws InvalidQueryException, RepositoryException
Creates a query with one selector.The specified selector will be the default selector of the query.
- Parameters:
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 array- Returns:
- the query; non-null
- Throws:
InvalidQueryException
- if the query is invalidRepositoryException
- if the operation otherwise fails
-
createQuery
public QueryObjectModel createQuery(Source source, Constraint constraint, Ordering[] orderings, Column[] columns) throws InvalidQueryException, RepositoryException
Creates a query with one or more selectors.If
source
is a selector, that selector is the default selector of the query. Otherwise the query does not have a default selector.- Specified by:
createQuery
in interfaceQueryObjectModelFactory
- Parameters:
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 array- Returns:
- the query; non-null
- Throws:
InvalidQueryException
- if the query is invalidRepositoryException
- if the operation otherwise fails
-
selector
public Selector selector(java.lang.String nodeTypeName) throws InvalidQueryException, RepositoryException
Selects a subset of the nodes in the repository based on node type.The selector name is the node type name.
- Parameters:
nodeTypeName
- the name of the required node type; non-null- Returns:
- the selector; non-null
- Throws:
InvalidQueryException
- if the query is invalidRepositoryException
- if the operation otherwise fails
-
selector
public Selector selector(java.lang.String nodeTypeName, java.lang.String selectorName) throws InvalidQueryException, RepositoryException
Selects a subset of the nodes in the repository based on node type.- Specified by:
selector
in interfaceQueryObjectModelFactory
- Parameters:
nodeTypeName
- the name of the required node type; non-nullselectorName
- the selector name; non-null- Returns:
- the selector; non-null
- Throws:
InvalidQueryException
- if the query is invalidRepositoryException
- if the operation otherwise fails
-
join
public Join join(Source left, Source right, java.lang.String joinTypeName, JoinCondition joinCondition) throws InvalidQueryException, RepositoryException
Performs a join between two node-tuple sources.- Specified by:
join
in interfaceQueryObjectModelFactory
- Parameters:
left
- the left node-tuple source; non-nullright
- the right node-tuple source; non-nulljoinTypeName
- eitherjoinCondition
- the join condition; non-null- Returns:
- the join; non-null
- Throws:
InvalidQueryException
- if the query is invalidRepositoryException
- if the operation otherwise fails
-
equiJoinCondition
public EquiJoinCondition equiJoinCondition(java.lang.String selector1Name, java.lang.String property1Name, java.lang.String selector2Name, java.lang.String property2Name) throws InvalidQueryException, RepositoryException
Tests whether the value of a property in a first selector is equal to the value of a property in a second selector.- Specified by:
equiJoinCondition
in interfaceQueryObjectModelFactory
- Parameters:
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-null- Returns:
- the constraint; non-null
- Throws:
InvalidQueryException
- if the query is invalidRepositoryException
- if the operation otherwise fails
-
sameNodeJoinCondition
public SameNodeJoinCondition sameNodeJoinCondition(java.lang.String selector1Name, java.lang.String selector2Name) throws InvalidQueryException, RepositoryException
Tests whether a first selector's node is the same as a second selector's node.- Parameters:
selector1Name
- the name of the first selector; non-nullselector2Name
- the name of the second selector; non-null- Returns:
- the constraint; non-null
- Throws:
InvalidQueryException
- if the query is invalidRepositoryException
- if the operation otherwise fails
-
sameNodeJoinCondition
public SameNodeJoinCondition sameNodeJoinCondition(java.lang.String selector1Name, java.lang.String selector2Name, java.lang.String selector2Path) throws InvalidQueryException, RepositoryException
Tests whether a first selector's node is the same as a node identified by relative path from a second selector's node.- Specified by:
sameNodeJoinCondition
in interfaceQueryObjectModelFactory
- Parameters:
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-null- Returns:
- the constraint; non-null
- Throws:
InvalidQueryException
- if the query is invalidRepositoryException
- if the operation otherwise fails
-
childNodeJoinCondition
public ChildNodeJoinCondition childNodeJoinCondition(java.lang.String childSelectorName, java.lang.String parentSelectorName) throws InvalidQueryException, RepositoryException
Tests whether a first selector's node is a child of a second selector's node.- Specified by:
childNodeJoinCondition
in interfaceQueryObjectModelFactory
- Parameters:
childSelectorName
- the name of the child selector; non-nullparentSelectorName
- the name of the parent selector; non-null- Returns:
- the constraint; non-null
- Throws:
InvalidQueryException
- if the query is invalidRepositoryException
- if the operation otherwise fails
-
descendantNodeJoinCondition
public DescendantNodeJoinCondition descendantNodeJoinCondition(java.lang.String descendantSelectorName, java.lang.String ancestorSelectorName) throws InvalidQueryException, RepositoryException
Tests whether a first selector's node is a descendant of a second selector's node.- Specified by:
descendantNodeJoinCondition
in interfaceQueryObjectModelFactory
- Parameters:
descendantSelectorName
- the name of the descendant selector; non-nullancestorSelectorName
- the name of the ancestor selector; non-null- Returns:
- the constraint; non-null
- Throws:
InvalidQueryException
- if the query is invalidRepositoryException
- if the operation otherwise fails
-
and
public And and(Constraint constraint1, Constraint constraint2) throws InvalidQueryException, RepositoryException
Performs a logical conjunction of two other constraints.- Specified by:
and
in interfaceQueryObjectModelFactory
- Parameters:
constraint1
- the first constraint; non-nullconstraint2
- the second constraint; non-null- Returns:
- the
And
constraint; non-null - Throws:
InvalidQueryException
- if the query is invalidRepositoryException
- if the operation otherwise fails
-
or
public Or or(Constraint constraint1, Constraint constraint2) throws InvalidQueryException, RepositoryException
Performs a logical disjunction of two other constraints.- Specified by:
or
in interfaceQueryObjectModelFactory
- Parameters:
constraint1
- the first constraint; non-nullconstraint2
- the second constraint; non-null- Returns:
- the
Or
constraint; non-null - Throws:
InvalidQueryException
- if the query is invalidRepositoryException
- if the operation otherwise fails
-
not
public Not not(Constraint constraint) throws InvalidQueryException, RepositoryException
Performs a logical negation of another constraint.- Specified by:
not
in interfaceQueryObjectModelFactory
- Parameters:
constraint
- the constraint to be negated; non-null- Returns:
- the
Not
constraint; non-null - Throws:
InvalidQueryException
- if the query is invalidRepositoryException
- if the operation otherwise fails
-
comparison
public Comparison comparison(DynamicOperand left, java.lang.String operatorName, StaticOperand right) throws InvalidQueryException, RepositoryException
Filters node-tuples based on the outcome of a binary operation.- Specified by:
comparison
in interfaceQueryObjectModelFactory
- Parameters:
left
- the first operand; non-nulloperatorName
- the operator; eitherQueryObjectModelConstants.JCR_OPERATOR_EQUAL_TO
,QueryObjectModelConstants.JCR_OPERATOR_NOT_EQUAL_TO
,QueryObjectModelConstants.JCR_OPERATOR_LESS_THAN
,QueryObjectModelConstants.JCR_OPERATOR_LESS_THAN_OR_EQUAL_TO
,QueryObjectModelConstants.JCR_OPERATOR_GREATER_THAN
,QueryObjectModelConstants.JCR_OPERATOR_GREATER_THAN_OR_EQUAL_TO
, orQueryObjectModelConstants.JCR_OPERATOR_LIKE
right
- the second operand; non-null- Returns:
- the constraint; non-null
- Throws:
InvalidQueryException
- if the query is invalidRepositoryException
- if the operation otherwise fails
-
propertyExistence
public PropertyExistence propertyExistence(java.lang.String propertyName) throws InvalidQueryException, RepositoryException
Tests the existence of a property in the default selector.- Parameters:
propertyName
- the property name; non-null- Returns:
- the constraint; non-null
- Throws:
InvalidQueryException
- if the query has no default selector or is otherwise invalidRepositoryException
- if the operation otherwise fails
-
propertyExistence
public PropertyExistence propertyExistence(java.lang.String selectorName, java.lang.String propertyName) throws InvalidQueryException, RepositoryException
Tests the existence of a property in the specified selector.- Specified by:
propertyExistence
in interfaceQueryObjectModelFactory
- Parameters:
selectorName
- the selector name; non-nullpropertyName
- the property name; non-null- Returns:
- the constraint; non-null
- Throws:
InvalidQueryException
- if the query is invalidRepositoryException
- if the operation otherwise fails
-
fullTextSearch
public FullTextSearch fullTextSearch(java.lang.String propertyName, StaticOperand fullTextSearchExpression) throws InvalidQueryException, RepositoryException
Performs a full-text search against the default selector.- Parameters:
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-null- Returns:
- the constraint; non-null
- Throws:
InvalidQueryException
- if the query has no default selector or is otherwise invalidRepositoryException
- if the operation otherwise fails
-
fullTextSearch
public FullTextSearch fullTextSearch(java.lang.String selectorName, java.lang.String propertyName, StaticOperand fullTextSearchExpression) throws InvalidQueryException, RepositoryException
Performs a full-text search against the specified selector.- Specified by:
fullTextSearch
in interfaceQueryObjectModelFactory
- Parameters:
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-null- Returns:
- the constraint; non-null
- Throws:
InvalidQueryException
- if the query is invalidRepositoryException
- if the operation otherwise fails
-
sameNode
public SameNode sameNode(java.lang.String path) throws InvalidQueryException, RepositoryException
Tests whether a node in the default selector is reachable by a specified absolute path.- Parameters:
path
- an absolute path; non-null- Returns:
- the constraint; non-null
- Throws:
InvalidQueryException
- if the query has no default selector or is otherwise invalidRepositoryException
- if the operation otherwise fails
-
sameNode
public SameNode sameNode(java.lang.String selectorName, java.lang.String path) throws InvalidQueryException, RepositoryException
Tests whether a node in the specified selector is reachable by a specified absolute path.- Specified by:
sameNode
in interfaceQueryObjectModelFactory
- Parameters:
selectorName
- the selector name; non-nullpath
- an absolute path; non-null- Returns:
- the constraint; non-null
- Throws:
InvalidQueryException
- if the query is invalidRepositoryException
- if the operation otherwise fails
-
childNode
public ChildNode childNode(java.lang.String path) throws InvalidQueryException, RepositoryException
Tests whether a node in the default selector is a child of a node reachable by a specified absolute path.- Parameters:
path
- an absolute path; non-null- Returns:
- the constraint; non-null
- Throws:
InvalidQueryException
- if the query has no default selector or is otherwise invalidRepositoryException
- if the operation otherwise fails
-
childNode
public ChildNode childNode(java.lang.String selectorName, java.lang.String path) throws InvalidQueryException, RepositoryException
Tests whether a node in the specified selector is a child of a node reachable by a specified absolute path.- Specified by:
childNode
in interfaceQueryObjectModelFactory
- Parameters:
selectorName
- the selector name; non-nullpath
- an absolute path; non-null- Returns:
- the constraint; non-null
- Throws:
InvalidQueryException
- if the query is invalidRepositoryException
- if the operation otherwise fails
-
descendantNode
public DescendantNode descendantNode(java.lang.String path) throws InvalidQueryException, RepositoryException
Tests whether a node in the default selector is a descendant of a node reachable by a specified absolute path.- Parameters:
path
- an absolute path; non-null- Returns:
- the constraint; non-null
- Throws:
InvalidQueryException
- if the query has no default selector or is otherwise invalidRepositoryException
- if the operation otherwise fails
-
descendantNode
public DescendantNode descendantNode(java.lang.String selectorName, java.lang.String path) throws InvalidQueryException, RepositoryException
Tests whether a node in the specified selector is a descendant of a node reachable by a specified absolute path.- Specified by:
descendantNode
in interfaceQueryObjectModelFactory
- Parameters:
selectorName
- the selector name; non-nullpath
- an absolute path; non-null- Returns:
- the constraint; non-null
- Throws:
InvalidQueryException
- if the query is invalidRepositoryException
- if the operation otherwise fails
-
propertyValue
public PropertyValue propertyValue(java.lang.String propertyName) throws InvalidQueryException, RepositoryException
Evaluates to the value (or values, if multi-valued) of a property of the default selector.- Parameters:
propertyName
- the property name; non-null- Returns:
- the operand; non-null
- Throws:
InvalidQueryException
- if the query has no default selector or is otherwise invalidRepositoryException
- if the operation otherwise fails
-
propertyValue
public PropertyValue propertyValue(java.lang.String selectorName, java.lang.String propertyName) throws InvalidQueryException, RepositoryException
Evaluates to the value (or values, if multi-valued) of a property in the specified selector.- Specified by:
propertyValue
in interfaceQueryObjectModelFactory
- Parameters:
selectorName
- the selector name; non-nullpropertyName
- the property name; non-null- Returns:
- the operand; non-null
- Throws:
InvalidQueryException
- if the query is invalidRepositoryException
- if the operation otherwise fails
-
length
public Length length(PropertyValue propertyValue) throws InvalidQueryException, RepositoryException
Evaluates to the length (or lengths, if multi-valued) of a property.- Specified by:
length
in interfaceQueryObjectModelFactory
- Parameters:
propertyValue
- the property value for which to compute the length; non-null- Returns:
- the operand; non-null
- Throws:
InvalidQueryException
- if the query is invalidRepositoryException
- if the operation otherwise fails
-
nodeName
public NodeName nodeName() throws InvalidQueryException, RepositoryException
Evaluates to aNAME
value equal to the prefix-qualified name of a node in the default selector.- Returns:
- the operand; non-null
- Throws:
InvalidQueryException
- if the query has no default selector or is otherwise invalidRepositoryException
- if the operation otherwise fails
-
nodeName
public NodeName nodeName(java.lang.String selectorName) throws InvalidQueryException, RepositoryException
Evaluates to aNAME
value equal to the prefix-qualified name of a node in the specified selector.- Specified by:
nodeName
in interfaceQueryObjectModelFactory
- Parameters:
selectorName
- the selector name; non-null- Returns:
- the operand; non-null
- Throws:
InvalidQueryException
- if the query is invalidRepositoryException
- if the operation otherwise fails
-
nodeLocalName
public NodeLocalName nodeLocalName() throws InvalidQueryException, RepositoryException
Evaluates to aNAME
value equal to the local (unprefixed) name of a node in the default selector.- Returns:
- the operand; non-null
- Throws:
InvalidQueryException
- if the query has no default selector or is otherwise invalidRepositoryException
- if the operation otherwise fails
-
nodeLocalName
public NodeLocalName nodeLocalName(java.lang.String selectorName) throws InvalidQueryException, RepositoryException
Evaluates to aNAME
value equal to the local (unprefixed) name of a node in the specified selector.- Specified by:
nodeLocalName
in interfaceQueryObjectModelFactory
- Parameters:
selectorName
- the selector name; non-null- Returns:
- the operand; non-null
- Throws:
InvalidQueryException
- if the query is invalidRepositoryException
- if the operation otherwise fails
-
fullTextSearchScore
public FullTextSearchScore fullTextSearchScore() throws InvalidQueryException, RepositoryException
Evaluates to aDOUBLE
value equal to the full-text search score of a node in the default selector.- Returns:
- the operand; non-null
- Throws:
InvalidQueryException
- if the query has no default selector or is otherwise invalidRepositoryException
- if the operation otherwise fails
-
fullTextSearchScore
public FullTextSearchScore fullTextSearchScore(java.lang.String selectorName) throws InvalidQueryException, RepositoryException
Evaluates to aDOUBLE
value equal to the full-text search score of a node in the specified selector.- Specified by:
fullTextSearchScore
in interfaceQueryObjectModelFactory
- Parameters:
selectorName
- the selector name; non-null- Returns:
- the operand; non-null
- Throws:
InvalidQueryException
- if the query is invalidRepositoryException
- if the operation otherwise fails
-
lowerCase
public LowerCase lowerCase(DynamicOperand operand) throws InvalidQueryException, RepositoryException
Evaluates to the lower-case string value (or values, if multi-valued) of an operand.- Specified by:
lowerCase
in interfaceQueryObjectModelFactory
- Parameters:
operand
- the operand whose value is converted to a lower-case string; non-null- Returns:
- the operand; non-null
- Throws:
InvalidQueryException
- if the query is invalidRepositoryException
- if the operation otherwise fails
-
upperCase
public UpperCase upperCase(DynamicOperand operand) throws InvalidQueryException, RepositoryException
Evaluates to the upper-case string value (or values, if multi-valued) of an operand.- Specified by:
upperCase
in interfaceQueryObjectModelFactory
- Parameters:
operand
- the operand whose value is converted to a upper-case string; non-null- Returns:
- the operand; non-null
- Throws:
InvalidQueryException
- if the query is invalidRepositoryException
- if the operation otherwise fails
-
bindVariable
public BindVariableValue bindVariable(java.lang.String bindVariableName) throws InvalidQueryException, RepositoryException
Evaluates to the value of a bind variable.- Specified by:
bindVariable
in interfaceQueryObjectModelFactory
- Parameters:
bindVariableName
- the bind variable name; non-null- Returns:
- the operand; non-null
- Throws:
InvalidQueryException
- if the query is invalidRepositoryException
- if the operation otherwise fails
-
literal
public Literal literal(Value value) throws InvalidQueryException, RepositoryException
Evaluates to a literal value.- Specified by:
literal
in interfaceQueryObjectModelFactory
- Parameters:
value
- a JCR value; non-null- Returns:
- the operand; non-null
- Throws:
InvalidQueryException
- if the query is invalidRepositoryException
- if the operation otherwise fails
-
ascending
public Ordering ascending(DynamicOperand operand) throws InvalidQueryException, RepositoryException
Orders by the value of the specified operand, in ascending order.- Specified by:
ascending
in interfaceQueryObjectModelFactory
- Parameters:
operand
- the operand by which to order; non-null- Returns:
- the ordering
- Throws:
InvalidQueryException
- if the query is invalidRepositoryException
- if the operation otherwise fails
-
descending
public Ordering descending(DynamicOperand operand) throws InvalidQueryException, RepositoryException
Orders by the value of the specified operand, in descending order.- Specified by:
descending
in interfaceQueryObjectModelFactory
- Parameters:
operand
- the operand by which to order; non-null- Returns:
- the ordering
- Throws:
InvalidQueryException
- if the query is invalidRepositoryException
- if the operation otherwise fails
-
column
public Column column(java.lang.String propertyName) throws InvalidQueryException, RepositoryException
Identifies a property in the default selector to include in the tabular view of query results.The column name is the property name.
- Parameters:
propertyName
- the property name, or null to include a column for each single-value non-residual property of the selector's node type- Returns:
- the column; non-null
- Throws:
InvalidQueryException
- if the query has no default selector or is otherwise invalidRepositoryException
- if the operation otherwise fails
-
column
public Column column(java.lang.String propertyName, java.lang.String columnName) throws InvalidQueryException, RepositoryException
Identifies a property in the default selector to include in the tabular view of query results.- Parameters:
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 ifpropertyName
is null- Returns:
- the column; non-null
- Throws:
InvalidQueryException
- if the query has no default selector or is otherwise invalidRepositoryException
- if the operation otherwise fails
-
column
public Column column(java.lang.String selectorName, java.lang.String propertyName, java.lang.String columnName) throws InvalidQueryException, RepositoryException
Identifies a property in the specified selector to include in the tabular view of query results.- Specified by:
column
in interfaceQueryObjectModelFactory
- Parameters:
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 topropertyName
; must be null ifpropertyName
is null- Returns:
- the column; non-null
- Throws:
InvalidQueryException
- if the query is invalidRepositoryException
- if the operation otherwise fails
-
-