Interface QueryObjectModelFactory
-
- All Superinterfaces:
QueryObjectModelConstants
- All Known Implementing Classes:
QueryObjectModelFactoryImpl
public interface QueryObjectModelFactory extends QueryObjectModelConstants
AQueryObjectModelFactorycreates instances of the JCR query object model.Refer to
QueryObjectModelfor a description of the query object model.- Since:
- JCR 2.0
-
-
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
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Andand(Constraint constraint1, Constraint constraint2)Performs a logical conjunction of two other constraints.Orderingascending(DynamicOperand operand)Orders by the value of the specified operand, in ascending order.BindVariableValuebindVariable(java.lang.String bindVariableName)Evaluates to the value of a bind variable.ChildNodechildNode(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.ChildNodeJoinConditionchildNodeJoinCondition(java.lang.String childSelectorName, java.lang.String parentSelectorName)Tests whether a first selector's node is a child of a second selector's node.Columncolumn(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.Comparisoncomparison(DynamicOperand operand1, java.lang.String operator, StaticOperand operand2)Filters node-tuples based on the outcome of a binary operation.QueryObjectModelcreateQuery(Source source, Constraint constraint, Ordering[] orderings, Column[] columns)Creates a query with one or more selectors.DescendantNodedescendantNode(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.DescendantNodeJoinConditiondescendantNodeJoinCondition(java.lang.String descendantSelectorName, java.lang.String ancestorSelectorName)Tests whether a first selector's node is a descendant of a second selector's node.Orderingdescending(DynamicOperand operand)Orders by the value of the specified operand, in descending order.EquiJoinConditionequiJoinCondition(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.FullTextSearchfullTextSearch(java.lang.String selectorName, java.lang.String propertyName, StaticOperand fullTextSearchExpression)Performs a full-text search against the specified selector.FullTextSearchScorefullTextSearchScore(java.lang.String selectorName)Evaluates to aDOUBLEvalue equal to the full-text search score of a node in the specified selector.Joinjoin(Source left, Source right, java.lang.String joinType, JoinCondition joinCondition)Performs a join between two node-tuple sources.Lengthlength(PropertyValue propertyValue)Evaluates to the length (or lengths, if multi-valued) of a property.Literalliteral(Value literalValue)Evaluates to a literal value.LowerCaselowerCase(DynamicOperand operand)Evaluates to the lower-case string value (or values, if multi-valued) of an operand.NodeLocalNamenodeLocalName(java.lang.String selectorName)Evaluates to aNAMEvalue equal to the local (unprefixed) name of a node in the specified selector.NodeNamenodeName(java.lang.String selectorName)Evaluates to aNAMEvalue equal to the prefix-qualified name of a node in the specified selector.Notnot(Constraint constraint)Performs a logical negation of another constraint.Oror(Constraint constraint1, Constraint constraint2)Performs a logical disjunction of two other constraints.PropertyExistencepropertyExistence(java.lang.String selectorName, java.lang.String propertyName)Tests the existence of a property in the specified selector.PropertyValuepropertyValue(java.lang.String selectorName, java.lang.String propertyName)Evaluates to the value (or values, if multi-valued) of a property in the specified selector.SameNodesameNode(java.lang.String selectorName, java.lang.String path)Tests whether a node in the specified selector is reachable by a specified absolute path.SameNodeJoinConditionsameNodeJoinCondition(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.Selectorselector(java.lang.String nodeTypeName, java.lang.String selectorName)Selects a subset of the nodes in the repository based on node type.UpperCaseupperCase(DynamicOperand operand)Evaluates to the upper-case string value (or values, if multi-valued) of an operand.
-
-
-
Method Detail
-
createQuery
QueryObjectModel createQuery(Source source, Constraint constraint, Ordering[] orderings, Column[] columns) throws InvalidQueryException, RepositoryException
Creates a query with one or more selectors.- 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 a particular validity test is possible on this method, the implemention chooses to perform that test and the parameters given fail that test. See the individual QOM factory methods for the validity criteria of each query element.RepositoryException- if another error occurs.
-
selector
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.The query is invalid if
nodeTypeNameorselectorNameis not a syntactically valid JCR name.The query is invalid if
selectorName} is identical to the name of another selector in the query.The query is also invalid if
nodeTypeis not a valid JCR name or is a valid JCR name but not the name of a node type available in the repository.- Parameters:
nodeTypeName- the name of the required node type; non-nullselectorName- the selector name; non-null- Returns:
- the selector; non-null
- Throws:
InvalidQueryException- if a particular validity test is possible on this method, the implemention chooses to perform that test (and not leave it until later, oncreateQuery(javax.jcr.query.qom.Source, javax.jcr.query.qom.Constraint, javax.jcr.query.qom.Ordering[], javax.jcr.query.qom.Column[])), and the parameters given fail that testRepositoryException- if the operation otherwise fails
-
join
Join join(Source left, Source right, java.lang.String joinType, JoinCondition joinCondition) throws InvalidQueryException, RepositoryException
Performs a join between two node-tuple sources.The query is invalid if
leftis the same source asright.- Parameters:
left- the left node-tuple source; non-nullright- the right node-tuple source; non-nulljoinType- eitherjoinCondition- the join condition; non-null- Returns:
- the join; non-null
- Throws:
InvalidQueryException- if a particular validity test is possible on this method, the implemention chooses to perform that test (and not leave it until later, oncreateQuery(javax.jcr.query.qom.Source, javax.jcr.query.qom.Constraint, javax.jcr.query.qom.Ordering[], javax.jcr.query.qom.Column[])), and the parameters given fail that testRepositoryException- if the operation otherwise fails
-
equiJoinCondition
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.The query is invalid if:
selector1is not the name of a selector in the query, orselector2is not the name of a selector in the query, orselector1is the same asselector2, orproperty1is not a syntactically valid JCR name, orproperty2is not a syntactically valid JCR name, or- the value of
property1is not the same property type as the value ofproperty2, or property1is a multi-valued property, orproperty2is a multi-valued property, orproperty1is aBINARYproperty, orproperty2is aBINARYproperty.
- 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 a particular validity test is possible on this method, the implementation chooses to perform that test (and not leave it until later, oncreateQuery(javax.jcr.query.qom.Source, javax.jcr.query.qom.Constraint, javax.jcr.query.qom.Ordering[], javax.jcr.query.qom.Column[])), and the parameters given fail that testRepositoryException- if the operation otherwise fails
-
sameNodeJoinCondition
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.The query is invalid if:
selector1is not the name of a selector in the query, orselector2is not the name of a selector in the query, orselector1is the same as selector2, orselector2Pathis not a syntactically valid relative path. Note, however, that if the path is syntactically valid but does not identify a node visible to the current session, the query is valid but the constraint is not satisfied.
- 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 a particular validity test is possible on this method, the implemention chooses to perform that test (and not leave it until later, oncreateQuery(javax.jcr.query.qom.Source, javax.jcr.query.qom.Constraint, javax.jcr.query.qom.Ordering[], javax.jcr.query.qom.Column[])), and the parameters given fail that testRepositoryException- if the operation otherwise fails
-
childNodeJoinCondition
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.The query is invalid if:
childSelectoris not the name of a selector in the query, orparentSelectoris not the name of a selector in the query, orchildSelectoris the same asparentSelector.
- 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 a particular validity test is possible on this method, the implemention chooses to perform that test (and not leave it until later, oncreateQuery(javax.jcr.query.qom.Source, javax.jcr.query.qom.Constraint, javax.jcr.query.qom.Ordering[], javax.jcr.query.qom.Column[])), and the parameters given fail that testRepositoryException- if the operation otherwise fails
-
descendantNodeJoinCondition
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.The query is invalid if:
descendantSelectoris not the name of a selector in the query, orancestorSelectoris not the name of a selector in the query, ordescendantSelectoris the same asancestorSelector.
- 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 a particular validity test is possible on this method, the implemention chooses to perform that test (and not leave it until later, oncreateQuery(javax.jcr.query.qom.Source, javax.jcr.query.qom.Constraint, javax.jcr.query.qom.Ordering[], javax.jcr.query.qom.Column[])), and the parameters given fail that testRepositoryException- if the operation otherwise fails
-
and
And and(Constraint constraint1, Constraint constraint2) throws InvalidQueryException, RepositoryException
Performs a logical conjunction of two other constraints.- Parameters:
constraint1- the first constraint; non-nullconstraint2- the second constraint; non-null- Returns:
- the
Andconstraint; non-null - Throws:
InvalidQueryException- if a particular validity test is possible on this method, the implemention chooses to perform that test (and not leave it until later, oncreateQuery(javax.jcr.query.qom.Source, javax.jcr.query.qom.Constraint, javax.jcr.query.qom.Ordering[], javax.jcr.query.qom.Column[])), and the parameters given fail that testRepositoryException- if the operation otherwise fails
-
or
Or or(Constraint constraint1, Constraint constraint2) throws InvalidQueryException, RepositoryException
Performs a logical disjunction of two other constraints.- Parameters:
constraint1- the first constraint; non-nullconstraint2- the second constraint; non-null- Returns:
- the
Orconstraint; non-null - Throws:
InvalidQueryException- if a particular validity test is possible on this method, the implemention chooses to perform that test (and not leave it until later, oncreateQuery(javax.jcr.query.qom.Source, javax.jcr.query.qom.Constraint, javax.jcr.query.qom.Ordering[], javax.jcr.query.qom.Column[])), and the parameters given fail that testRepositoryException- if the operation otherwise fails
-
not
Not not(Constraint constraint) throws InvalidQueryException, RepositoryException
Performs a logical negation of another constraint.- Parameters:
constraint- the constraint to be negated; non-null- Returns:
- the
Notconstraint; non-null - Throws:
InvalidQueryException- if a particular validity test is possible on this method, the implemention chooses to perform that test (and not leave it until later, oncreateQuery(javax.jcr.query.qom.Source, javax.jcr.query.qom.Constraint, javax.jcr.query.qom.Ordering[], javax.jcr.query.qom.Column[])), and the parameters given fail that testRepositoryException- if the operation otherwise fails
-
comparison
Comparison comparison(DynamicOperand operand1, java.lang.String operator, StaticOperand operand2) throws InvalidQueryException, RepositoryException
Filters node-tuples based on the outcome of a binary operation.- Parameters:
operand1- the first operand; non-nulloperator- 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
operand2- the second operand; non-null- Returns:
- the constraint; non-null
- Throws:
InvalidQueryException- if a particular validity test is possible on this method, the implemention chooses to perform that test (and not leave it until later, oncreateQuery(javax.jcr.query.qom.Source, javax.jcr.query.qom.Constraint, javax.jcr.query.qom.Ordering[], javax.jcr.query.qom.Column[])), and the parameters given fail that testRepositoryException- if the operation otherwise fails
-
propertyExistence
PropertyExistence propertyExistence(java.lang.String selectorName, java.lang.String propertyName) throws InvalidQueryException, RepositoryException
Tests the existence of a property in the specified selector.The query is invalid if:
selectoris not the name of a selector in the query, orpropertyis not a syntactically valid JCR name.
- Parameters:
selectorName- the selector name; non-nullpropertyName- the property name; non-null- Returns:
- the constraint; non-null
- Throws:
InvalidQueryException- if a particular validity test is possible on this method, the implemention chooses to perform that test (and not leave it until later, oncreateQuery(javax.jcr.query.qom.Source, javax.jcr.query.qom.Constraint, javax.jcr.query.qom.Ordering[], javax.jcr.query.qom.Column[])), and the parameters given fail that testRepositoryException- if the operation otherwise fails
-
fullTextSearch
FullTextSearch fullTextSearch(java.lang.String selectorName, java.lang.String propertyName, StaticOperand fullTextSearchExpression) throws InvalidQueryException, RepositoryException
Performs a full-text search against the specified selector.The query is invalid if:
selectoris not the name of a selector in the query, orpropertyis specified but is not a syntactically valid JCR name, orfullTextSearchExpressiondoes not evaluate to a JCR STRING Value (or convertible to STRING) that conforms to the full text search grammar.
If
propertyis specified but, for a node-tuple, the selector node does not have a property namedproperty, the query is valid but the constraint is not satisfied.- Parameters:
selectorName- the selector name; non-nullpropertyName- the property name, or null to search all full-text indexed properties of the node (or node subgraph, in some implementations)fullTextSearchExpression- the full-text search expression as a static operand; non-null- Returns:
- the constraint; non-null
- Throws:
InvalidQueryException- if a particular validity test is possible on this method, the implemention chooses to perform that test (and not leave it until later, oncreateQuery(javax.jcr.query.qom.Source, javax.jcr.query.qom.Constraint, javax.jcr.query.qom.Ordering[], javax.jcr.query.qom.Column[])), and the parameters given fail that testRepositoryException- if the operation otherwise fails
-
sameNode
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.The query is invalid if:
selectoris not the name of a selector in the query, orpathis not a syntactically valid absolute path. Note, however, that if the path is syntactically valid but does not identify a node in the repository (or the node is not visible to this session, because of access control constraints), the query is valid but the constraint is not satisfied.
- Parameters:
selectorName- the selector name; non-nullpath- an absolute path; non-null- Returns:
- the constraint; non-null
- Throws:
InvalidQueryException- if a particular validity test is possible on this method, the implemention chooses to perform that test (and not leave it until later, oncreateQuery(javax.jcr.query.qom.Source, javax.jcr.query.qom.Constraint, javax.jcr.query.qom.Ordering[], javax.jcr.query.qom.Column[])), and the parameters given fail that testRepositoryException- if the operation otherwise fails
-
childNode
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. The query is invalid if:selectoris not the name of a selector in the query, orpathis not a syntactically valid absolute path. Note, however, that if the path is syntactically valid but does not identify a node in the repository (or the node is not visible to this session, because of access control constraints), the query is valid but the constraint is not satisfied.
- Parameters:
selectorName- the selector name; non-nullpath- an absolute path; non-null- Returns:
- the constraint; non-null
- Throws:
InvalidQueryException- if a particular validity test is possible on this method, the implemention chooses to perform that test (and not leave it until later, oncreateQuery(javax.jcr.query.qom.Source, javax.jcr.query.qom.Constraint, javax.jcr.query.qom.Ordering[], javax.jcr.query.qom.Column[])), and the parameters given fail that testRepositoryException- if the operation otherwise fails
-
descendantNode
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.The query is invalid if:
selectoris not the name of a selector in the query, orpathis not a syntactically valid absolute path. Note, however, that if the path is syntactically valid but does not identify a node in the repository (or the node is not visible to this session, because of access control constraints), the query is valid but the constraint is not satisfied.
- Parameters:
selectorName- the selector name; non-nullpath- an absolute path; non-null- Returns:
- the constraint; non-null
- Throws:
InvalidQueryException- if a particular validity test is possible on this method, the implemention chooses to perform that test (and not leave it until later, oncreateQuery(javax.jcr.query.qom.Source, javax.jcr.query.qom.Constraint, javax.jcr.query.qom.Ordering[], javax.jcr.query.qom.Column[])), and the parameters given fail that testRepositoryException- if the operation otherwise fails
-
propertyValue
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.The query is invalid if:
selectoris not the name of a selector in the query, orpropertyis not a syntactically valid JCR name.
- Parameters:
selectorName- the selector name; non-nullpropertyName- the property name; non-null- Returns:
- the operand; non-null
- Throws:
InvalidQueryException- if a particular validity test is possible on this method, the implemention chooses to perform that test (and not leave it until later, oncreateQuery(javax.jcr.query.qom.Source, javax.jcr.query.qom.Constraint, javax.jcr.query.qom.Ordering[], javax.jcr.query.qom.Column[])), and the parameters given fail that testRepositoryException- if the operation otherwise fails
-
length
Length length(PropertyValue propertyValue) throws InvalidQueryException, RepositoryException
Evaluates to the length (or lengths, if multi-valued) of a property.- Parameters:
propertyValue- the property value for which to compute the length; non-null- Returns:
- the operand; non-null
- Throws:
InvalidQueryException- if a particular validity test is possible on this method, the implemention chooses to perform that test (and not leave it until later, oncreateQuery(javax.jcr.query.qom.Source, javax.jcr.query.qom.Constraint, javax.jcr.query.qom.Ordering[], javax.jcr.query.qom.Column[])), and the parameters given fail that testRepositoryException- if the operation otherwise fails
-
nodeName
NodeName nodeName(java.lang.String selectorName) throws InvalidQueryException, RepositoryException
Evaluates to aNAMEvalue equal to the prefix-qualified name of a node in the specified selector.The query is invalid if
selectoris not the name of a selector in the query.- Parameters:
selectorName- the selector name; non-null- Returns:
- the operand; non-null
- Throws:
InvalidQueryException- if a particular validity test is possible on this method, the implemention chooses to perform that test (and not leave it until later, oncreateQuery(javax.jcr.query.qom.Source, javax.jcr.query.qom.Constraint, javax.jcr.query.qom.Ordering[], javax.jcr.query.qom.Column[])), and the parameters given fail that testRepositoryException- if the operation otherwise fails
-
nodeLocalName
NodeLocalName nodeLocalName(java.lang.String selectorName) throws InvalidQueryException, RepositoryException
Evaluates to aNAMEvalue equal to the local (unprefixed) name of a node in the specified selector.The query is invalid if
selectoris not the name of a selector in the query.- Parameters:
selectorName- the selector name; non-null- Returns:
- the operand; non-null
- Throws:
InvalidQueryException- if a particular validity test is possible on this method, the implemention chooses to perform that test (and not leave it until later, oncreateQuery(javax.jcr.query.qom.Source, javax.jcr.query.qom.Constraint, javax.jcr.query.qom.Ordering[], javax.jcr.query.qom.Column[])), and the parameters given fail that testRepositoryException- if the operation otherwise fails
-
fullTextSearchScore
FullTextSearchScore fullTextSearchScore(java.lang.String selectorName) throws InvalidQueryException, RepositoryException
Evaluates to aDOUBLEvalue equal to the full-text search score of a node in the specified selector.The query is invalid if
selectoris not the name of a selector in the query.- Parameters:
selectorName- the selector name; non-null- Returns:
- the operand; non-null
- Throws:
InvalidQueryException- if a particular validity test is possible on this method, the implemention chooses to perform that test (and not leave it until later, oncreateQuery(javax.jcr.query.qom.Source, javax.jcr.query.qom.Constraint, javax.jcr.query.qom.Ordering[], javax.jcr.query.qom.Column[])), and the parameters given fail that testRepositoryException- if the operation otherwise fails
-
lowerCase
LowerCase lowerCase(DynamicOperand operand) throws InvalidQueryException, RepositoryException
Evaluates to the lower-case string value (or values, if multi-valued) of an operand.- Parameters:
operand- the operand whose value is converted to a lower-case string; non-null- Returns:
- the operand; non-null
- Throws:
InvalidQueryException- if a particular validity test is possible on this method, the implemention chooses to perform that test (and not leave it until later, oncreateQuery(javax.jcr.query.qom.Source, javax.jcr.query.qom.Constraint, javax.jcr.query.qom.Ordering[], javax.jcr.query.qom.Column[])), and the parameters given fail that testRepositoryException- if the operation otherwise fails
-
upperCase
UpperCase upperCase(DynamicOperand operand) throws InvalidQueryException, RepositoryException
Evaluates to the upper-case string value (or values, if multi-valued) of an operand.- Parameters:
operand- the operand whose value is converted to a upper-case string; non-null- Returns:
- the operand; non-null
- Throws:
InvalidQueryException- if a particular validity test is possible on this method, the implemention chooses to perform that test (and not leave it until later, oncreateQuery(javax.jcr.query.qom.Source, javax.jcr.query.qom.Constraint, javax.jcr.query.qom.Ordering[], javax.jcr.query.qom.Column[])), and the parameters given fail that testRepositoryException- if the operation otherwise fails
-
bindVariable
BindVariableValue bindVariable(java.lang.String bindVariableName) throws InvalidQueryException, RepositoryException
Evaluates to the value of a bind variable.The query is invalid if
bindVariableNameis not a valid JCR prefix.- Parameters:
bindVariableName- the bind variable name; non-null- Returns:
- the operand; non-null
- Throws:
InvalidQueryException- if a particular validity test is possible on this method, the implemention chooses to perform that test (and not leave it until later, oncreateQuery(javax.jcr.query.qom.Source, javax.jcr.query.qom.Constraint, javax.jcr.query.qom.Ordering[], javax.jcr.query.qom.Column[])), and the parameters given fail that test.RepositoryException- if the operation otherwise fails
-
literal
Literal literal(Value literalValue) throws InvalidQueryException, RepositoryException
Evaluates to a literal value.- Parameters:
literalValue- the value- Returns:
- the literal; non-null
- Throws:
InvalidQueryException- if a particular validity test is possible on this method, the implemention chooses to perform that test (and not leave it until later, oncreateQuery(javax.jcr.query.qom.Source, javax.jcr.query.qom.Constraint, javax.jcr.query.qom.Ordering[], javax.jcr.query.qom.Column[])), and the parameter given fails that testRepositoryException- if the operation otherwise fails
-
ascending
Ordering ascending(DynamicOperand operand) throws InvalidQueryException, RepositoryException
Orders by the value of the specified operand, in ascending order. The query is invalid ifoperanddoes not evaluate to a scalar value.- Parameters:
operand- the operand by which to order; non-null- Returns:
- the ordering
- Throws:
InvalidQueryException- if a particular validity test is possible on this method, the implemention chooses to perform that test (and not leave it until later, oncreateQuery(javax.jcr.query.qom.Source, javax.jcr.query.qom.Constraint, javax.jcr.query.qom.Ordering[], javax.jcr.query.qom.Column[])), and the parameters given fail that testRepositoryException- if the operation otherwise fails
-
descending
Ordering descending(DynamicOperand operand) throws InvalidQueryException, RepositoryException
Orders by the value of the specified operand, in descending order. The query is invalid ifoperanddoes not evaluate to a scalar value.- Parameters:
operand- the operand by which to order; non-null- Returns:
- the ordering
- Throws:
InvalidQueryException- if a particular validity test is possible on this method, the implemention chooses to perform that test (and not leave it until later, oncreateQuery(javax.jcr.query.qom.Source, javax.jcr.query.qom.Constraint, javax.jcr.query.qom.Ordering[], javax.jcr.query.qom.Column[])), and the parameters given fail that testRepositoryException- if the operation otherwise fails
-
column
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.The query is invalid if:
selectorNameis not the name of a selector in the query, orpropertyNameis specified but does not evaluate to a scalar value, orpropertyNameis specified butcolumnNameis omitted, orpropertyNameis omitted butcolumnNameis specified, or- the columns
in the tabular view are not uniquely named, whether those column names
are specified by
columnName(ifpropertyNameis specified) or generated as described above (ifpropertyNameis omitted).
propertyNameis specified but, for a node-tuple, the selector node does not have a property namedpropertyName, the query is valid and the column has null value.- 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; must be null ifpropertyNameis null; must be non-null ifpropertyNameis non-null.- Returns:
- the column; non-null
- Throws:
InvalidQueryException- if a particular validity test is possible on this method, the implemention chooses to perform that test (and not leave it until later, oncreateQuery(javax.jcr.query.qom.Source, javax.jcr.query.qom.Constraint, javax.jcr.query.qom.Ordering[], javax.jcr.query.qom.Column[])), and the parameters given fail that testRepositoryException- if the operation otherwise fails
-
-