Class SumNode
- java.lang.Object
-
- org.eclipse.persistence.internal.jpa.parsing.Node
-
- org.eclipse.persistence.internal.jpa.parsing.AggregateNode
-
- org.eclipse.persistence.internal.jpa.parsing.SumNode
-
- All Implemented Interfaces:
AliasableNode
public class SumNode extends AggregateNode
INTERNALPurpose: Model a SUM
Responsibilities:
- Apply itself to a query correctly
-
-
Field Summary
-
Fields inherited from class org.eclipse.persistence.internal.jpa.parsing.Node
alias, left, right, shouldGenerateExpression
-
-
Constructor Summary
Constructors Constructor Description SumNode()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ExpressionaddAggregateExression(Expression expr)INTERNALvoidapplyToQuery(ObjectLevelReadQuery theQuery, GenerationContext context)INTERNAL Apply this node to the passed queryprotected java.lang.ObjectcalculateReturnType(java.lang.Object argType, TypeHelper helper)INTERNAL Helper method to calculate the return type of the SUM operation.protected java.lang.ClasscalculateReturnType(GenerationContext context)INTERNAL This method calculates the return type of the SUM operation.java.lang.StringgetAsString()INTERNAL Get the string representation of this node.voidvalidate(ParseTreeContext context)INTERNAL Validate node and calculate its type.-
Methods inherited from class org.eclipse.persistence.internal.jpa.parsing.AggregateNode
generateExpression, isAggregateNode, isAliasableNode, resolveAttribute, resolveClass, setDistinct, usesDistinct
-
Methods inherited from class org.eclipse.persistence.internal.jpa.parsing.Node
addToExpression, appendExpression, getAlias, getColumn, getLeft, getLine, getRight, getType, hasLeft, hasRight, isAttributeNode, isConstructorNode, isCountNode, isDivideNode, isDotNode, isEscape, isLiteralNode, isMapKeyNode, isMinusNode, isMultiplyNode, isNotNode, isParameterNode, isPlusNode, isSubqueryNode, isVariableNode, qualifyAttributeAccess, 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:
applyToQueryin classNode
-
validate
public void validate(ParseTreeContext context)
INTERNAL Validate node and calculate its type.
-
addAggregateExression
protected Expression addAggregateExression(Expression expr)
INTERNAL- Specified by:
addAggregateExressionin classAggregateNode
-
calculateReturnType
protected java.lang.Class calculateReturnType(GenerationContext context)
INTERNAL This method calculates the return type of the SUM operation.
-
calculateReturnType
protected java.lang.Object calculateReturnType(java.lang.Object argType, TypeHelper helper)INTERNAL Helper method to calculate the return type of the SUM operation.
-
getAsString
public java.lang.String getAsString()
INTERNAL Get the string representation of this node.- Overrides:
getAsStringin classNode
-
-