public class DotNode extends LogicalOperatorNode implements AliasableNode
Purpose: This node represents an 'DOT' (i.e. '.') on the input stream. The left and right will depend on the input stream.
Responsibilities:
shouldGenerateExpression
Constructor and Description |
---|
DotNode() |
Modifier and Type | Method and Description |
---|---|
void |
applyToQuery(ObjectLevelReadQuery theQuery,
GenerationContext context)
INTERNAL
Apply this node to the passed query
|
boolean |
endsWithCollectionField(GenerationContext context)
INTERNAL
():
Answer true if the node has a left and right, and the right represents
a collection mapping.
|
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.
|
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")
|
java.lang.String |
getAsString()
INTERNAL
Get the string representation of this node.
|
Node |
getLeftMostNode()
INTERNAL
Return the left most node of a dot expr, so return 'a' for 'a.b.c'.
|
Node |
getRightMostNode()
INTERNAL
Return the right most node of a dot expr, so return 'c' for 'a.b.c'.
|
java.lang.Object |
getTypeForMapKey(ParseTreeContext context) |
java.lang.Class |
getTypeOfDirectToField(GenerationContext context)
INTERNAL
Returns the attribute type if the right represents a direct-to-field mapping.
|
boolean |
isAliasableNode() |
boolean |
isDotNode()
INTERNAL
Yes, this is a dot node
|
Node |
qualifyAttributeAccess(ParseTreeContext context)
INTERNAL
Check the left child node for an unqualified field access.
|
java.lang.String |
resolveAttribute()
INTERNAL
Answer the name of the attribute which is represented by the receiver's
right node.
|
java.lang.Class |
resolveClass(GenerationContext context)
resolveClass: Answer the class which results from traversing the mappings for the receiver's nodes
|
DatabaseMapping |
resolveMapping(GenerationContext context)
INTERNAL
Answer the mapping resulting from traversing the receiver's nodes
|
void |
validate(ParseTreeContext context)
INTERNAL
Validate node and calculate its type.
|
addToExpression, appendExpression, getAlias, getColumn, getLeft, getLine, getRight, getType, hasLeft, hasRight, isAggregateNode, isAttributeNode, isConstructorNode, isCountNode, isDivideNode, isEscape, isLiteralNode, isMapKeyNode, isMinusNode, isMultiplyNode, isNotNode, isParameterNode, isPlusNode, isSubqueryNode, isVariableNode, resolveClass, resolveMapping, setAlias, setColumn, setLeft, setLine, setRight, setType, toString, toString, toStringDisplayName, toStringIndent, validateParameter
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAlias, setAlias
public void applyToQuery(ObjectLevelReadQuery theQuery, GenerationContext context)
applyToQuery
in class Node
public Node qualifyAttributeAccess(ParseTreeContext context)
qualifyAttributeAccess
in class Node
public void validate(ParseTreeContext context)
validate
in class LogicalOperatorNode
public Expression generateExpression(GenerationContext context)
generateExpression
in class Node
public boolean isDotNode()
public boolean endsWithDirectToField(GenerationContext context)
public java.lang.Class getTypeOfDirectToField(GenerationContext context)
public java.lang.Object getTypeForMapKey(ParseTreeContext context)
public boolean endsWithCollectionField(GenerationContext context)
public java.lang.String resolveAttribute()
resolveAttribute
in class Node
public DatabaseMapping resolveMapping(GenerationContext context)
resolveMapping
in class Node
public java.lang.Class resolveClass(GenerationContext context)
resolveClass
in class Node
public java.lang.String getAsString()
getAsString
in class Node
public Node getLeftMostNode()
public Node getRightMostNode()
public boolean isAliasableNode()
isAliasableNode
in class Node
EclipseLink 2.6.3, "build v20160428-59c81c5" API Reference