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

public abstract Class ArithmeticExpression

extends CompoundExpression
Class Inheritance
Known Direct Subclasses
org.eclipse.persistence.jpa.jpql.parser.MultiplicationExpression, org.eclipse.persistence.jpa.jpql.parser.DivisionExpression, org.eclipse.persistence.jpa.jpql.parser.SubtractionExpression, org.eclipse.persistence.jpa.jpql.parser.AdditionExpression
Imports
org.eclipse.persistence.jpa.jpql.WordParser

This expression represents an arithmetic expression, which means the first and second expressions are aggregated with an arithmetic sign.
Author
Pascal Filion
Since
2.3
Version
2.5
See Also
AdditionExpression, DivisionExpression, MultiplicationExpression, SubtractionExpression

Constructor Summary

AccessConstructor and Description
protected
ArithmeticExpression(AbstractExpression
The parent of this expression
parent
,
String
The arithmetic sign
identifier
)

Creates a new ArithmeticExpression.

Method Summary

Modifier and TypeMethod and Description
public JPQLQueryBNF
findQueryBNF(Expression
The Expression that is a descendant of this one
expression
)

Overrides org.eclipse.persistence.jpa.jpql.parser.CompoundExpression.findQueryBNF.

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

Retrieves the JPQLQueryBNF that represents the fragment of this Expression that was used when parsing the given Expression.
public final String

Returns:

The single character value of the arithmetic sign
getArithmeticSign
()

Returns the arithmetic sign this expression is actually representing.

public String
getLeftExpressionQueryBNFId()

Implements abstract org.eclipse.persistence.jpa.jpql.parser.CompoundExpression.getLeftExpressionQueryBNFId.

Returns the unique identifier of the JPQLQueryBNF for the left expression.
public final JPQLQueryBNF
public final String
getRightExpressionQueryBNFId()

Implements abstract org.eclipse.persistence.jpa.jpql.parser.CompoundExpression.getRightExpressionQueryBNFId.

Returns the unique identifier of the JPQLQueryBNF for the right expression.
protected boolean
isParsingComplete(WordParser
The text to parse based on the current position of the cursor
wordParser
,
String
The word that was retrieved from the given text, which is the first word in the text
word
,
Expression
The Expression that has already been parsed
expression
)

Overrides org.eclipse.persistence.jpa.jpql.parser.AbstractExpression.isParsingComplete.

Determines whether the parsing is complete based on what is left in the given text.
protected final String
parseIdentifier(WordParser
The WordParser containing the text to parse, which starts with the identifier
wordParser
)

Implements abstract org.eclipse.persistence.jpa.jpql.parser.CompoundExpression.parseIdentifier.

Parses the identifier of this expression.
Inherited from org.eclipse.persistence.jpa.jpql.parser.CompoundExpression:
acceptChildrenaddChildrenToaddOrderedChildrenTogetActualIdentifiergetIdentifiergetLeftExpressiongetRightExpressionhasLeftExpressionhasRightExpressionhasSpaceAfterIdentifierparsesetLeftExpressionsetRightExpressiontoParsedText

Constructor Detail

ArithmeticExpressionback to summary
protected ArithmeticExpression(AbstractExpression parent, String identifier)

Creates a new ArithmeticExpression.

Parameters
parent:AbstractExpression

The parent of this expression

identifier:String

The arithmetic sign

Method Detail

findQueryBNFback to summary
public JPQLQueryBNF findQueryBNF(Expression expression)

Overrides org.eclipse.persistence.jpa.jpql.parser.CompoundExpression.findQueryBNF.

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

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

Retrieves the JPQLQueryBNF that represents the fragment of this Expression that was used when parsing the given Expression.

Parameters
expression:Expression

The Expression that is a descendant of this one

Returns:JPQLQueryBNF

The JPQLQueryBNF that was used to parse the given expression

Annotations
@Override
getArithmeticSignback to summary
public final String getArithmeticSign()

Returns the arithmetic sign this expression is actually representing.

Returns:String

The single character value of the arithmetic sign

getLeftExpressionQueryBNFIdback to summary
public String getLeftExpressionQueryBNFId()

Implements abstract org.eclipse.persistence.jpa.jpql.parser.CompoundExpression.getLeftExpressionQueryBNFId.

Doc from org.eclipse.persistence.jpa.jpql.parser.CompoundExpression.getLeftExpressionQueryBNFId.

Returns the unique identifier of the JPQLQueryBNF for the left expression.

Returns:String

The ID of the BNF used when parsing the expression before the identifier

Annotations
@Override
getQueryBNFback to summary
public final 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
getRightExpressionQueryBNFIdback to summary
public final String getRightExpressionQueryBNFId()

Implements abstract org.eclipse.persistence.jpa.jpql.parser.CompoundExpression.getRightExpressionQueryBNFId.

Doc from org.eclipse.persistence.jpa.jpql.parser.CompoundExpression.getRightExpressionQueryBNFId.

Returns the unique identifier of the JPQLQueryBNF for the right expression.

Returns:String

The ID of the BNF used when parsing the expression after the identifier

Annotations
@Override
isParsingCompleteback to summary
protected boolean isParsingComplete(WordParser wordParser, String word, Expression expression)

Overrides org.eclipse.persistence.jpa.jpql.parser.AbstractExpression.isParsingComplete.

Doc from org.eclipse.persistence.jpa.jpql.parser.AbstractExpression.isParsingComplete.

Determines whether the parsing is complete based on what is left in the given text. The text is never empty.

Parameters
wordParser:WordParser

The text to parse based on the current position of the cursor

word:String

The word that was retrieved from the given text, which is the first word in the text

expression:Expression

The Expression that has already been parsed

Returns:boolean

true if the text no longer can't be parsed by the current expression; false if more can be parsed

Annotations
@Override
parseIdentifierback to summary
protected final String parseIdentifier(WordParser wordParser)

Implements abstract org.eclipse.persistence.jpa.jpql.parser.CompoundExpression.parseIdentifier.

Doc from org.eclipse.persistence.jpa.jpql.parser.CompoundExpression.parseIdentifier.

Parses the identifier of this expression.

Parameters
wordParser:WordParser

The WordParser containing the text to parse, which starts with the identifier

Returns:String

The identifier for this expression

Annotations
@Override