Top Description Fields Constructors Methods
org.eclipse.persistence.jpa.jpql.tools.model.query

public abstract Class ArithmeticExpressionStateObject

extends CompoundExpressionStateObject
Class Inheritance
Known Direct Subclasses
org.eclipse.persistence.jpa.jpql.tools.model.query.DivisionExpressionStateObject, org.eclipse.persistence.jpa.jpql.tools.model.query.MultiplicationExpressionStateObject, org.eclipse.persistence.jpa.jpql.tools.model.query.SubtractionExpressionStateObject, org.eclipse.persistence.jpa.jpql.tools.model.query.AdditionExpressionStateObject
Imports
org.eclipse.persistence.jpa.jpql.parser.ArithmeticExpression, .ArithmeticExpressionBNF, .ArithmeticTermBNF

This expression represents an arithmetic expression, which means the first and second expressions are aggregated with an arithmetic sign.

BNF: arithmetic_expression ::= arithmetic_expression <identifier> arithmetic_term

Author
Pascal Filion
Since
2.4
Version
2.4
See Also
AdditionExpressionStateObject, DivisionExpressionStateObject, MultiplicationExpressionStateObject, SubtractionExpressionStateObject, ArithmeticExpression

Field Summary

Inherited from org.eclipse.persistence.jpa.jpql.tools.model.query.CompoundExpressionStateObject:
LEFT_STATE_OBJECT_PROPERTYRIGHT_STATE_OBJECT_PROPERTY

Constructor Summary

AccessConstructor and Description
protected
ArithmeticExpressionStateObject(StateObject
The parent of this state object, which cannot be null
parent
)

Creates a new ArithmeticExpressionStateObject.

protected
ArithmeticExpressionStateObject(StateObject
The parent of this state object, which cannot be null
parent
,
StateObject
The StateObject representing the left expression
leftStateObject
,
StateObject
The StateObject representing the right expression
rightStateObject
)

Creates a new ArithmeticExpressionStateObject.

protected
ArithmeticExpressionStateObject(StateObject
The parent of this state object, which cannot be null
parent
,
String
The string representation of the left expression to parse and to convert into a StateObject
leftJpqlFragment
,
String
The string representation of the right expression to parse and to convert into a StateObject
rightJpqlFragment
)

Creates a new ArithmeticExpressionStateObject.

Method Summary

Modifier and TypeMethod and Description
public ArithmeticExpression
getExpression()

Overrides org.eclipse.persistence.jpa.jpql.tools.model.query.CompoundExpressionStateObject.getExpression.

Implements org.eclipse.persistence.jpa.jpql.tools.model.query.StateObject.getExpression.

Returns the actual parsed object if this StateObject representation of the JPQL query was created by parsing an existing JPQL query.
protected String
getLeftQueryBNFId()

Implements abstract org.eclipse.persistence.jpa.jpql.tools.model.query.CompoundExpressionStateObject.getLeftQueryBNFId.

Returns the unique identifier of the BNF that will be used to parse a JPQL fragment as the left side of the expression.
protected String
getRightQueryBNFId()

Implements abstract org.eclipse.persistence.jpa.jpql.tools.model.query.CompoundExpressionStateObject.getRightQueryBNFId.

Returns the unique identifier of the BNF that will be used to parse a JPQL fragment as the right side of the expression.
Inherited from org.eclipse.persistence.jpa.jpql.tools.model.query.CompoundExpressionStateObject:
addChildrengetIdentifiergetLeftgetRighthasLefthasRightisEquivalentparseLeftparseRightsetLeftsetRighttoTextInternal

Constructor Detail

ArithmeticExpressionStateObjectback to summary
protected ArithmeticExpressionStateObject(StateObject parent)

Creates a new ArithmeticExpressionStateObject.

Parameters
parent:StateObject

The parent of this state object, which cannot be null

Exceptions
NullPointerException:
The given parent cannot be null
ArithmeticExpressionStateObjectback to summary
protected ArithmeticExpressionStateObject(StateObject parent, StateObject leftStateObject, StateObject rightStateObject)

Creates a new ArithmeticExpressionStateObject.

Parameters
parent:StateObject

The parent of this state object, which cannot be null

leftStateObject:StateObject

The StateObject representing the left expression

rightStateObject:StateObject

The StateObject representing the right expression

Exceptions
NullPointerException:
The given parent cannot be null
ArithmeticExpressionStateObjectback to summary
protected ArithmeticExpressionStateObject(StateObject parent, String leftJpqlFragment, String rightJpqlFragment)

Creates a new ArithmeticExpressionStateObject.

Parameters
parent:StateObject

The parent of this state object, which cannot be null

leftJpqlFragment:String

The string representation of the left expression to parse and to convert into a StateObject

rightJpqlFragment:String

The string representation of the right expression to parse and to convert into a StateObject

Exceptions
NullPointerException:
The given parent cannot be null

Method Detail

getExpressionback to summary
public ArithmeticExpression getExpression()

Overrides org.eclipse.persistence.jpa.jpql.tools.model.query.CompoundExpressionStateObject.getExpression.

Implements org.eclipse.persistence.jpa.jpql.tools.model.query.StateObject.getExpression.

Doc from org.eclipse.persistence.jpa.jpql.tools.model.query.StateObject.getExpression.

Returns the actual parsed object if this StateObject representation of the JPQL query was created by parsing an existing JPQL query.

Returns:ArithmeticExpression

The parsed object when a JPQL query is parsed and converted into a StateObject or null when the JPQL query is manually created (i.e. not from a string)

Annotations
@Override
getLeftQueryBNFIdback to summary
protected String getLeftQueryBNFId()

Implements abstract org.eclipse.persistence.jpa.jpql.tools.model.query.CompoundExpressionStateObject.getLeftQueryBNFId.

Doc from org.eclipse.persistence.jpa.jpql.tools.model.query.CompoundExpressionStateObject.getLeftQueryBNFId.

Returns the unique identifier of the BNF that will be used to parse a JPQL fragment as the left side of the expression.

Returns:String

The query BNF ID for the left side of the expression

Annotations
@Override
getRightQueryBNFIdback to summary
protected String getRightQueryBNFId()

Implements abstract org.eclipse.persistence.jpa.jpql.tools.model.query.CompoundExpressionStateObject.getRightQueryBNFId.

Doc from org.eclipse.persistence.jpa.jpql.tools.model.query.CompoundExpressionStateObject.getRightQueryBNFId.

Returns the unique identifier of the BNF that will be used to parse a JPQL fragment as the right side of the expression.

Returns:String

The query BNF ID for the right side of the expression

Annotations
@Override