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

public Class EntityTypeLiteralStateObject

extends SimpleStateObject
Class Inheritance
Imports
java.util.List, org.eclipse.persistence.jpa.jpql.parser.EntityTypeLiteral, org.eclipse.persistence.jpa.jpql.tools.model.Problem

This StateObject wraps the name of an entity type.
Author
Pascal Filion
Since
2.4
Version
2.4
See Also
EntityTypeLiteral

Field Summary

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

Constructor Summary

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

Creates a new EntityTypeLiteralStateObject.

public
EntityTypeLiteralStateObject(StateObject
The parent of this state object, which cannot be null
parent
,
String
The name of the entity
entityTypeName
)

Creates a new EntityTypeLiteralStateObject.

Method Summary

Modifier and TypeMethod and Description
public void
protected void
addProblems(List<Problem>
The list to which the problems are added
problems
)

Overrides org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractStateObject.addProblems.

Adds to the given list the problems that were found with the current state of this StateObject, which means there are validation issues.
public EntityTypeLiteral
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(EntityTypeLiteral
The parsed object representing an entity type 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

EntityTypeLiteralStateObjectback to summary
public EntityTypeLiteralStateObject(StateObject parent)

Creates a new EntityTypeLiteralStateObject.

Parameters
parent:StateObject

The parent of this state object, which cannot be null

Exceptions
NullPointerException:
The given parent cannot be null
EntityTypeLiteralStateObjectback to summary
public EntityTypeLiteralStateObject(StateObject parent, String entityTypeName)

Creates a new EntityTypeLiteralStateObject.

Parameters
parent:StateObject

The parent of this state object, which cannot be null

entityTypeName:String

The name of the entity

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
addProblemsback to summary
protected void addProblems(List<Problem> problems)

Overrides org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractStateObject.addProblems.

Doc from org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractStateObject.addProblems.

Adds to the given list the problems that were found with the current state of this StateObject, which means there are validation issues.

Parameters
problems:List<Problem>

The list to which the problems are added

Annotations
@Override
getExpressionback to summary
public EntityTypeLiteral 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:EntityTypeLiteral

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

The parsed object representing an entity type literal