java.lang.Object
org.eclipse.persistence.internal.jpa.parsing.Node
- Direct Known Subclasses:
AggregateNode
,AllNode
,AnyNode
,AttributeNode
,BinaryOperatorNode
,CaseNode
,ClassForInheritanceNode
,CoalesceNode
,ConstructorNode
,ExistsNode
,FetchJoinNode
,FunctionalExpressionNode
,IdentificationVariableDeclNode
,IndexNode
,LiteralNode
,LogicalOperatorNode
,MajorNode
,MapEntryNode
,MapKeyNode
,NullIfNode
,OrderByItemNode
,ParameterNode
,SimpleConditionalExpressionNode
,SomeNode
,SortDirectionNode
,SubqueryNode
,UnaryMinus
,VariableNode
,WhenThenNode
INTERNAL
Purpose: This is the superclass for all Nodes.
Responsibilities:
- Answer default answers for all method calls
- Delegate most responsibilities to the sub-classes
- Since:
- TopLink 4.0
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddToExpression
(Expression parentExpression, GenerationContext context) INTERNAL Add my expression semantics to the parentExpression.appendExpression
(Expression left, Expression right) INTERNAL Returns left.and(right) if both are defined.void
applyToQuery
(ObjectLevelReadQuery theQuery, GenerationContext context) INTERNAL Apply this node to the passed querygenerateExpression
(GenerationContext context) INTERNAL Generate an expression for the node.getAlias()
INTERNAL Get the string representation of this node.int
getLeft()
INTERNAL Return the left nodeint
getLine()
getRight()
INTERNAL Return the right nodegetType()
INTERNAL Return the type of this node.boolean
hasLeft()
INTERNAL Does this node have a leftboolean
hasRight()
INTERNAL Does this node have a rightboolean
INTERNAL Is this node an Aggregate nodeboolean
boolean
INTERNAL Is this node an AttributeNodeboolean
INTERNAL Is this node a ConstructorNodeboolean
INTERNAL Is this node a CountNodeboolean
INTERNAL Is this node a Divide nodeboolean
INTERNAL Is this node a Dot nodeboolean
isEscape()
INTERNAL Is this an escape nodeboolean
INTERNAL Is this a literal nodeboolean
INTERNAL Is this node a MapKey nodeboolean
INTERNAL Is this node a Minus nodeboolean
INTERNAL Is this node a Multiply nodeboolean
INTERNAL Is this node a Not nodeboolean
INTERNAL Is this a Parameter nodeboolean
INTERNAL Is this node a Plus nodeboolean
INTERNAL Is this node a SubqueryNodeboolean
INTERNAL Is this node a VariableNodequalifyAttributeAccess
(ParseTreeContext context) INTERNAL Check the child node for an unqualified field access and if so, replace it by a qualified field access.resolveAttribute(): Answer the name of the attribute which is represented by the receiver.Class
<?> resolveClass
(GenerationContext context) resolveClass: Answer the class associated with the content of this node.Class
<?> resolveClass
(GenerationContext context, Class<?> ownerClass) resolveClass: Answer the class associated with the content of this node.resolveMapping
(GenerationContext context) resolveMapping: Answer the mapping associated with the contained nodes.resolveMapping
(GenerationContext context, Class<?> ownerClass) resolveMapping: Answer the mapping associated with the contained nodes.void
void
setColumn
(int column) void
INTERNAL Set the left node to the passed valuevoid
setLine
(int line) void
INTERNAL Set the right for this nodevoid
INTERNAL Set this node's type.toString()
toString
(int indent) void
toStringIndent
(int indent, StringBuilder buffer) void
validate
(ParseTreeContext context) INTERNAL Validate node and calculate its type.void
validateParameter
(ParseTreeContext context, Object contextType) INTERNAL
-
Field Details
-
left
-
right
-
shouldGenerateExpression
public boolean shouldGenerateExpression -
alias
-
-
Constructor Details
-
Node
public Node()Return a new Node.
-
-
Method Details
-
applyToQuery
INTERNAL Apply this node to the passed query -
addToExpression
INTERNAL Add my expression semantics to the parentExpression. Each subclass will add a different expression and thus will need to override this method -
getAsString
INTERNAL Get the string representation of this node. By default return toString() -
qualifyAttributeAccess
INTERNAL Check the child node for an unqualified field access and if so, replace it by a qualified field access. -
validate
INTERNAL Validate node and calculate its type. -
validateParameter
INTERNAL -
generateExpression
INTERNAL Generate an expression for the node. Each subclass will generate a different expression and thus will need to override this method -
getLeft
INTERNAL Return the left node -
getRight
INTERNAL Return the right node -
hasLeft
public boolean hasLeft()INTERNAL Does this node have a left -
hasRight
public boolean hasRight()INTERNAL Does this node have a right -
isAggregateNode
public boolean isAggregateNode()INTERNAL Is this node an Aggregate node -
isDotNode
public boolean isDotNode()INTERNAL Is this node a Dot node -
isLiteralNode
public boolean isLiteralNode()INTERNAL Is this a literal node -
isMultiplyNode
public boolean isMultiplyNode()INTERNAL Is this node a Multiply node -
isNotNode
public boolean isNotNode()INTERNAL Is this node a Not node -
isParameterNode
public boolean isParameterNode()INTERNAL Is this a Parameter node -
isDivideNode
public boolean isDivideNode()INTERNAL Is this node a Divide node -
isPlusNode
public boolean isPlusNode()INTERNAL Is this node a Plus node -
isMapKeyNode
public boolean isMapKeyNode()INTERNAL Is this node a MapKey node -
isMinusNode
public boolean isMinusNode()INTERNAL Is this node a Minus node -
isVariableNode
public boolean isVariableNode()INTERNAL Is this node a VariableNode -
isAttributeNode
public boolean isAttributeNode()INTERNAL Is this node an AttributeNode -
isCountNode
public boolean isCountNode()INTERNAL Is this node a CountNode -
isConstructorNode
public boolean isConstructorNode()INTERNAL Is this node a ConstructorNode -
isSubqueryNode
public boolean isSubqueryNode()INTERNAL Is this node a SubqueryNode -
isEscape
public boolean isEscape()INTERNAL Is this an escape node -
resolveAttribute
resolveAttribute(): Answer the name of the attribute which is represented by the receiver. Subclasses should override this. -
resolveClass
resolveClass: Answer the class associated with the content of this node. Default is to return null. Subclasses should override this. -
resolveClass
resolveClass: Answer the class associated with the content of this node. Default is to return null. Subclasses should override this. -
resolveMapping
resolveMapping: Answer the mapping associated with the contained nodes. Subclasses should override this. -
resolveMapping
resolveMapping: Answer the mapping associated with the contained nodes. Use the provided class as the context. Subclasses should override this. -
setLeft
INTERNAL Set the left node to the passed value -
setRight
INTERNAL Set the right for this node -
getLine
public int getLine() -
setLine
public void setLine(int line) -
getColumn
public int getColumn() -
setColumn
public void setColumn(int column) -
getType
INTERNAL Return the type of this node. -
setType
INTERNAL Set this node's type. -
appendExpression
INTERNAL Returns left.and(right) if both are defined. -
toString
-
toString
-
toStringDisplayName
-
toStringIndent
-
getAlias
-
setAlias
-
isAliasableNode
public boolean isAliasableNode()
-