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

public final Class AbsExpression

extends AbstractSingleEncapsulatedExpression
Class Inheritance

The ABS function removes the minus sign from a specified argument and returns the absolute value, which is always a positive number or zero.

This is one of the JPQL arithmetic functions. The ABS function takes a numeric argument and returns a number (integer, float, or double) of the same type as the argument to the function.

JPA 1.0, 2.0:

BNF: expression ::= ABS(simple_arithmetic_expression)

JPA 2.1:
BNF: expression ::= ABS(arithmetic_expression)

Example: SELECT DISTINCT o FROM Order o WHERE o.totalPrice > ABS(:dbl)

Author
Pascal Filion
Since
2.3
Version
2.5

Constructor Summary

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

Creates a new AbsExpression.

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.
public String
public JPQLQueryBNF
Inherited from org.eclipse.persistence.jpa.jpql.parser.AbstractSingleEncapsulatedExpression:
acceptChildrenaddChildrenToaddOrderedEncapsulatedExpressionTofindQueryBNFgetExpressionhasEncapsulatedExpressionhasExpressionparseEncapsulatedExpressionremoveEncapsulatedExpressionsetExpressiontoParsedTextEncapsulatedExpression

Constructor Detail

AbsExpressionback to summary
public AbsExpression(AbstractExpression parent)

Creates a new AbsExpression.

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
getEncapsulatedExpressionQueryBNFIdback to summary
public String getEncapsulatedExpressionQueryBNFId()

Implements abstract org.eclipse.persistence.jpa.jpql.parser.AbstractSingleEncapsulatedExpression.getEncapsulatedExpressionQueryBNFId.

Doc from org.eclipse.persistence.jpa.jpql.parser.AbstractSingleEncapsulatedExpression.getEncapsulatedExpressionQueryBNFId.

Returns the BNF used to parse the encapsulated expression.

Returns:String

The BNF used to parse the encapsulated expression

Annotations
@Override
getQueryBNFback to summary
public JPQLQueryBNF getQueryBNF()

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

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

Returns the BNF of this Expression.

Returns:JPQLQueryBNF

The JPQLQueryBNF, which represents the grammar of this Expression

Annotations
@Override