|
ModeShape Distribution 3.0.0.Beta4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface QueryObjectModelFactory
An extension to the standard JCR QueryObjectModelFactory
interface, with methods to create additional components for
more powerful queries.
Field Summary |
---|
Method Summary | |
---|---|
ArithmeticOperand |
add(DynamicOperand left,
DynamicOperand right)
Create an arithmetic dynamic operand that adds the numeric value of the two supplied operand(s). |
Between |
between(DynamicOperand operand,
StaticOperand lowerBound,
StaticOperand upperBound,
boolean includeLowerBound,
boolean includeUpperBound)
Tests that the value (or values) defined by the supplied dynamic operand are within a specified range. |
QueryObjectModel |
createQuery(SelectQuery command)
Creates a query for a select query command. |
SetQueryObjectModel |
createQuery(SetQuery command)
Creates a set query. |
ArithmeticOperand |
divide(DynamicOperand left,
DynamicOperand right)
Create an arithmetic dynamic operand that divides the numeric value of the first operand by the numeric value of the second. |
SetQuery |
except(QueryCommand left,
QueryCommand right,
Ordering[] orderings,
Limit limit,
boolean all)
Creates a query command that returns all rows that are in the result of the left-hand query but not in the result of the right-hand query. |
SetCriteria |
in(DynamicOperand operand,
StaticOperand... values)
Tests that the value (or values) defined by the supplied dynamic operand are found within the specified set of values. |
SetQuery |
intersect(QueryCommand left,
QueryCommand right,
Ordering[] orderings,
Limit limit,
boolean all)
Creates a query command that returns all rows that are both in the result of the left-hand query and in the result of the right-hand query. |
Limit |
limit(int rowLimit,
int offset)
Evaluates to a limit on the maximum number of tuples in the results and the number of rows that are skipped before the first tuple in the results. |
ArithmeticOperand |
multiply(DynamicOperand left,
DynamicOperand right)
Create an arithmetic dynamic operand that multplies the numeric value of the first operand by the numeric value of the second. |
NodeDepth |
nodeDepth(String selectorName)
Evaluates to a LONG value equal to the depth of a node in the specified selector. |
NodePath |
nodePath(String selectorName)
Evaluates to a PATH value equal to the prefix-qualified path of a node in the specified selector. |
ReferenceValue |
referenceValue(String selectorName)
Creates a dynamic operand that evaluates to the REFERENCE value of the any property on the specified selector. |
ReferenceValue |
referenceValue(String selectorName,
String propertyName)
Creates a dynamic operand that evaluates to the REFERENCE value of the specified property on the specified selector. |
SelectQuery |
select(Source source,
Constraint constraint,
Ordering[] orderings,
Column[] columns,
Limit limit,
boolean isDistinct)
Creates a query with one or more selectors. |
Subquery |
subquery(QueryCommand subqueryCommand)
Creates a subquery that can be used as a StaticOperand in another query. |
ArithmeticOperand |
subtract(DynamicOperand left,
DynamicOperand right)
Create an arithmetic dynamic operand that subtracts the numeric value of the second operand from the numeric value of the first. |
SetQuery |
union(QueryCommand left,
QueryCommand right,
Ordering[] orderings,
Limit limit,
boolean all)
Creates a query command that effectively appends the results of the right-hand query to those of the left-hand query. |
Methods inherited from interface javax.jcr.query.qom.QueryObjectModelFactory |
---|
and, ascending, bindVariable, childNode, childNodeJoinCondition, column, comparison, createQuery, descendantNode, descendantNodeJoinCondition, descending, equiJoinCondition, fullTextSearch, fullTextSearchScore, join, length, literal, lowerCase, nodeLocalName, nodeName, not, or, propertyExistence, propertyValue, sameNode, sameNodeJoinCondition, selector, upperCase |
Method Detail |
---|
SetQueryObjectModel createQuery(SetQuery command) throws InvalidQueryException, RepositoryException
command
- set query; non-null
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.QueryObjectModel createQuery(SelectQuery command) throws InvalidQueryException, RepositoryException
command
- select query; non-null
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.SelectQuery select(Source source, Constraint constraint, Ordering[] orderings, Column[] columns, Limit limit, boolean isDistinct) throws InvalidQueryException, RepositoryException
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 arraylimit
- the limit; null is equivalent to having no limitisDistinct
- true if the query should return distinct values; or false if no duplicate removal should be performed
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.SetQuery union(QueryCommand left, QueryCommand right, Ordering[] orderings, Limit limit, boolean all) throws InvalidQueryException, RepositoryException
left
- the query command that represents left-side of the set operation; non-null and must have columns that are
equivalent and union-able to those of the right-side queryright
- the query command that represents right-side of the set operation; non-null and must have columns that are
equivalent and union-able to those of the left-side queryorderings
- zero or more orderings; null is equivalent to a zero-length arraylimit
- the limit; null is equivalent to having no limitall
- true if duplicate rows in the left- and right-hand side results should be included, or false if duplicate rows
should be eliminated
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.SetQuery intersect(QueryCommand left, QueryCommand right, Ordering[] orderings, Limit limit, boolean all) throws InvalidQueryException, RepositoryException
left
- the query command that represents left-side of the set operation; non-null and must have columns that are
equivalent and union-able to those of the right-side queryright
- the query command that represents right-side of the set operation; non-null and must have columns that are
equivalent and union-able to those of the left-side queryorderings
- zero or more orderings; null is equivalent to a zero-length arraylimit
- the limit; null is equivalent to having no limitall
- true if duplicate rows in the left- and right-hand side results should be included, or false if duplicate rows
should be eliminated
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.SetQuery except(QueryCommand left, QueryCommand right, Ordering[] orderings, Limit limit, boolean all) throws InvalidQueryException, RepositoryException
left
- the query command that represents left-side of the set operation; non-null and must have columns that are
equivalent and union-able to those of the right-side queryright
- the query command that represents right-side of the set operation; non-null and must have columns that are
equivalent and union-able to those of the left-side queryorderings
- zero or more orderings; null is equivalent to a zero-length arraylimit
- the limit; null is equivalent to having no limitall
- true if duplicate rows in the left- and right-hand side results should be included, or false if duplicate rows
should be eliminated
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.NodeDepth nodeDepth(String selectorName) throws InvalidQueryException, RepositoryException
LONG
value equal to the depth of a node in the specified selector.
The query is invalid if selector
is not the name of a selector in the query.
selectorName
- the selector name; non-null
InvalidQueryException
- if a particular validity test is possible on this method, the implemention chooses to perform
that test (and not leave it until later, on createQuery(org.modeshape.jcr.api.query.qom.SetQuery)
), and the parameters given fail that test
RepositoryException
- if the operation otherwise failsNodePath nodePath(String selectorName) throws InvalidQueryException, RepositoryException
PATH
value equal to the prefix-qualified path of a node in the specified selector.
The query is invalid if selector
is not the name of a selector in the query.
selectorName
- the selector name; non-null
InvalidQueryException
- if a particular validity test is possible on this method, the implemention chooses to perform
that test (and not leave it until later, on createQuery(org.modeshape.jcr.api.query.qom.SetQuery)
), and the parameters given fail that test
RepositoryException
- if the operation otherwise failsLimit limit(int rowLimit, int offset) throws InvalidQueryException, RepositoryException
rowLimit
- the maximum number of rows; must be a positive number, or Integer.MAX_VALUE
if there is to be a
non-zero offset but no limitoffset
- the number of rows to skip before beginning the results; must be 0 or a positive number
InvalidQueryException
- if a particular validity test is possible on this method, the implemention chooses to perform
that test (and not leave it until later, on createQuery(org.modeshape.jcr.api.query.qom.SetQuery)
), and the parameters given fail that test
RepositoryException
- if the operation otherwise failsBetween between(DynamicOperand operand, StaticOperand lowerBound, StaticOperand upperBound, boolean includeLowerBound, boolean includeUpperBound) throws InvalidQueryException, RepositoryException
operand
- the dynamic operand describing the values that are to be constrainedlowerBound
- the lower bound of the rangeupperBound
- the upper bound of the rangeincludeLowerBound
- true if the lower boundary value is not be includedincludeUpperBound
- true if the upper boundary value is not be included
InvalidQueryException
- if a particular validity test is possible on this method, the implemention chooses to perform
that test (and not leave it until later, on createQuery(org.modeshape.jcr.api.query.qom.SetQuery)
), and the parameters given fail that test
RepositoryException
- if the operation otherwise failsSetCriteria in(DynamicOperand operand, StaticOperand... values) throws InvalidQueryException, RepositoryException
operand
- the dynamic operand describing the values that are to be constrainedvalues
- the static operand values; may not be null or empty
InvalidQueryException
- if a particular validity test is possible on this method, the implemention chooses to perform
that test (and not leave it until later, on createQuery(org.modeshape.jcr.api.query.qom.SetQuery)
), and the parameters given fail that test
RepositoryException
- if the operation otherwise failsSubquery subquery(QueryCommand subqueryCommand) throws InvalidQueryException, RepositoryException
StaticOperand
in another query.
subqueryCommand
- the query command that is to be used as the subquery
InvalidQueryException
- if a particular validity test is possible on this method, the implemention chooses to perform
that test (and not leave it until later, on createQuery(org.modeshape.jcr.api.query.qom.SetQuery)
), and the parameters given fail that test
RepositoryException
- if the operation otherwise failsArithmeticOperand add(DynamicOperand left, DynamicOperand right) throws InvalidQueryException, RepositoryException
left
- the left-hand-side operand; not nullright
- the right-hand-side operand; not null
InvalidQueryException
- if a particular validity test is possible on this method, the implemention chooses to perform
that test (and not leave it until later, on createQuery(org.modeshape.jcr.api.query.qom.SetQuery)
), and the parameters given fail that test
RepositoryException
- if the operation otherwise failsArithmeticOperand subtract(DynamicOperand left, DynamicOperand right) throws InvalidQueryException, RepositoryException
left
- the left-hand-side operand; not nullright
- the right-hand-side operand; not null
InvalidQueryException
- if a particular validity test is possible on this method, the implemention chooses to perform
that test (and not leave it until later, on createQuery(org.modeshape.jcr.api.query.qom.SetQuery)
), and the parameters given fail that test
RepositoryException
- if the operation otherwise failsArithmeticOperand multiply(DynamicOperand left, DynamicOperand right) throws InvalidQueryException, RepositoryException
left
- the left-hand-side operand; not nullright
- the right-hand-side operand; not null
InvalidQueryException
- if a particular validity test is possible on this method, the implemention chooses to perform
that test (and not leave it until later, on createQuery(org.modeshape.jcr.api.query.qom.SetQuery)
), and the parameters given fail that test
RepositoryException
- if the operation otherwise failsArithmeticOperand divide(DynamicOperand left, DynamicOperand right) throws InvalidQueryException, RepositoryException
left
- the left-hand-side operand; not nullright
- the right-hand-side operand; not null
InvalidQueryException
- if a particular validity test is possible on this method, the implemention chooses to perform
that test (and not leave it until later, on createQuery(org.modeshape.jcr.api.query.qom.SetQuery)
), and the parameters given fail that test
RepositoryException
- if the operation otherwise failsReferenceValue referenceValue(String selectorName) throws InvalidQueryException, RepositoryException
The query is invalid if:
selector
is not the name of a selector in the query, orproperty
is not a syntactically valid JCR name.
selectorName
- the selector name; non-null
InvalidQueryException
- if a particular validity test is possible on this method, the implemention chooses to perform
that test (and not leave it until later, on createQuery(org.modeshape.jcr.api.query.qom.SetQuery)
), and the parameters given fail that test
RepositoryException
- if the operation otherwise failsReferenceValue referenceValue(String selectorName, String propertyName) throws InvalidQueryException, RepositoryException
The query is invalid if:
selector
is not the name of a selector in the query, orproperty
is not a syntactically valid JCR name.
selectorName
- the selector name; non-nullpropertyName
- the reference property name; non-null
InvalidQueryException
- if a particular validity test is possible on this method, the implemention chooses to perform
that test (and not leave it until later, on createQuery(org.modeshape.jcr.api.query.qom.SetQuery)
), and the parameters given fail that test
RepositoryException
- if the operation otherwise fails
|
ModeShape Distribution 3.0.0.Beta4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |