public class RelationQueryNode extends NAryQueryNode<QueryNode> implements QueryConstants
Modifier and Type | Field and Description |
---|---|
static Name |
STAR_NAME_TEST
Acts as an synthetic placeholder for a location step that matches any
name.
|
TYPE_AND, TYPE_DEREF, TYPE_EXACT, TYPE_LOCATION, TYPE_NODETYPE, TYPE_NOT, TYPE_OR, TYPE_ORDER, TYPE_PATH, TYPE_PROP_FUNCTION, TYPE_RELATION, TYPE_ROOT, TYPE_TEXTSEARCH
OP_NAME_BETWEEN, OP_NAME_EQ_GENERAL, OP_NAME_EQ_VALUE, OP_NAME_GE_GENERAL, OP_NAME_GE_VALUE, OP_NAME_GT_GENERAL, OP_NAME_GT_VALUE, OP_NAME_IN, OP_NAME_LE_GENERAL, OP_NAME_LE_VALUE, OP_NAME_LIKE, OP_NAME_LT_GENERAL, OP_NAME_LT_VALUE, OP_NAME_NE_GENERAL, OP_NAME_NE_VALUE, OP_NAME_NOT_NULL, OP_NAME_NULL, OP_NAME_SIMILAR, OP_NAME_SPELLCHECK, OP_NAME_UNKNOW, OPERATION_BETWEEN, OPERATION_EQ_GENERAL, OPERATION_EQ_VALUE, OPERATION_GE_GENERAL, OPERATION_GE_VALUE, OPERATION_GT_GENERAL, OPERATION_GT_VALUE, OPERATION_IN, OPERATION_LE_GENERAL, OPERATION_LE_VALUE, OPERATION_LIKE, OPERATION_LT_GENERAL, OPERATION_LT_VALUE, OPERATION_NAMES, OPERATION_NE_GENERAL, OPERATION_NE_VALUE, OPERATION_NOT_NULL, OPERATION_NULL, OPERATION_SIMILAR, OPERATION_SPELLCHECK, OPERATIONS, TYPE_DATE, TYPE_DOUBLE, TYPE_LONG, TYPE_NAME_DATE, TYPE_NAME_DOUBLE, TYPE_NAME_LONG, TYPE_NAME_POSITION, TYPE_NAME_STRING, TYPE_NAME_TIMESTAMP, TYPE_NAME_UNKNOWN, TYPE_NAMES, TYPE_POSITION, TYPE_STRING, TYPE_TIMESTAMP
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
accept(QueryNodeVisitor visitor,
java.lang.Object data)
Accepts a
QueryNodeVisitor and calls the appropriate visit
method on the visitor depending on the concrete implementation of
this QueryNode . |
void |
addPathElement(Path.Element element)
Adds a path element to the existing relative path.
|
boolean |
equals(java.lang.Object obj)
Returns
true if obj is the same type of
QueryNode as this node and is equal to
this node. |
java.util.Date |
getDateValue()
Returns the
Date value if this relation if of type
QueryConstants.TYPE_DATE . |
double |
getDoubleValue()
Returns the
double value if this relation if of type
QueryConstants.TYPE_DOUBLE . |
long |
getLongValue()
Returns the
long value if this relation if of type
QueryConstants.TYPE_LONG . |
int |
getOperation()
Returns the operation type.
|
int |
getPositionValue()
Returns the
int position index value if this relation is
of type QueryConstants.TYPE_POSITION . |
PathQueryNode |
getRelativePath() |
java.lang.String |
getStringValue()
Returns the
String value if this relation if of type
QueryConstants.TYPE_STRING . |
int |
getType()
Returns the type of this node.
|
int |
getValueType()
Returns the type of the value.
|
void |
setDateValue(java.util.Date value)
Sets a new value of type
Date . |
void |
setDoubleValue(double value)
Sets a new value of type
double . |
void |
setLongValue(long value)
Sets a new value of type
long . |
void |
setPositionValue(int value)
Sets a new value for the position index.
|
void |
setRelativePath(Path relPath)
Sets the relative path to the property in this relation.
|
void |
setStringValue(java.lang.String value)
Sets a new value of type
String . |
void |
setUnaryMinus(boolean b)
If
b is true then the value in this relation
node contains a receding unary minus. |
acceptOperands, addOperand, getNumOperands, getOperands, needsSystemTree, removeOperand
public static final Name STAR_NAME_TEST
public java.lang.Object accept(QueryNodeVisitor visitor, java.lang.Object data) throws RepositoryException
QueryNodeVisitor
and calls the appropriate visit
method on the visitor depending on the concrete implementation of
this QueryNode
.public int getType()
public void setUnaryMinus(boolean b)
b
is true
then the value in this relation
node contains a receding unary minus.b
- true
if this relation contains a unary minus.public int getValueType()
public PathQueryNode getRelativePath()
public void setRelativePath(Path relPath)
relPath
- the relative path to a property.java.lang.IllegalArgumentException
- if relPath
is absolute.public void addPathElement(Path.Element element)
STAR_NAME_TEST
.element
- the path element to append.public long getLongValue()
long
value if this relation if of type
QueryConstants.TYPE_LONG
.long
value.public void setLongValue(long value)
long
.value
- the new value.public int getPositionValue()
int
position index value if this relation is
of type QueryConstants.TYPE_POSITION
.public void setPositionValue(int value)
value
- the new value.public double getDoubleValue()
double
value if this relation if of type
QueryConstants.TYPE_DOUBLE
.double
value.public void setDoubleValue(double value)
double
.value
- the new value.public java.lang.String getStringValue()
String
value if this relation if of type
QueryConstants.TYPE_STRING
.String
value.public void setStringValue(java.lang.String value)
String
.value
- the new value.public java.util.Date getDateValue()
Date
value if this relation if of type
QueryConstants.TYPE_DATE
.Date
value.public void setDateValue(java.util.Date value)
Date
.value
- the new value.public int getOperation()
public boolean equals(java.lang.Object obj)
true
if obj
is the same type of
QueryNode
as this
node and is equal to
this
node.equals
in class NAryQueryNode<QueryNode>
obj
- the reference object with which to compare.true
if obj
is equal to
this
; false
otherwise."Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"