Module org.eclipse.persistence.core
Class VariableNode
java.lang.Object
org.eclipse.persistence.internal.jpa.parsing.Node
org.eclipse.persistence.internal.jpa.parsing.VariableNode
- All Implemented Interfaces:
AliasableNode
INTERNAL
Purpose: The node that represents typed variables, local variables, remote variables and TYPE constants.
- Since:
- TopLink 4.0
-
Field Summary
Fields inherited from class org.eclipse.persistence.internal.jpa.parsing.Node
alias, left, right, shouldGenerateExpression
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
applyToQuery
(ObjectLevelReadQuery theQuery, GenerationContext generationContext) INTERNAL Apply this node to the passed querygenerateExpression
(GenerationContext generationContext) INTERNAL Generate an expression for the node.INTERNAL Get the string representation of this node.getNodeForAlias
(GenerationContext context) getTypeForMapKey
(ParseTreeContext context) boolean
isAlias
(GenerationContext context) isAlias: Answer true if this variable represents an alias in the FROM clause.boolean
isAlias
(ParseTreeContext context) boolean
boolean
INTERNAL Is this node a VariableNodequalifyAttributeAccess
(ParseTreeContext context) INTERNAL This node represent an unqualified field access in the case the method is called and the variableName is not defined as identification variable.Class
<?> resolveClass
(GenerationContext generationContext) resolveClass: Answer the class which corresponds to my variableName.void
setVariableName
(String newVariableName) toString
(int indent) void
validate
(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, isDotNode, isEscape, isLiteralNode, isMapKeyNode, isMinusNode, isMultiplyNode, isNotNode, isParameterNode, isPlusNode, isSubqueryNode, resolveAttribute, resolveClass, resolveMapping, resolveMapping, setAlias, setColumn, setLeft, setLine, setRight, setType, toString, toStringDisplayName, toStringIndent, validateParameter
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.persistence.internal.jpa.parsing.AliasableNode
getAlias, setAlias
-
Constructor Details
-
VariableNode
public VariableNode()VariableNode constructor comment. -
VariableNode
-
-
Method Details
-
getVariableName
-
setVariableName
-
getCanonicalVariableName
-
isVariableNode
public boolean isVariableNode()INTERNAL Is this node a VariableNode- Overrides:
isVariableNode
in classNode
-
applyToQuery
INTERNAL Apply this node to the passed query- Overrides:
applyToQuery
in classNode
-
qualifyAttributeAccess
INTERNAL This node represent an unqualified field access in the case the method is called and the variableName is not defined as identification variable. The method returns a DotNode representing a qualified field access with the base variable as left child node. The right child node is an AttributeNode using the variableName as field name.- Overrides:
qualifyAttributeAccess
in classNode
-
validate
INTERNAL Validate node and calculate its type. -
generateBaseBuilderExpression
-
generateExpression
Description copied from class:Node
INTERNAL Generate an expression for the node. Each subclass will generate a different expression and thus will need to override this method- Overrides:
generateExpression
in classNode
-
generateExpressionForAlias
-
getNodeForAlias
-
isAlias
isAlias: Answer true if this variable represents an alias in the FROM clause. i.e. "FROM Employee emp" declares "emp" as an alias -
isAlias
-
resolveClass
resolveClass: Answer the class which corresponds to my variableName. This is the class for an alias, where the variableName is registered to an alias.- Overrides:
resolveClass
in classNode
-
toString
-
getAsString
INTERNAL Get the string representation of this node.- Overrides:
getAsString
in classNode
-
getTypeForMapKey
-
isAliasableNode
public boolean isAliasableNode()- Overrides:
isAliasableNode
in classNode
-