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

public Class EnumTypeStateObject

extends SimpleStateObject
Class Inheritance
Annotations
@SuppressWarnings:nls
Imports
org.eclipse.persistence.jpa.jpql.parser.AbstractPathExpression

This StateObject wraps the name of an Enum constant.
Author
Pascal Filion
Since
2.4
Version
2.4

Field Summary

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

Constructor Summary

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

Creates a new EnumTypeStateObject.

public
EnumTypeStateObject(StateObject
The parent of this state object, which cannot be null
parent
,
Enum<? extends Enum<?>>
The fully qualified name of the Enum type following by the constant
enumConstant
)

Creates a new EnumTypeStateObject.

public
EnumTypeStateObject(StateObject
The parent of this state object, which cannot be null
parent
,
String
The fully qualified name of the Enum constant
enumConstant
)

Creates a new EnumTypeStateObject.

Method Summary

Modifier and TypeMethod and Description
public void
public AbstractPathExpression
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(AbstractPathExpression
The parsed object representing the enum type
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.

private static String
toString(Enum<? extends Enum<?>> enumConstant)

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

Constructor Detail

EnumTypeStateObjectback to summary
public EnumTypeStateObject(StateObject parent)

Creates a new EnumTypeStateObject.

Parameters
parent:StateObject

The parent of this state object, which cannot be null

Exceptions
NullPointerException:
The given parent cannot be null
EnumTypeStateObjectback to summary
public EnumTypeStateObject(StateObject parent, Enum<? extends Enum<?>> enumConstant)

Creates a new EnumTypeStateObject.

Parameters
parent:StateObject

The parent of this state object, which cannot be null

enumConstant:Enum<? extends Enum<?>>

The fully qualified name of the Enum type following by the constant

Exceptions
NullPointerException:
The given parent cannot be null
EnumTypeStateObjectback to summary
public EnumTypeStateObject(StateObject parent, String enumConstant)

Creates a new EnumTypeStateObject.

Parameters
parent:StateObject

The parent of this state object, which cannot be null

enumConstant:String

The fully qualified name of the Enum constant

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 AbstractPathExpression 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:AbstractPathExpression

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(AbstractPathExpression 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:AbstractPathExpression

The parsed object representing the enum type

toStringback to summary
private static String toString(Enum<? extends Enum<?>> enumConstant)