Top Description Constructors Methods
org.eclipse.persistence.jpa.jpql.parser

public final Class SumFunction

extends AggregateFunction
Class Inheritance

One of the aggregate functions. The arguments must be numeric.

SUM returns Long when applied to state-fields of integral types (other than BigInteger); Double when applied to state-fields of floating point types; BigInteger when applied to state-fields of type BigInteger; and BigDecimal when applied to state-fields of type BigDecimal. If SUM, AVG, MAX, or MIN is used, and there are no values to which the aggregate function can be applied, the result of the aggregate function is NULL. If COUNT is used, and there are no values to which COUNT can be applied, the result of the aggregate function is 0.

BNF: expression ::= SUM([DISTINCT] state_field_path_expression)
Author
Pascal Filion
Since
2.3
Version
2.5

Constructor Summary

AccessConstructor and Description
public
SumFunction(AbstractExpression
The parent of this expression
parent
)

Creates a new SumFunction.

Method Summary

Modifier and TypeMethod and Description
public void
accept(ExpressionVisitor
The ExpressionVisitor to visit this object
visitor
)

Implements org.eclipse.persistence.jpa.jpql.parser.Expression.accept.

Visits this Expression by the given visitor.
Inherited from org.eclipse.persistence.jpa.jpql.parser.AggregateFunction:
addOrderedEncapsulatedExpressionTobuildEncapsulatedExpressiongetActualDistinctIdentifiergetEncapsulatedExpressionQueryBNFIdgetQueryBNFhasDistincthasSpaceAfterDistinctparseEncapsulatedExpressiontoParsedTextEncapsulatedExpression

Constructor Detail

SumFunctionback to summary
public SumFunction(AbstractExpression parent)

Creates a new SumFunction.

Parameters
parent:AbstractExpression

The parent of this expression

Method Detail

acceptback to summary
public void accept(ExpressionVisitor visitor)

Implements org.eclipse.persistence.jpa.jpql.parser.Expression.accept.

Doc from org.eclipse.persistence.jpa.jpql.parser.Expression.accept.

Visits this Expression by the given visitor.

Parameters
visitor:ExpressionVisitor

The ExpressionVisitor to visit this object

Annotations
@Override