Class AbstractSchemaNameStateObject
java.lang.Object
org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractStateObject
org.eclipse.persistence.jpa.jpql.tools.model.query.SimpleStateObject
org.eclipse.persistence.jpa.jpql.tools.model.query.AbstractSchemaNameStateObject
- All Implemented Interfaces:
StateObject
An abstract schema name designates the abstract schema type over which the query ranges.
- Since:
- 2.4
- Version:
- 2.4
- See Also:
-
Field Summary
Fields inherited from class org.eclipse.persistence.jpa.jpql.tools.model.query.SimpleStateObject
TEXT_PROPERTY -
Constructor Summary
ConstructorsConstructorDescriptionCreates a newAbstractSchemaNameStateObject.AbstractSchemaNameStateObject(StateObject parent, String entityName) Creates a newAbstractSchemaNameStateObject.AbstractSchemaNameStateObject(StateObject parent, IEntity entity) Creates a newAbstractSchemaNameStateObject. -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(StateObjectVisitor visitor) Visits thisStateObjectby the givenvisitor.Returns the actual external form representing theIEntity.Returns the actual parsed object if thisStateObjectrepresentation of the JPQL query was created by parsing an existing JPQL query.getText()Returns the name of the abstract schema, which is the name of the entity.booleanDetermines whether theIEntityhas been resolved.voidResolves the abstract schema name and retrieve the associatedIEntity.voidSets the actualIEntityand updates the abstract schema name.voidsetExpression(AbstractSchemaName expression) Keeps a reference of theparsed objectobject, which should only be done when this object is instantiated during the conversion of a parsed JPQL query intoStateObjects.voidSets the name of the abstract schema, which is the name of the entity.Methods inherited from class org.eclipse.persistence.jpa.jpql.tools.model.query.SimpleStateObject
hasText, isEquivalent, setTextInternally, toTextInternalMethods inherited from class org.eclipse.persistence.jpa.jpql.tools.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
-
Constructor Details
-
AbstractSchemaNameStateObject
Creates a newAbstractSchemaNameStateObject.- Parameters:
parent- The parent of this state object, which cannot benull- Throws:
NullPointerException- The given parent cannot benull
-
AbstractSchemaNameStateObject
Creates a newAbstractSchemaNameStateObject.- Parameters:
parent- The parent of this state object, which cannot benullentity- TheIEntityitself- Throws:
NullPointerException- The given parent cannot benull
-
AbstractSchemaNameStateObject
Creates a newAbstractSchemaNameStateObject.- Parameters:
parent- The parent of this state object, which cannot benullentityName- The name of the entity- Throws:
NullPointerException- The given parent cannot benull
-
-
Method Details
-
accept
Description copied from interface:StateObjectVisits thisStateObjectby the givenvisitor.- Parameters:
visitor- Thevisitorto visit this object
-
getEntity
Returns the actual external form representing theIEntity.- Returns:
- The actual
IEntityornullif no entity exists with the entity name
-
getExpression
Description copied from interface:StateObjectReturns the actual parsed object if thisStateObjectrepresentation of the JPQL query was created by parsing an existing JPQL query.- Specified by:
getExpressionin interfaceStateObject- Overrides:
getExpressionin classAbstractStateObject- Returns:
- The parsed object when a JPQL query is parsed and converted into a
StateObjectornullwhen the JPQL query is manually created (i.e. not from a string)
-
getText
Returns the name of the abstract schema, which is the name of the entity.- Overrides:
getTextin classSimpleStateObject- Returns:
- The name of the abstract schema, which is the name of the entity
-
isEntityResolved
public boolean isEntityResolved()Determines whether theIEntityhas been resolved.- Returns:
trueif an entity exists with the abstract schema name in the managed types provider;falseotherwise
-
resolveEntity
public void resolveEntity()Resolves the abstract schema name and retrieve the associatedIEntity. -
setEntity
Sets the actualIEntityand updates the abstract schema name.- Parameters:
entity- The newIEntity
-
setExpression
Keeps a reference of theparsed objectobject, which should only be done when this object is instantiated during the conversion of a parsed JPQL query intoStateObjects.- Parameters:
expression- Theparsed objectrepresenting an abstract schema name (entity name)
-
setText
Sets the name of the abstract schema, which is the name of the entity.- Overrides:
setTextin classSimpleStateObject- Parameters:
abstractSchemaName- The name of the abstract schema, which is the name of the entity
-