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

public Class NumericLiteralStateObject

extends SimpleStateObject
Class Inheritance
Imports
org.eclipse.persistence.jpa.jpql.parser.NumericLiteral

Exact numeric literals support the use of Java integer literal syntax as well as SQL exact numeric literal syntax. Approximate literals support the use of Java floating point literal syntax as well as SQL approximate numeric literal syntax.

Appropriate suffixes may be used to indicate the specific type of a numeric literal in accordance with the Java Language Specification.

Author
Pascal Filion
Since
2.4
Version
2.4
See Also
NumericLiteral

Field Summary

Inherited from org.eclipse.persistence.jpa.jpql.tools.model.query.SimpleStateObject:
TEXT_PROPERTY

Constructor Summary

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

Creates a new NumericLiteralStateObject.

public
NumericLiteralStateObject(StateObject
The parent of this state object, which cannot be null
parent
,
Number
The actual number
numeric
)

Creates a new NumericLiteralStateObject.

public
NumericLiteralStateObject(StateObject
The parent of this state object, which cannot be null
parent
,
String
The string representation of the numeric literal
numeric
)

Creates a new NumericLiteralStateObject.

Method Summary

Modifier and TypeMethod and Description
public void
public NumericLiteral
getExpression()

Overrides org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractStateObject.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.
public void
setExpression(NumericLiteral
The parsed object representing a numeric literal
expression
)

Keeps a reference of the parsed object object, which should only be done when this object is instantiated during the conversion of a parsed JPQL query into StateObjects.

Inherited from org.eclipse.persistence.jpa.jpql.tools.model.query.SimpleStateObject:
getTexthasTextisEquivalentsetTextsetTextInternallytoTextInternal

Constructor Detail

NumericLiteralStateObjectback to summary
public NumericLiteralStateObject(StateObject parent)

Creates a new NumericLiteralStateObject.

Parameters
parent:StateObject

The parent of this state object, which cannot be null

Exceptions
NullPointerException:
The given parent cannot be null
NumericLiteralStateObjectback to summary
public NumericLiteralStateObject(StateObject parent, Number numeric)

Creates a new NumericLiteralStateObject.

Parameters
parent:StateObject

The parent of this state object, which cannot be null

numeric:Number

The actual number

Exceptions
NullPointerException:
The given parent cannot be null
NumericLiteralStateObjectback to summary
public NumericLiteralStateObject(StateObject parent, String numeric)

Creates a new NumericLiteralStateObject.

Parameters
parent:StateObject

The parent of this state object, which cannot be null

numeric:String

The string representation of the numeric literal

Exceptions
NullPointerException:
The given parent cannot be null

Method Detail

acceptback to summary
public void accept(StateObjectVisitor visitor)

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

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

Visits this StateObject by the given visitor.

Parameters
visitor:StateObjectVisitor

The visitor to visit this object

Annotations
@Override
getExpressionback to summary
public NumericLiteral getExpression()

Overrides org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractStateObject.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:NumericLiteral

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
setExpressionback to summary
public void setExpression(NumericLiteral expression)

Keeps a reference of the parsed object object, which should only be done when this object is instantiated during the conversion of a parsed JPQL query into StateObjects.

Parameters
expression:NumericLiteral

The parsed object representing a numeric literal