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
  • Constructor Details

    • DotNode

      public DotNode()
  • Method Details

    • applyToQuery

      public void applyToQuery(ObjectLevelReadQuery theQuery, GenerationContext context)
      INTERNAL Apply this node to the passed query
      Overrides:
      applyToQuery in class Node
    • 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
    • validate

      public void validate(ParseTreeContext context)
      INTERNAL Validate node and calculate its type. Check for enum literals.
      Overrides:
      validate in class LogicalOperatorNode
    • 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.
    • getTypeForMapKey

      public Object getTypeForMapKey(ParseTreeContext context)
    • 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
    • resolveMapping

      public DatabaseMapping resolveMapping(GenerationContext context)
      INTERNAL Answer the mapping resulting from traversing the receiver's nodes
      Overrides:
      resolveMapping 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