|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.modeshape.jcr.query.qom.JcrQueryObjectModelFactory
public class JcrQueryObjectModelFactory
An implementation of the JCR QueryObjectModelFactory
. Note that this implementation constructs the query components but
does not validate any of the parameters or the resulting query definition. All validation is performed when the query is
executed
.
Field Summary | |
---|---|
static String |
LANGUAGE
|
Constructor Summary | |
---|---|
JcrQueryObjectModelFactory(JcrQueryContext context)
|
Method Summary | |
---|---|
ArithmeticOperand |
add(DynamicOperand left,
DynamicOperand right)
Create an arithmetic dynamic operand that adds the numeric value of the two supplied operand(s). |
And |
and(Constraint constraint1,
Constraint constraint2)
|
ArithmeticOperand |
arithmeticOperand(DynamicOperand left,
ArithmeticOperator operator,
DynamicOperand right)
|
JcrOrdering |
ascending(DynamicOperand operand)
|
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. |
BindVariableValue |
bindVariable(String bindVariableName)
|
ChildNode |
childNode(String selectorName,
String path)
|
ChildNodeJoinCondition |
childNodeJoinCondition(String childSelectorName,
String parentSelectorName)
|
JcrColumn |
column(String selectorName,
String propertyName,
String columnName)
|
Comparison |
comparison(DynamicOperand operand1,
String operator,
StaticOperand operand2)
|
JcrQueryObjectModel |
createQuery(Source source,
Constraint constraint,
Ordering[] orderings,
Column[] columns)
|
DescendantNode |
descendantNode(String selectorName,
String path)
|
DescendantNodeJoinCondition |
descendantNodeJoinCondition(String descendantSelectorName,
String ancestorSelectorName)
|
JcrOrdering |
descending(DynamicOperand operand)
|
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. |
EquiJoinCondition |
equiJoinCondition(String selector1Name,
String property1Name,
String selector2Name,
String property2Name)
|
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. |
FullTextSearch |
fullTextSearch(String selectorName,
String propertyName,
StaticOperand fullTextSearchExpression)
|
FullTextSearchScore |
fullTextSearchScore(String selectorName)
|
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. |
Join |
join(Source left,
Source right,
String joinType,
JoinCondition joinCondition)
|
Length |
length(PropertyValue propertyValue)
|
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. |
Literal |
literal(Value literalValue)
|
LowerCase |
lowerCase(DynamicOperand operand)
|
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. |
NodeLocalName |
nodeLocalName(String selectorName)
|
NodeName |
nodeName(String selectorName)
|
NodePath |
nodePath(String selectorName)
Evaluates to a PATH value equal to the prefix-qualified path of a node in the specified selector. |
Not |
not(Constraint constraint)
|
Or |
or(Constraint constraint1,
Constraint constraint2)
|
PropertyExistence |
propertyExistence(String selectorName,
String propertyName)
|
PropertyValue |
propertyValue(String selectorName,
String propertyName)
|
JcrReferenceValue |
referenceValue(String selectorName)
Creates a dynamic operand that evaluates to the REFERENCE value of the any property on the specified selector. |
JcrReferenceValue |
referenceValue(String selectorName,
String propertyName)
Creates a dynamic operand that evaluates to the REFERENCE value of the specified property on the specified selector. |
SameNode |
sameNode(String selectorName,
String path)
|
SameNodeJoinCondition |
sameNodeJoinCondition(String selector1Name,
String selector2Name,
String selector2Path)
|
JcrSelectQuery |
select(Source source,
Constraint constraint,
Ordering[] orderings,
Column[] columns,
Limit limit,
boolean distinct)
Creates a query with one or more selectors. |
JcrNamedSelector |
selector(String nodeTypeName,
String selectorName)
|
protected SelectorName |
selectorName(String name)
|
JcrSetQuery |
setQuery(QueryCommand left,
SetQuery.Operation operation,
QueryCommand right,
Ordering[] orderings,
Limit limit,
boolean all)
|
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. |
UpperCase |
upperCase(DynamicOperand operand)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String LANGUAGE
Constructor Detail |
---|
public JcrQueryObjectModelFactory(JcrQueryContext context)
Method Detail |
---|
protected SelectorName selectorName(String name)
public JcrQueryObjectModel createQuery(Source source, Constraint constraint, Ordering[] orderings, Column[] columns)
createQuery
in interface QueryObjectModelFactory
QueryObjectModelFactory.createQuery(javax.jcr.query.qom.Source, javax.jcr.query.qom.Constraint,
javax.jcr.query.qom.Ordering[], javax.jcr.query.qom.Column[])
public JcrSelectQuery select(Source source, Constraint constraint, Ordering[] orderings, Column[] columns, Limit limit, boolean distinct)
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 limitdistinct
- true if the query should return distinct values; or false if no duplicate removal should be performed
QueryObjectModelFactory.select(javax.jcr.query.qom.Source,
javax.jcr.query.qom.Constraint, javax.jcr.query.qom.Ordering[], javax.jcr.query.qom.Column[],
org.modeshape.jcr.api.query.qom.Limit, boolean)
public SetQuery union(QueryCommand left, QueryCommand right, Ordering[] orderings, Limit limit, boolean all)
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
QueryObjectModelFactory.union(QueryCommand, QueryCommand, Ordering[], Limit, boolean)
public SetQuery intersect(QueryCommand left, QueryCommand right, Ordering[] orderings, Limit limit, boolean all)
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
QueryObjectModelFactory.intersect(org.modeshape.jcr.api.query.qom.QueryCommand,
org.modeshape.jcr.api.query.qom.QueryCommand, javax.jcr.query.qom.Ordering[], org.modeshape.jcr.api.query.qom.Limit,
boolean)
public SetQuery except(QueryCommand left, QueryCommand right, Ordering[] orderings, Limit limit, boolean all)
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
QueryObjectModelFactory.except(org.modeshape.jcr.api.query.qom.QueryCommand,
org.modeshape.jcr.api.query.qom.QueryCommand, javax.jcr.query.qom.Ordering[], org.modeshape.jcr.api.query.qom.Limit,
boolean)
public JcrSetQuery setQuery(QueryCommand left, SetQuery.Operation operation, QueryCommand right, Ordering[] orderings, Limit limit, boolean all)
public JcrNamedSelector selector(String nodeTypeName, String selectorName)
selector
in interface QueryObjectModelFactory
QueryObjectModelFactory.selector(java.lang.String, java.lang.String)
public JcrColumn column(String selectorName, String propertyName, String columnName)
column
in interface QueryObjectModelFactory
QueryObjectModelFactory.column(java.lang.String, java.lang.String, java.lang.String)
public JcrOrdering ascending(DynamicOperand operand)
ascending
in interface QueryObjectModelFactory
QueryObjectModelFactory.ascending(javax.jcr.query.qom.DynamicOperand)
public JcrOrdering descending(DynamicOperand operand)
descending
in interface QueryObjectModelFactory
QueryObjectModelFactory.descending(javax.jcr.query.qom.DynamicOperand)
public And and(Constraint constraint1, Constraint constraint2)
and
in interface QueryObjectModelFactory
QueryObjectModelFactory.and(javax.jcr.query.qom.Constraint, javax.jcr.query.qom.Constraint)
public BindVariableValue bindVariable(String bindVariableName)
bindVariable
in interface QueryObjectModelFactory
QueryObjectModelFactory.bindVariable(java.lang.String)
public ChildNode childNode(String selectorName, String path)
childNode
in interface QueryObjectModelFactory
QueryObjectModelFactory.childNode(java.lang.String, java.lang.String)
public ChildNodeJoinCondition childNodeJoinCondition(String childSelectorName, String parentSelectorName)
childNodeJoinCondition
in interface QueryObjectModelFactory
QueryObjectModelFactory.childNodeJoinCondition(java.lang.String, java.lang.String)
public Comparison comparison(DynamicOperand operand1, String operator, StaticOperand operand2)
comparison
in interface QueryObjectModelFactory
QueryObjectModelFactory.comparison(javax.jcr.query.qom.DynamicOperand, java.lang.String,
javax.jcr.query.qom.StaticOperand)
public DescendantNode descendantNode(String selectorName, String path)
descendantNode
in interface QueryObjectModelFactory
QueryObjectModelFactory.descendantNode(java.lang.String, java.lang.String)
public DescendantNodeJoinCondition descendantNodeJoinCondition(String descendantSelectorName, String ancestorSelectorName)
descendantNodeJoinCondition
in interface QueryObjectModelFactory
QueryObjectModelFactory.descendantNodeJoinCondition(java.lang.String, java.lang.String)
public EquiJoinCondition equiJoinCondition(String selector1Name, String property1Name, String selector2Name, String property2Name)
equiJoinCondition
in interface QueryObjectModelFactory
QueryObjectModelFactory.equiJoinCondition(java.lang.String, java.lang.String, java.lang.String,
java.lang.String)
public FullTextSearch fullTextSearch(String selectorName, String propertyName, StaticOperand fullTextSearchExpression) throws RepositoryException
fullTextSearch
in interface QueryObjectModelFactory
RepositoryException
QueryObjectModelFactory.fullTextSearch(java.lang.String, java.lang.String,
javax.jcr.query.qom.StaticOperand)
public FullTextSearchScore fullTextSearchScore(String selectorName)
fullTextSearchScore
in interface QueryObjectModelFactory
QueryObjectModelFactory.fullTextSearchScore(java.lang.String)
public Join join(Source left, Source right, String joinType, JoinCondition joinCondition)
join
in interface QueryObjectModelFactory
QueryObjectModelFactory.join(javax.jcr.query.qom.Source, javax.jcr.query.qom.Source,
java.lang.String, javax.jcr.query.qom.JoinCondition)
public Length length(PropertyValue propertyValue)
length
in interface QueryObjectModelFactory
QueryObjectModelFactory.length(javax.jcr.query.qom.PropertyValue)
public Literal literal(Value literalValue) throws RepositoryException
literal
in interface QueryObjectModelFactory
RepositoryException
QueryObjectModelFactory.literal(javax.jcr.Value)
public LowerCase lowerCase(DynamicOperand operand)
lowerCase
in interface QueryObjectModelFactory
QueryObjectModelFactory.lowerCase(javax.jcr.query.qom.DynamicOperand)
public NodeLocalName nodeLocalName(String selectorName)
nodeLocalName
in interface QueryObjectModelFactory
QueryObjectModelFactory.nodeLocalName(java.lang.String)
public NodeName nodeName(String selectorName)
nodeName
in interface QueryObjectModelFactory
QueryObjectModelFactory.nodeName(java.lang.String)
public Not not(Constraint constraint)
not
in interface QueryObjectModelFactory
QueryObjectModelFactory.not(javax.jcr.query.qom.Constraint)
public Or or(Constraint constraint1, Constraint constraint2)
or
in interface QueryObjectModelFactory
QueryObjectModelFactory.or(javax.jcr.query.qom.Constraint, javax.jcr.query.qom.Constraint)
public PropertyExistence propertyExistence(String selectorName, String propertyName)
propertyExistence
in interface QueryObjectModelFactory
QueryObjectModelFactory.propertyExistence(java.lang.String, java.lang.String)
public PropertyValue propertyValue(String selectorName, String propertyName)
propertyValue
in interface QueryObjectModelFactory
QueryObjectModelFactory.propertyValue(java.lang.String, java.lang.String)
public SameNode sameNode(String selectorName, String path)
sameNode
in interface QueryObjectModelFactory
QueryObjectModelFactory.sameNode(java.lang.String, java.lang.String)
public SameNodeJoinCondition sameNodeJoinCondition(String selector1Name, String selector2Name, String selector2Path)
sameNodeJoinCondition
in interface QueryObjectModelFactory
QueryObjectModelFactory.sameNodeJoinCondition(java.lang.String, java.lang.String,
java.lang.String)
public UpperCase upperCase(DynamicOperand operand)
upperCase
in interface QueryObjectModelFactory
QueryObjectModelFactory.upperCase(javax.jcr.query.qom.DynamicOperand)
public NodePath nodePath(String selectorName)
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
QueryObjectModelFactory.nodePath(java.lang.String)
public NodeDepth nodeDepth(String selectorName)
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
QueryObjectModelFactory.nodeDepth(java.lang.String)
public Limit limit(int rowLimit, int offset)
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
QueryObjectModelFactory.limit(int, int)
public Between between(DynamicOperand operand, StaticOperand lowerBound, StaticOperand upperBound, boolean includeLowerBound, boolean includeUpperBound)
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
QueryObjectModelFactory.between(javax.jcr.query.qom.DynamicOperand,
javax.jcr.query.qom.StaticOperand, javax.jcr.query.qom.StaticOperand, boolean, boolean)
public SetCriteria in(DynamicOperand operand, StaticOperand... values)
operand
- the dynamic operand describing the values that are to be constrainedvalues
- the static operand values; may not be null or empty
QueryObjectModelFactory.in(javax.jcr.query.qom.DynamicOperand,
javax.jcr.query.qom.StaticOperand[])
public Subquery subquery(QueryCommand subqueryCommand)
StaticOperand
in another query.
subqueryCommand
- the query command that is to be used as the subquery
QueryObjectModelFactory.subquery(org.modeshape.jcr.api.query.qom.QueryCommand)
public ArithmeticOperand add(DynamicOperand left, DynamicOperand right)
left
- the left-hand-side operand; not nullright
- the right-hand-side operand; not null
QueryObjectModelFactory.add(javax.jcr.query.qom.DynamicOperand,
javax.jcr.query.qom.DynamicOperand)
public ArithmeticOperand subtract(DynamicOperand left, DynamicOperand right)
left
- the left-hand-side operand; not nullright
- the right-hand-side operand; not null
QueryObjectModelFactory.subtract(javax.jcr.query.qom.DynamicOperand,
javax.jcr.query.qom.DynamicOperand)
public ArithmeticOperand multiply(DynamicOperand left, DynamicOperand right)
left
- the left-hand-side operand; not nullright
- the right-hand-side operand; not null
QueryObjectModelFactory.multiply(javax.jcr.query.qom.DynamicOperand,
javax.jcr.query.qom.DynamicOperand)
public ArithmeticOperand divide(DynamicOperand left, DynamicOperand right)
left
- the left-hand-side operand; not nullright
- the right-hand-side operand; not null
QueryObjectModelFactory.divide(javax.jcr.query.qom.DynamicOperand,
javax.jcr.query.qom.DynamicOperand)
public ArithmeticOperand arithmeticOperand(DynamicOperand left, ArithmeticOperator operator, DynamicOperand right)
public JcrReferenceValue referenceValue(String selectorName)
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
QueryObjectModelFactory.referenceValue(java.lang.String)
public JcrReferenceValue referenceValue(String selectorName, String propertyName)
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
QueryObjectModelFactory.referenceValue(java.lang.String, java.lang.String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |