Class AttributeNode


  • public class AttributeNode
    extends Node
    INTERNAL

    Purpose: Represent a attribute.

    Responsibilities:

    • Constructor Detail

      • AttributeNode

        public AttributeNode()
        Create a new AttributeNode
      • AttributeNode

        public AttributeNode​(String name)
        Create a new AttributeNode with the passed name
        Parameters:
        name - the attribute name
    • Method Detail

      • qualifyAttributeAccess

        public Node qualifyAttributeAccess​(ParseTreeContext context)
        INTERNAL If called this AttributeNode represents an unqualified field access. The method returns a DotNode representing a qualified field access with the base variable as left child node and the attribute as right child node.
        Overrides:
        qualifyAttributeAccess in class Node
      • validate

        public void validate​(ParseTreeContext context)
        INTERNAL Validate the current node and calculates its type.
        Overrides:
        validate in class Node
      • checkForQueryKey

        public void checkForQueryKey​(Object ownerType,
                                     TypeHelper typeHelper)
      • addToExpression

        public Expression addToExpression​(Expression parentExpression,
                                          GenerationContext context)
        Description copied from class: Node
        INTERNAL Add my expression semantics to the parentExpression. Each subclass will add a different expression and thus will need to override this method
        Overrides:
        addToExpression in class Node
      • isAttributeNode

        public boolean isAttributeNode()
        INTERNAL Is this node an AttributeNode
        Overrides:
        isAttributeNode in class Node
      • getAttributeName

        public String getAttributeName()
      • setAttributeName

        public void setAttributeName​(String name)
      • getCastClassName

        public String getCastClassName()
      • setCastClassName

        public void setCastClassName​(String castClassName)
      • isOuterJoin

        public boolean isOuterJoin()
      • setOuterJoin

        public void setOuterJoin​(boolean outerJoin)
      • requiresCollectionAttribute

        public boolean requiresCollectionAttribute()
      • setRequiresCollectionAttribute

        public void setRequiresCollectionAttribute​(boolean requiresCollectionAttribute)
      • isCollectionAttribute

        public boolean isCollectionAttribute()
      • resolveClass

        public Class resolveClass​(GenerationContext context,
                                  Class ownerClass)
        resolveClass: Answer the class for the mapping associated with the my variableName in the ownerClass. Answer null if the node represents a mapping that doesn't exist
        Overrides:
        resolveClass in class Node
      • getAsString

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