Module org.eclipse.persistence.core
Class DotNode
java.lang.Object
org.eclipse.persistence.internal.jpa.parsing.Node
org.eclipse.persistence.internal.jpa.parsing.LogicalOperatorNode
org.eclipse.persistence.internal.jpa.parsing.DotNode
- All Implemented Interfaces:
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
-
Field Summary
Fields inherited from class org.eclipse.persistence.internal.jpa.parsing.Node
alias, left, right, shouldGenerateExpression -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyToQuery(ObjectLevelReadQuery theQuery, GenerationContext context) INTERNAL Apply this node to the passed querybooleanendsWithCollectionField(GenerationContext context) INTERNAL (): Answer true if the node has a left and right, and the right represents a collection mapping.booleanendsWithDirectToField(GenerationContext context) INTERNAL (): Answer true if the SELECTed node has a left and right, and the right represents a direct-to-field mapping.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")INTERNAL Get the string representation of this node.INTERNAL Return the left most node of a dot expr, so return 'a' for 'a.b.c'.INTERNAL Return the right most node of a dot expr, so return 'c' for 'a.b.c'.getTypeForMapKey(ParseTreeContext context) Class<?> getTypeOfDirectToField(GenerationContext context) INTERNAL Returns the attribute type if the right represents a direct-to-field mapping.booleanbooleanINTERNAL Yes, this is a dot nodequalifyAttributeAccess(ParseTreeContext context) INTERNAL Check the left child node for an unqualified field access.INTERNAL Answer the name of the attribute which is represented by the receiver's right node.Class<?> resolveClass(GenerationContext context) resolveClass: Answer the class which results from traversing the mappings for the receiver's nodesresolveMapping(GenerationContext context) INTERNAL Answer the mapping resulting from traversing the receiver's nodesvoidvalidate(ParseTreeContext context) INTERNAL Validate node and calculate its type.Methods inherited from class org.eclipse.persistence.internal.jpa.parsing.Node
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, validateParameterMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.persistence.internal.jpa.parsing.AliasableNode
getAlias, setAlias
-
Constructor Details
-
DotNode
public DotNode()
-
-
Method Details
-
applyToQuery
INTERNAL Apply this node to the passed query- Overrides:
applyToQueryin classNode
-
qualifyAttributeAccess
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:
qualifyAttributeAccessin classNode
-
validate
INTERNAL Validate node and calculate its type. Check for enum literals.- Overrides:
validatein classLogicalOperatorNode
-
generateExpression
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:
generateExpressionin classNode
-
isDotNode
public boolean isDotNode()INTERNAL Yes, this is a dot node -
endsWithDirectToField
INTERNAL (): Answer true if the SELECTed node has a left and right, and the right represents a direct-to-field mapping. -
getTypeOfDirectToField
INTERNAL Returns the attribute type if the right represents a direct-to-field mapping. -
getTypeForMapKey
-
endsWithCollectionField
INTERNAL (): Answer true if the node has a left and right, and the right represents a collection mapping. -
resolveAttribute
INTERNAL Answer the name of the attribute which is represented by the receiver's right node.- Overrides:
resolveAttributein classNode
-
resolveMapping
INTERNAL Answer the mapping resulting from traversing the receiver's nodes- Overrides:
resolveMappingin classNode
-
resolveClass
resolveClass: Answer the class which results from traversing the mappings for the receiver's nodes- Overrides:
resolveClassin classNode
-
getAsString
INTERNAL Get the string representation of this node.- Overrides:
getAsStringin classNode
-
getLeftMostNode
INTERNAL Return the left most node of a dot expr, so return 'a' for 'a.b.c'. -
getRightMostNode
INTERNAL Return the right most node of a dot expr, so return 'c' for 'a.b.c'. -
isAliasableNode
public boolean isAliasableNode()- Overrides:
isAliasableNodein classNode
-