|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.core.query.QueryNode
org.apache.jackrabbit.core.query.NAryQueryNode
org.apache.jackrabbit.core.query.RelationQueryNode
public class RelationQueryNode
Implements a query node that defines property value relation.
| Field Summary | |
|---|---|
static QName |
STAR_NAME_TEST
Acts as an syntetic placeholder for a location step that matches any name. |
| Fields inherited from class org.apache.jackrabbit.core.query.NAryQueryNode |
|---|
operands |
| Fields inherited from class org.apache.jackrabbit.core.query.QueryNode |
|---|
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 |
| Fields inherited from interface org.apache.jackrabbit.core.query.QueryConstants |
|---|
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_NE_GENERAL, OPERATION_NE_VALUE, OPERATION_NOT_NULL, OPERATION_NULL, OPERATIONS, TYPE_DATE, TYPE_DOUBLE, TYPE_LONG, TYPE_POSITION, TYPE_STRING, TYPE_TIMESTAMP |
| Constructor Summary | |
|---|---|
RelationQueryNode(QueryNode parent,
int operation)
Creates a new RelationQueryNode without a type nor value
assigned. |
|
RelationQueryNode(QueryNode parent,
Path relPath,
Date value,
int operation)
Creates a new RelationQueryNode with a Date
value and an operation type. |
|
RelationQueryNode(QueryNode parent,
Path relPath,
double value,
int operation)
Creates a new RelationQueryNode with a double
value and an operation type. |
|
RelationQueryNode(QueryNode parent,
Path relPath,
long value,
int operation)
Creates a new RelationQueryNode with a long
value and an operation type. |
|
RelationQueryNode(QueryNode parent,
Path relPath,
String value,
int operation)
Creates a new RelationQueryNode with a String
value and an operation type. |
|
| Method Summary | |
|---|---|
Object |
accept(QueryNodeVisitor visitor,
Object data)
Accepts a QueryNodeVisitor and calls the apropriate visit
method on the visitor depending on the concrete implementation of
this QueryNode. |
void |
addPathElement(Path.PathElement element)
Adds a path element to the existing relative path. |
boolean |
equals(Object obj)
Returns true if obj is the same type of
QueryNode as this node and is equal to
this node. |
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. |
QName |
getProperty()
Deprecated. Use getRelativePath() instead. |
Path |
getRelativePath()
|
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(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 |
setProperty(QName name)
Deprecated. Use setRelativePath(Path) instead. |
void |
setRelativePath(Path relPath)
Sets the relative path to the property in this relation. |
void |
setStringValue(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. |
| Methods inherited from class org.apache.jackrabbit.core.query.NAryQueryNode |
|---|
acceptOperands, addOperand, getNumOperands, getOperands, removeOperand |
| Methods inherited from class org.apache.jackrabbit.core.query.QueryNode |
|---|
dump, getParent |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final QName STAR_NAME_TEST
| Constructor Detail |
|---|
public RelationQueryNode(QueryNode parent,
int operation)
RelationQueryNode without a type nor value
assigned.
parent - the parent node for this query node.
public RelationQueryNode(QueryNode parent,
Path relPath,
long value,
int operation)
RelationQueryNode with a long
value and an operation type.
parent - the parent node for this query node.relPath - the relative path to a property.value - a property valueoperation - the type of the relation.
public RelationQueryNode(QueryNode parent,
Path relPath,
double value,
int operation)
RelationQueryNode with a double
value and an operation type.
parent - the parent node for this query node.relPath - the relative path to a property.value - a property valueoperation - the type of the relation.
public RelationQueryNode(QueryNode parent,
Path relPath,
Date value,
int operation)
RelationQueryNode with a Date
value and an operation type.
parent - the parent node for this query node.relPath - the relative path to a property.value - a property valueoperation - the type of the relation.
public RelationQueryNode(QueryNode parent,
Path relPath,
String value,
int operation)
RelationQueryNode with a String
value and an operation type.
parent - the parent node for this query node.relPath - the relative path to a property.value - a property valueoperation - the type of the relation.| Method Detail |
|---|
public Object accept(QueryNodeVisitor visitor,
Object data)
QueryNodeVisitor and calls the apropriate visit
method on the visitor depending on the concrete implementation of
this QueryNode.
accept in class QueryNodevisitor - the visitor to call back.data - arbitrary data for the visitor.
visitor.visit() call.public int getType()
getType in class QueryNodepublic 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 QName getProperty()
getRelativePath() instead.
getRelativePath().
public void setProperty(QName name)
setRelativePath(Path) instead.
name - the new property name.public Path getRelativePath()
public void setRelativePath(Path relPath)
relPath - the relative path to a property.
IllegalArgumentException - if relPath is absolute.public void addPathElement(Path.PathElement 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 String getStringValue()
String value if this relation if of type
QueryConstants.TYPE_STRING.
String value.public void setStringValue(String value)
String.
value - the new value.public Date getDateValue()
Date value if this relation if of type
QueryConstants.TYPE_DATE.
Date value.public void setDateValue(Date value)
Date.
value - the new value.public int getOperation()
public boolean equals(Object obj)
QueryNodetrue if obj is the same type of
QueryNode as this node and is equal to
this node.
equals in class NAryQueryNodeobj - the reference object with which to compare.
true if obj is equal to
this; false otherwise.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||