public class AttributeNode extends Node
Purpose: Represent a attribute.
Responsibilities:
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.
|
Expression |
appendCast(Expression exp,
GenerationContext context) |
void |
checkForQueryKey(java.lang.Object ownerType,
TypeHelper typeHelper) |
java.lang.Object |
computeActualType(java.lang.Object initialType,
TypeHelper typeHelper) |
java.lang.String |
getAsString()
INTERNAL
Get the string representation of this node.
|
java.lang.String |
getAttributeName() |
java.lang.String |
getCastClassName() |
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 |
setCastClassName(java.lang.String castClassName) |
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, getAlias, getColumn, getLeft, getLine, getRight, getType, hasLeft, hasRight, isAggregateNode, isAliasableNode, isConstructorNode, isCountNode, isDivideNode, isDotNode, isEscape, isLiteralNode, isMapKeyNode, isMinusNode, isMultiplyNode, isNotNode, isParameterNode, isPlusNode, isSubqueryNode, isVariableNode, resolveAttribute, resolveClass, resolveMapping, setAlias, setColumn, setLeft, setLine, setRight, setType, toString, toStringDisplayName, toStringIndent, validateParameter
public AttributeNode()
public AttributeNode(java.lang.String name)
name
- the attribute namepublic Node qualifyAttributeAccess(ParseTreeContext context)
qualifyAttributeAccess
in class Node
public void validate(ParseTreeContext context)
public Expression appendCast(Expression exp, GenerationContext context)
public java.lang.Object computeActualType(java.lang.Object initialType, TypeHelper typeHelper)
public void checkForQueryKey(java.lang.Object ownerType, TypeHelper typeHelper)
public Expression addToExpression(Expression parentExpression, GenerationContext context)
Node
addToExpression
in class Node
public boolean isAttributeNode()
isAttributeNode
in class Node
public java.lang.String getAttributeName()
public void setAttributeName(java.lang.String name)
public java.lang.String getCastClassName()
public void setCastClassName(java.lang.String castClassName)
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 Node
public java.lang.Class resolveClass(GenerationContext context, java.lang.Class ownerClass)
resolveClass
in class Node
public java.lang.String getAsString()
getAsString
in class Node
EclipseLink 2.6.3, "build v20160428-59c81c5" API Reference