public class QueryBuilder.ConstraintBuilder extends Object implements QueryBuilder.DynamicOperandBuilder
Modifier | Constructor and Description |
---|---|
protected |
ConstraintBuilder(QueryBuilder.ConstraintBuilder parent) |
Modifier and Type | Method and Description |
---|---|
QueryBuilder.ConstraintBuilder |
and()
Signal that the previous constraint clause be AND-ed together with another constraint clause that will be defined
immediately after this method call.
|
protected QueryBuilder.ConstraintBuilder |
buildLogicalConstraint() |
QueryBuilder.ComparisonBuilder |
childCount(String table)
Constrains the nodes in the the supplied table based upon criteria on the node's number of children.
|
QueryBuilder.ConstraintBuilder |
closeParen()
Complete the specification of a constraint clause, and return the builder for the parent constraint clause.
|
protected QueryBuilder.ComparisonBuilder |
comparisonBuilder(DynamicOperand operand) |
QueryBuilder.ComparisonBuilder |
depth(String table)
Constrains the nodes in the the supplied table based upon criteria on the node's depth.
|
QueryBuilder |
end()
Complete this constraint specification.
|
QueryBuilder.ComparisonBuilder |
fullTextSearchScore(String table)
Constrains the nodes in the the supplied table such that they must satisfy the supplied full-text search on the nodes'
property values.
|
QueryBuilder.ConstraintBuilder |
hasProperty(String table,
String propertyName)
Define a constraint clause that the node within the named table has at least one value for the named property.
|
QueryBuilder.ConstraintBuilder |
isBelowPath(String descendantTable,
String ancestorPath)
Define a constraint clause that the node within the named table is a descendant of the node at the supplied path.
|
QueryBuilder.ConstraintBuilder |
isChild(String childTable,
String parentPath)
Define a constraint clause that the node within the named table is the child of the node at the supplied path.
|
QueryBuilder.ConstraintBuilder |
isSameNode(String table,
String asNodeAtPath)
Define a constraint clause that the node within the named table is the same node as that appearing at the supplied
path.
|
QueryBuilder.ComparisonBuilder |
length(String table,
String property)
Constrains the nodes in the the supplied table such that they must have a property value whose length matches the
criteria.
|
QueryBuilder.DynamicOperandBuilder |
lowerCaseOf()
Begin a constraint against the lowercase form of a dynamic operand.
|
QueryBuilder.ComparisonBuilder |
nodeLocalName(String table)
Constrains the nodes in the the supplied table based upon criteria on the node's local name.
|
QueryBuilder.ComparisonBuilder |
nodeName(String table)
Constrains the nodes in the the supplied table based upon criteria on the node's name.
|
QueryBuilder.ConstraintBuilder |
not()
Signal that the next constraint clause (defined immediately after this method) should be negated.
|
QueryBuilder.ConstraintBuilder |
openParen()
Simulate the use of an open parenthesis in the constraint.
|
QueryBuilder.ConstraintBuilder |
or()
Signal that the previous constraint clause be OR-ed together with another constraint clause that will be defined
immediately after this method call.
|
QueryBuilder.ComparisonBuilder |
path(String table)
Constrains the nodes in the the supplied table based upon criteria on the node's path.
|
QueryBuilder.ComparisonBuilder |
propertyValue(String table,
String property)
Constrains the nodes in the the supplied table such that they must have a matching value for the named property.
|
QueryBuilder.ComparisonBuilder |
referenceValue(String table)
Constrains the nodes in the the supplied table such that they must have a matching value for any of the node's
reference properties.
|
QueryBuilder.ComparisonBuilder |
referenceValue(String table,
String property)
Constrains the nodes in the the supplied table such that they must have a matching value for the named property.
|
QueryBuilder.ConstraintBuilder |
search(String table,
String searchExpression)
Define a constraint clause that the node within the named table have at least one property that satisfies the full-text
search expression.
|
QueryBuilder.ConstraintBuilder |
search(String table,
String propertyName,
String searchExpression)
Define a constraint clause that the node within the named table have a value for the named property that satisfies the
full-text search expression.
|
protected QueryBuilder.ConstraintBuilder |
setConstraint(Constraint constraint) |
QueryBuilder.ComparisonBuilder |
strongReferenceValue(String table)
Constrains the nodes in the the supplied table such that they must have a matching value for any of the node's non-weak
reference properties.
|
QueryBuilder.DynamicOperandBuilder |
upperCaseOf()
Begin a constraint against the uppercase form of a dynamic operand.
|
protected ConstraintBuilder(QueryBuilder.ConstraintBuilder parent)
public QueryBuilder end()
public QueryBuilder.ConstraintBuilder openParen()
closeParen()
.closeParen()
public QueryBuilder.ConstraintBuilder closeParen()
IllegalStateException
- if there was not an open parenthesis
to closepublic QueryBuilder.ConstraintBuilder and()
public QueryBuilder.ConstraintBuilder or()
public QueryBuilder.ConstraintBuilder not()
protected QueryBuilder.ConstraintBuilder buildLogicalConstraint()
public QueryBuilder.ConstraintBuilder isSameNode(String table, String asNodeAtPath)
table
- the name of the table; may not be null and must refer to a valid name or alias of a table appearing in the
FROM clauseasNodeAtPath
- the path to the nodepublic QueryBuilder.ConstraintBuilder isChild(String childTable, String parentPath)
childTable
- the name of the table; may not be null and must refer to a valid name or alias of a table appearing
in the FROM clauseparentPath
- the path to the parent nodepublic QueryBuilder.ConstraintBuilder isBelowPath(String descendantTable, String ancestorPath)
descendantTable
- the name of the table; may not be null and must refer to a valid name or alias of a table
appearing in the FROM clauseancestorPath
- the path to the ancestor nodepublic QueryBuilder.ConstraintBuilder hasProperty(String table, String propertyName)
table
- the name of the table; may not be null and must refer to a valid name or alias of a table appearing in the
FROM clausepropertyName
- the name of the propertypublic QueryBuilder.ConstraintBuilder search(String table, String searchExpression)
table
- the name of the table; may not be null and must refer to a valid name or alias of a table appearing in the
FROM clausesearchExpression
- the full-text search expressionpublic QueryBuilder.ConstraintBuilder search(String table, String propertyName, String searchExpression)
table
- the name of the table; may not be null and must refer to a valid name or alias of a table appearing in the
FROM clausepropertyName
- the name of the property to be searchedsearchExpression
- the full-text search expressionprotected QueryBuilder.ComparisonBuilder comparisonBuilder(DynamicOperand operand)
public QueryBuilder.ComparisonBuilder length(String table, String property)
QueryBuilder.DynamicOperandBuilder
length
in interface QueryBuilder.DynamicOperandBuilder
table
- the name of the table; may not be null and must refer to a valid name or alias of a table appearing in the
FROM clauseproperty
- the name of the property; may not be null and must refer to a valid property namepublic QueryBuilder.ComparisonBuilder propertyValue(String table, String property)
QueryBuilder.DynamicOperandBuilder
propertyValue
in interface QueryBuilder.DynamicOperandBuilder
table
- the name of the table; may not be null and must refer to a valid name or alias of a table appearing in the
FROM clauseproperty
- the name of the property; may not be null and must refer to a valid property namepublic QueryBuilder.ComparisonBuilder strongReferenceValue(String table)
QueryBuilder.DynamicOperandBuilder
strongReferenceValue
in interface QueryBuilder.DynamicOperandBuilder
table
- the name of the table; may not be null and must refer to a valid name or alias of a table appearing in the
FROM clausepublic QueryBuilder.ComparisonBuilder referenceValue(String table)
QueryBuilder.DynamicOperandBuilder
referenceValue
in interface QueryBuilder.DynamicOperandBuilder
table
- the name of the table; may not be null and must refer to a valid name or alias of a table appearing in the
FROM clausepublic QueryBuilder.ComparisonBuilder referenceValue(String table, String property)
QueryBuilder.DynamicOperandBuilder
referenceValue
in interface QueryBuilder.DynamicOperandBuilder
table
- the name of the table; may not be null and must refer to a valid name or alias of a table appearing in the
FROM clauseproperty
- the name of the reference property; may be null if the constraint applies to all/any reference
properties on the nodepublic QueryBuilder.ComparisonBuilder fullTextSearchScore(String table)
QueryBuilder.DynamicOperandBuilder
fullTextSearchScore
in interface QueryBuilder.DynamicOperandBuilder
table
- the name of the table; may not be null and must refer to a valid name or alias of a table appearing in the
FROM clausepublic QueryBuilder.ComparisonBuilder childCount(String table)
QueryBuilder.DynamicOperandBuilder
childCount
in interface QueryBuilder.DynamicOperandBuilder
table
- the name of the table; may not be null and must refer to a valid name or alias of a table appearing in the
FROM clausepublic QueryBuilder.ComparisonBuilder depth(String table)
QueryBuilder.DynamicOperandBuilder
depth
in interface QueryBuilder.DynamicOperandBuilder
table
- the name of the table; may not be null and must refer to a valid name or alias of a table appearing in the
FROM clausepublic QueryBuilder.ComparisonBuilder path(String table)
QueryBuilder.DynamicOperandBuilder
path
in interface QueryBuilder.DynamicOperandBuilder
table
- the name of the table; may not be null and must refer to a valid name or alias of a table appearing in the
FROM clausepublic QueryBuilder.ComparisonBuilder nodeLocalName(String table)
QueryBuilder.DynamicOperandBuilder
nodeLocalName
in interface QueryBuilder.DynamicOperandBuilder
table
- the name of the table; may not be null and must refer to a valid name or alias of a table appearing in the
FROM clausepublic QueryBuilder.ComparisonBuilder nodeName(String table)
QueryBuilder.DynamicOperandBuilder
nodeName
in interface QueryBuilder.DynamicOperandBuilder
table
- the name of the table; may not be null and must refer to a valid name or alias of a table appearing in the
FROM clausepublic QueryBuilder.DynamicOperandBuilder upperCaseOf()
QueryBuilder.DynamicOperandBuilder
upperCaseOf
in interface QueryBuilder.DynamicOperandBuilder
public QueryBuilder.DynamicOperandBuilder lowerCaseOf()
QueryBuilder.DynamicOperandBuilder
lowerCaseOf
in interface QueryBuilder.DynamicOperandBuilder
protected QueryBuilder.ConstraintBuilder setConstraint(Constraint constraint)
Copyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.