Class EqualsNode
- java.lang.Object
-
- org.eclipse.persistence.internal.jpa.parsing.Node
-
- org.eclipse.persistence.internal.jpa.parsing.BinaryOperatorNode
-
- org.eclipse.persistence.internal.jpa.parsing.EqualsNode
-
public class EqualsNode extends BinaryOperatorNode
INTERNALPurpose: Represent an '=' in EJBQL
Responsibilities:
- Generate the correct expression for an '=' in EJBQL
- Since:
- TopLink 4.0
- Author:
- Jon Driscoll and Joel Lucuik
-
-
Field Summary
-
Fields inherited from class org.eclipse.persistence.internal.jpa.parsing.Node
alias, left, right, shouldGenerateExpression
-
-
Constructor Summary
Constructors Constructor Description EqualsNode()EqualsNode constructor comment.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExpressiongenerateExpression(GenerationContext context)Resolve the expression.java.lang.StringgetAsString()INTERNAL Get the string representation of this node.voidvalidate(ParseTreeContext context)INTERNAL Validate node and calculates its type.-
Methods inherited from class org.eclipse.persistence.internal.jpa.parsing.Node
addToExpression, appendExpression, applyToQuery, getAlias, getColumn, getLeft, getLine, getRight, getType, hasLeft, hasRight, isAggregateNode, isAliasableNode, isAttributeNode, isConstructorNode, isCountNode, isDivideNode, isDotNode, isEscape, isLiteralNode, isMapKeyNode, isMinusNode, isMultiplyNode, isNotNode, isParameterNode, isPlusNode, isSubqueryNode, isVariableNode, qualifyAttributeAccess, resolveAttribute, resolveClass, resolveClass, resolveMapping, resolveMapping, setAlias, setColumn, setLeft, setLine, setRight, setType, toString, toString, toStringDisplayName, toStringIndent, validateParameter
-
-
-
-
Method Detail
-
validate
public void validate(ParseTreeContext context)
INTERNAL Validate node and calculates its type.- Overrides:
validatein classBinaryOperatorNode
-
generateExpression
public Expression generateExpression(GenerationContext context)
Resolve the expression. The steps are: 1. Set the expressionBuilder for the left and right nodes 2. Generate the expression for the left node 3. Add the .equals to the where clause returned from step 2 4. Generate the expression for the right side and use it as the parameter for the .equals() 5. Return the completed where clause to the caller- Overrides:
generateExpressionin classNode
-
getAsString
public java.lang.String getAsString()
INTERNAL Get the string representation of this node.- Overrides:
getAsStringin classNode
-
-