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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyToQuery(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) booleanisAlias(GenerationContext context) isAlias: Answer true if this variable represents an alias in the FROM clause.booleanisAlias(ParseTreeContext context) booleanbooleanINTERNAL 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.voidsetVariableName(String newVariableName) toString(int indent) voidvalidate(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, 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
-
VariableNode
public VariableNode()VariableNode constructor comment. -
VariableNode
-
-
Method Details
-
getVariableName
-
setVariableName
-
getCanonicalVariableName
-
isVariableNode
public boolean isVariableNode()INTERNAL Is this node a VariableNode- Overrides:
isVariableNodein classNode
-
applyToQuery
INTERNAL Apply this node to the passed query- Overrides:
applyToQueryin 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:
qualifyAttributeAccessin classNode
-
validate
INTERNAL Validate node and calculate its type. -
generateBaseBuilderExpression
-
generateExpression
Description copied from class:NodeINTERNAL Generate an expression for the node. Each subclass will generate a different expression and thus will need to override this method- Overrides:
generateExpressionin 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:
resolveClassin classNode
-
toString
-
getAsString
INTERNAL Get the string representation of this node.- Overrides:
getAsStringin classNode
-
getTypeForMapKey
-
isAliasableNode
public boolean isAliasableNode()- Overrides:
isAliasableNodein classNode
-