EclipseLink 2.4.2, build 'v20130514-5956486' API Reference

org.eclipse.persistence.jpa.jpql.model.query
Class AbstractSchemaNameStateObject

java.lang.Object
  extended by org.eclipse.persistence.jpa.jpql.model.query.AbstractStateObject
      extended by org.eclipse.persistence.jpa.jpql.model.query.SimpleStateObject
          extended by org.eclipse.persistence.jpa.jpql.model.query.AbstractSchemaNameStateObject
All Implemented Interfaces:
StateObject

public class AbstractSchemaNameStateObject
extends SimpleStateObject

An abstract schema name designates the abstract schema type over which the query ranges.

Version:
2.4
See Also:
AbstractSchemaName
Author:
Pascal Filion
Since:
2.4

Field Summary
 
Fields inherited from class org.eclipse.persistence.jpa.jpql.model.query.SimpleStateObject
TEXT_PROPERTY
 
Constructor Summary
AbstractSchemaNameStateObject(StateObject parent)
          Creates a new AbstractSchemaNameStateObject.
AbstractSchemaNameStateObject(StateObject parent, IEntity entity)
          Creates a new AbstractSchemaNameStateObject.
AbstractSchemaNameStateObject(StateObject parent, java.lang.String entityName)
          Creates a new AbstractSchemaNameStateObject.
 
Method Summary
 void accept(StateObjectVisitor visitor)
          Visits this StateObject by the given visitor.
 IEntity getEntity()
          Returns the actual external form representing the IEntity.
 AbstractSchemaName getExpression()
          Returns the actual parsed object if this StateObject representation of the JPQL query was created by parsing an existing JPQL query.
 java.lang.String getText()
          Returns the name of the abstract schema, which is the name of the entity.
 boolean isEntityResolved()
          Determines whether the IEntity has been resolved.
 void resolveEntity()
          Resolves the abstract schema name and retrieve the associated IEntity.
 void setEntity(IEntity entity)
          Sets the actual IEntity and updates the abstract schema name.
 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.
 void setText(java.lang.String abstractSchemaName)
          Sets the name of the abstract schema, which is the name of the entity.
 
Methods inherited from class org.eclipse.persistence.jpa.jpql.model.query.SimpleStateObject
hasText, isEquivalent, setTextInternally, toTextInternal
 
Methods inherited from class org.eclipse.persistence.jpa.jpql.model.query.AbstractStateObject
acceptUnknownVisitor, acceptUnknownVisitor, addChildren, addProblems, addPropertyChangeListener, areEquivalent, buildProblem, buildProblem, buildStateObject, buildStateObjects, checkParent, children, decorate, equals, findIdentificationVariable, firePropertyChanged, getChangeSupport, getDeclaration, getDecorator, getGrammar, getManagedTypeProvider, getParent, getQueryBuilder, getRoot, getType, getType, getTypeHelper, getTypeRepository, hashCode, initialize, isDecorated, parent, parent, parent, removePropertyChangeListener, setExpression, setParent, toString, toString, toStringInternal, toStringItems, toText
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractSchemaNameStateObject

public AbstractSchemaNameStateObject(StateObject parent)
Creates a new AbstractSchemaNameStateObject.

Parameters:
parent - The parent of this state object, which cannot be null
Throws:
java.lang.NullPointerException - The given parent cannot be null

AbstractSchemaNameStateObject

public AbstractSchemaNameStateObject(StateObject parent,
                                     IEntity entity)
Creates a new AbstractSchemaNameStateObject.

Parameters:
parent - The parent of this state object, which cannot be null
entity - The IEntity itself
Throws:
java.lang.NullPointerException - The given parent cannot be null

AbstractSchemaNameStateObject

public AbstractSchemaNameStateObject(StateObject parent,
                                     java.lang.String entityName)
Creates a new AbstractSchemaNameStateObject.

Parameters:
parent - The parent of this state object, which cannot be null
entityName - The name of the entity
Throws:
java.lang.NullPointerException - The given parent cannot be null
Method Detail

accept

public void accept(StateObjectVisitor visitor)
Visits this StateObject by the given visitor.

Parameters:
visitor - The visitor to visit this object

getEntity

public IEntity getEntity()
Returns the actual external form representing the IEntity.

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

getExpression

public AbstractSchemaName getExpression()
Returns the actual parsed object if this StateObject representation of the JPQL query was created by parsing an existing JPQL query.

Specified by:
getExpression in interface StateObject
Overrides:
getExpression in class AbstractStateObject
Returns:
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)

getText

public java.lang.String getText()
Returns the name of the abstract schema, which is the name of the entity.

Overrides:
getText in class SimpleStateObject
Returns:
The name of the abstract schema, which is the name of the entity

isEntityResolved

public boolean isEntityResolved()
Determines whether the IEntity has been resolved.

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

resolveEntity

public void resolveEntity()
Resolves the abstract schema name and retrieve the associated IEntity.


setEntity

public void setEntity(IEntity entity)
Sets the actual IEntity and updates the abstract schema name.

Parameters:
entity - The new IEntity

setExpression

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 - The parsed object representing an abstract schema name (entity name)

setText

public void setText(java.lang.String abstractSchemaName)
Sets the name of the abstract schema, which is the name of the entity.

Overrides:
setText in class SimpleStateObject
Parameters:
abstractSchemaName - The name of the abstract schema, which is the name of the entity

EclipseLink 2.4.2, build 'v20130514-5956486' API Reference