public class AttributeNode extends Node
Purpose: Represent a attribute.
Responsibilities:
left, right, shouldGenerateExpression| Constructor and Description |
|---|
AttributeNode()
Create a new AttributeNode
|
AttributeNode(java.lang.String name)
Create a new AttributeNode with the passed name
|
| Modifier and Type | Method and Description |
|---|---|
Expression |
addToExpression(Expression parentExpression,
GenerationContext context)
INTERNAL
Add my expression semantics to the parentExpression.
|
java.lang.String |
getAsString()
INTERNAL
Get the string representation of this node.
|
java.lang.String |
getAttributeName() |
DatabaseMapping |
getMapping() |
boolean |
isAttributeNode()
INTERNAL
Is this node an AttributeNode
|
boolean |
isCollectionAttribute() |
boolean |
isOuterJoin() |
Node |
qualifyAttributeAccess(ParseTreeContext context)
INTERNAL
If called this AttributeNode represents an unqualified field access.
|
boolean |
requiresCollectionAttribute() |
java.lang.Class |
resolveClass(GenerationContext context,
java.lang.Class ownerClass)
resolveClass: Answer the class for the mapping associated with the my variableName in the ownerClass.
|
DatabaseMapping |
resolveMapping(GenerationContext context,
java.lang.Class ownerClass)
resolveMapping: Answer the mapping which corresponds to my variableName.
|
void |
setAttributeName(java.lang.String name) |
void |
setMapping(DatabaseMapping mapping) |
void |
setOuterJoin(boolean outerJoin) |
void |
setRequiresCollectionAttribute(boolean requiresCollectionAttribute) |
java.lang.String |
toString(int indent) |
void |
validate(ParseTreeContext context)
INTERNAL
Validate the current node and calculates its type.
|
appendExpression, applyToQuery, generateExpression, getColumn, getLeft, getLine, getRight, getType, hasLeft, hasRight, isAggregateNode, isConstructorNode, isCountNode, isDivideNode, isDotNode, isEscape, isLiteralNode, isMinusNode, isMultiplyNode, isNotNode, isParameterNode, isPlusNode, isSubqueryNode, isVariableNode, resolveAttribute, resolveClass, resolveMapping, setColumn, setLeft, setLine, setRight, setType, toString, toStringDisplayName, toStringIndent, validateParameterpublic AttributeNode()
public AttributeNode(java.lang.String name)
name - the attribute namepublic Node qualifyAttributeAccess(ParseTreeContext context)
qualifyAttributeAccess in class Nodepublic void validate(ParseTreeContext context)
public Expression addToExpression(Expression parentExpression, GenerationContext context)
NodeaddToExpression in class Nodepublic boolean isAttributeNode()
isAttributeNode in class Nodepublic java.lang.String getAttributeName()
public void setAttributeName(java.lang.String name)
public boolean isOuterJoin()
public void setOuterJoin(boolean outerJoin)
public boolean requiresCollectionAttribute()
public void setRequiresCollectionAttribute(boolean requiresCollectionAttribute)
public DatabaseMapping getMapping()
public void setMapping(DatabaseMapping mapping)
public boolean isCollectionAttribute()
public DatabaseMapping resolveMapping(GenerationContext context, java.lang.Class ownerClass)
resolveMapping in class Nodepublic java.lang.Class resolveClass(GenerationContext context, java.lang.Class ownerClass)
resolveClass in class Nodepublic java.lang.String getAsString()
getAsString in class Node