Class DerefQueryNode


  • public class DerefQueryNode
    extends LocationStepQueryNode
    Represents query node that dereferences a reference property into a node and does an optional name test on the target node.
    • Constructor Detail

      • DerefQueryNode

        protected DerefQueryNode​(QueryNode parent,
                                 Name nameTest,
                                 boolean descendants)
        Creates a new DerefQueryNode without a name set for the reference property.
        Parameters:
        parent - the parent query node.
        nameTest - the name test on the target node, or null if no name test should be performed on the target node.
        descendants - if true this location step uses the descendant-or-self axis; otherwise the child axis.
    • Method Detail

      • setRefProperty

        public void setRefProperty​(Name propertyName)
        Sets a new name for the reference property.
        Parameters:
        propertyName - the name of the reference property.
      • getRefProperty

        public Name getRefProperty()
        Returns the name of the reference property or null if none is set.
        Returns:
        the name of the reference property or null if none is set.
      • getType

        public int getType()
        Returns the type of this query node.
        Overrides:
        getType in class LocationStepQueryNode
        Returns:
        the type of this query node.
      • equals

        public boolean equals​(Object obj)
        Returns true if obj is the same type of QueryNode as this node and is equal to this node.
        Overrides:
        equals in class LocationStepQueryNode
        Parameters:
        obj - the reference object with which to compare.
        Returns:
        true if obj is equal to this; false otherwise.
      • needsSystemTree

        public boolean needsSystemTree()
        Returns true if this query node needs items under /jcr:system to be queried.
        Overrides:
        needsSystemTree in class NAryQueryNode<QueryNode>
        Returns:
        true if this query node needs content under /jcr:system to be queried; false otherwise.