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

public Class AbstractSchemaNameStateObject

extends SimpleStateObject
Class Inheritance
Imports
org.eclipse.persistence.jpa.jpql.parser.AbstractSchemaName, org.eclipse.persistence.jpa.jpql.tools.spi.IEntity

An abstract schema name designates the abstract schema type over which the query ranges.
Author
Pascal Filion
Since
2.4
Version
2.4
See Also
AbstractSchemaName

Field Summary

Modifier and TypeField and Description
private IEntity
entity

The actual IEntity is it was resolved.

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

Constructor Summary

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

Creates a new AbstractSchemaNameStateObject.

public
AbstractSchemaNameStateObject(StateObject
The parent of this state object, which cannot be null
parent
,
IEntity
The IEntity itself
entity
)

Creates a new AbstractSchemaNameStateObject.

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

Creates a new AbstractSchemaNameStateObject.

Method Summary

Modifier and TypeMethod and Description
public void
public IEntity

Returns:

The actual IEntity or null if no entity exists with the entity name
getEntity
()

Returns the actual external form representing the IEntity.

public AbstractSchemaName
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 String

Returns:

The name of the abstract schema, which is the name of the entity
getText
()

Overrides org.eclipse.persistence.jpa.jpql.tools.model.query.SimpleStateObject.getText.

Returns the name of the abstract schema, which is the name of the entity.
public boolean

Returns:

true if an entity exists with the abstract schema name in the managed types provider; false otherwise
isEntityResolved
()

Determines whether the IEntity has been resolved.

public void
resolveEntity()

Resolves the abstract schema name and retrieve the associated IEntity.

public void
setEntity(IEntity
The new IEntity
entity
)

Sets the actual IEntity and updates the abstract schema name.

public void
setExpression(AbstractSchemaName
The parsed object representing an abstract schema name (entity name)
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.

public void
setText(String
The name of the abstract schema, which is the name of the entity
abstractSchemaName
)

Overrides org.eclipse.persistence.jpa.jpql.tools.model.query.SimpleStateObject.setText.

Sets the name of the abstract schema, which is the name of the entity.
Inherited from org.eclipse.persistence.jpa.jpql.tools.model.query.SimpleStateObject:
hasTextisEquivalentsetTextInternallytoTextInternal

Field Detail

entityback to summary
private IEntity entity

The actual IEntity is it was resolved.

Constructor Detail

AbstractSchemaNameStateObjectback to summary
public AbstractSchemaNameStateObject(StateObject parent)

Creates a new AbstractSchemaNameStateObject.

Parameters
parent:StateObject

The parent of this state object, which cannot be null

Exceptions
NullPointerException:
The given parent cannot be null
AbstractSchemaNameStateObjectback to summary
public AbstractSchemaNameStateObject(StateObject parent, IEntity entity)

Creates a new AbstractSchemaNameStateObject.

Parameters
parent:StateObject

The parent of this state object, which cannot be null

entity:IEntity

The IEntity itself

Exceptions
NullPointerException:
The given parent cannot be null
AbstractSchemaNameStateObjectback to summary
public AbstractSchemaNameStateObject(StateObject parent, String entityName)

Creates a new AbstractSchemaNameStateObject.

Parameters
parent:StateObject

The parent of this state object, which cannot be null

entityName: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
getEntityback to summary
public IEntity getEntity()

Returns the actual external form representing the IEntity.

Returns:IEntity

The actual IEntity or null if no entity exists with the entity name

getExpressionback to summary
public AbstractSchemaName 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:AbstractSchemaName

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
getTextback to summary
public String getText()

Overrides org.eclipse.persistence.jpa.jpql.tools.model.query.SimpleStateObject.getText.

Returns the name of the abstract schema, which is the name of the entity.

Returns:String

The name of the abstract schema, which is the name of the entity

Annotations
@Override
isEntityResolvedback to summary
public boolean isEntityResolved()

Determines whether the IEntity has been resolved.

Returns:boolean

true if an entity exists with the abstract schema name in the managed types provider; false otherwise

resolveEntityback to summary
public void resolveEntity()

Resolves the abstract schema name and retrieve the associated IEntity.

setEntityback to summary
public void setEntity(IEntity entity)

Sets the actual IEntity and updates the abstract schema name.

Parameters
entity:IEntity

The new IEntity

setExpressionback to summary
public void setExpression(AbstractSchemaName 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:AbstractSchemaName

The parsed object representing an abstract schema name (entity name)

setTextback to summary
public void setText(String abstractSchemaName)

Overrides org.eclipse.persistence.jpa.jpql.tools.model.query.SimpleStateObject.setText.

Sets the name of the abstract schema, which is the name of the entity.

Parameters
abstractSchemaName:String

The name of the abstract schema, which is the name of the entity

Annotations
@Override