Class QueryRootNode
java.lang.Object
org.apache.jackrabbit.spi.commons.query.QueryNode
org.apache.jackrabbit.spi.commons.query.QueryRootNode
Implements the root node of a query tree.
-
Field Summary
Fields inherited from class org.apache.jackrabbit.spi.commons.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 -
Method Summary
Modifier and TypeMethodDescriptionaccept(QueryNodeVisitor visitor, Object data) Accepts aQueryNodeVisitorand calls the appropriatevisitmethod on the visitor depending on the concrete implementation of thisQueryNode.voidaddSelectProperty(Name propName) Adds a new select property to the query.booleanReturnstrueifobjis the same type ofQueryNodeasthisnode and is equal tothisnode.Returns thePathQueryNodeornullif this query does not have a location node.Returns the order node ornullif no order is specified.Name[]Returns an array of select properties.intgetType()Returns the type of this node.booleanReturnstrueif this query node needs items under /jcr:system to be queried.voidsetLocationNode(PathQueryNode locationNode) Sets the location node.voidsetOrderNode(OrderQueryNode orderNode) Sets a new order node.
-
Method Details
-
getLocationNode
Returns thePathQueryNodeornullif this query does not have a location node.- Returns:
- the
PathQueryNodeornullif this query does not have a location node.
-
setLocationNode
Sets the location node.- Parameters:
locationNode- the new location node.
-
addSelectProperty
Adds a new select property to the query.- Parameters:
propName- the name of the property to select.
-
getSelectProperties
Returns an array of select properties.- Returns:
- an array of select properties.
-
getOrderNode
Returns the order node ornullif no order is specified.- Returns:
- the order node.
-
setOrderNode
Sets a new order node.- Parameters:
orderNode- the new order node.
-
accept
Accepts aQueryNodeVisitorand calls the appropriatevisitmethod on the visitor depending on the concrete implementation of thisQueryNode.- Specified by:
acceptin classQueryNode- Parameters:
visitor- the visitor to call back.data- arbitrary data for the visitor.- Returns:
- the return value of the
visitor.visit()call. - Throws:
RepositoryException
-
getType
public int getType()Returns the type of this node. -
equals
Returnstrueifobjis the same type ofQueryNodeasthisnode and is equal tothisnode. -
needsSystemTree
public boolean needsSystemTree()Returnstrueif this query node needs items under /jcr:system to be queried.- Specified by:
needsSystemTreein classQueryNode- Returns:
trueif this query node needs content under /jcr:system to be queried;falseotherwise.
-