Class DivideNode
- java.lang.Object
-
- org.eclipse.persistence.internal.jpa.parsing.Node
-
- org.eclipse.persistence.internal.jpa.parsing.BinaryOperatorNode
-
- org.eclipse.persistence.internal.jpa.parsing.DivideNode
-
- All Implemented Interfaces:
AliasableNode
public class DivideNode extends BinaryOperatorNode implements AliasableNode
INTERNALPurpose: Represent a '/' in EJBQL
Responsibilities:
- Generate the correct expression for a '/'
- Since:
- July 2003
- 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 DivideNode()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
applyToQuery(ObjectLevelReadQuery theQuery, GenerationContext context)
INTERNAL Apply this node to the passed queryExpression
generateExpression(GenerationContext context)
INTERNAL Generate the expression.boolean
isAliasableNode()
boolean
isDivideNode()
INTERNAL Is this node a Divide nodevoid
validate(ParseTreeContext context)
INTERNAL Validate node and calculates its type.-
Methods inherited from class org.eclipse.persistence.internal.jpa.parsing.Node
addToExpression, appendExpression, getAlias, getAsString, getColumn, getLeft, getLine, getRight, getType, hasLeft, hasRight, isAggregateNode, isAttributeNode, isConstructorNode, isCountNode, 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
-
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
-
-
-
-
Method Detail
-
applyToQuery
public void applyToQuery(ObjectLevelReadQuery theQuery, GenerationContext context)
INTERNAL Apply this node to the passed query- Overrides:
applyToQuery
in classNode
-
validate
public void validate(ParseTreeContext context)
INTERNAL Validate node and calculates its type.- Overrides:
validate
in classBinaryOperatorNode
-
generateExpression
public Expression generateExpression(GenerationContext context)
INTERNAL Generate the expression. The steps are: 1. Generate the expression for the left node 2. Add the .divide to the where clause returned from step 1 3. Generate the expression for the right side and use it as the parameter for the .divide() 4. Return the completed where clause to the caller- Overrides:
generateExpression
in classNode
-
isDivideNode
public boolean isDivideNode()
Description copied from class:Node
INTERNAL Is this node a Divide node- Overrides:
isDivideNode
in classNode
-
isAliasableNode
public boolean isAliasableNode()
- Overrides:
isAliasableNode
in classNode
-
-