Class DotNode

  • All Implemented Interfaces:
    AliasableNode

    public class DotNode
    extends LogicalOperatorNode
    implements AliasableNode
    INTERNAL

    Purpose: This node represents an 'DOT' (i.e. '.') on the input stream. The left and right will depend on the input stream.

    Responsibilities:

    Since:
    TopLink 4.0
    Author:
    Jon Driscoll and Joel Lucuik
    • Constructor Detail

      • DotNode

        public DotNode()
    • Method Detail

      • qualifyAttributeAccess

        public Node qualifyAttributeAccess​(ParseTreeContext context)
        INTERNAL Check the left child node for an unqualified field access. The method delegates to the left most expression of multi-navigation path expression.
        Overrides:
        qualifyAttributeAccess in class Node
      • generateExpression

        public Expression generateExpression​(GenerationContext context)
        INTERNAL Return a TopLink expression by getting the required variables using the left and right nodes "emp.address.city" = builder.get("address").get("city")
        Overrides:
        generateExpression in class Node
      • isDotNode

        public boolean isDotNode()
        INTERNAL Yes, this is a dot node
        Overrides:
        isDotNode in class Node
      • endsWithDirectToField

        public boolean endsWithDirectToField​(GenerationContext context)
        INTERNAL (): Answer true if the SELECTed node has a left and right, and the right represents a direct-to-field mapping.
      • getTypeOfDirectToField

        public Class getTypeOfDirectToField​(GenerationContext context)
        INTERNAL Returns the attribute type if the right represents a direct-to-field mapping.
      • endsWithCollectionField

        public boolean endsWithCollectionField​(GenerationContext context)
        INTERNAL (): Answer true if the node has a left and right, and the right represents a collection mapping.
      • resolveAttribute

        public String resolveAttribute()
        INTERNAL Answer the name of the attribute which is represented by the receiver's right node.
        Overrides:
        resolveAttribute in class Node
      • resolveClass

        public Class resolveClass​(GenerationContext context)
        resolveClass: Answer the class which results from traversing the mappings for the receiver's nodes
        Overrides:
        resolveClass in class Node
      • getAsString

        public String getAsString()
        INTERNAL Get the string representation of this node.
        Overrides:
        getAsString in class Node
      • getLeftMostNode

        public Node getLeftMostNode()
        INTERNAL Return the left most node of a dot expr, so return 'a' for 'a.b.c'.
      • getRightMostNode

        public Node getRightMostNode()
        INTERNAL Return the right most node of a dot expr, so return 'c' for 'a.b.c'.
      • isAliasableNode

        public boolean isAliasableNode()
        Overrides:
        isAliasableNode in class Node