public class RangeVariableDeclarationStateObject extends AbstractRangeVariableDeclarationStateObject
FROM clause.
range_variable_declaration ::= abstract_schema_name [AS] identification_variableRangeVariableDeclarationAS_PROPERTY, IDENTIFICATION_VARIABLE_PROPERTY| Constructor and Description |
|---|
RangeVariableDeclarationStateObject(AbstractModifyClauseStateObject parent)
Creates a new
RangeVariableDeclarationStateObject. |
RangeVariableDeclarationStateObject(IdentificationVariableDeclarationStateObject parent)
Creates a new
RangeVariableDeclarationStateObject. |
RangeVariableDeclarationStateObject(IdentificationVariableDeclarationStateObject parent,
java.lang.String entityName)
Creates a new
RangeVariableDeclarationStateObject. |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(StateObjectVisitor visitor)
Visits this
StateObject by the given visitor. |
RangeVariableDeclarationStateObject |
addAs()
Makes sure the
AS identifier is specified. |
protected StateObject |
buildRootStateObject() |
IEntity |
getEntity()
Returns the actual
IEntity that has the abstract schema name. |
java.lang.String |
getEntityName()
Returns the abstract schema name.
|
IManagedType |
getManagedType(StateObject stateObject)
Returns the
IManagedType for the given identification variable. |
java.lang.String |
getRootPath()
Returns the "root" object for objects which may not be reachable by navigation.
|
AbstractSchemaNameStateObject |
getRootStateObject()
Returns the
StateObject holding onto the abstract schema name. |
void |
setDeclaration(IEntity entity)
Sets the abstract schema name to the given value.
|
void |
setDeclaration(IEntity entity,
java.lang.String identificationVariable)
Sets the abstract schema name to the given value and the identification variable that will
range over it.
|
void |
setDeclaration(java.lang.String entityName,
java.lang.String identificationVariable)
Sets the abstract schema name to the given value and the identification variable that will
range over it.
|
void |
setEntity(IEntity entity)
Sets the actual
IEntity and updates the abstract schema name. |
void |
setEntityName(java.lang.String abstractSchemaName)
Sets the name of the abstract schema, which is the name of the entity.
|
void |
setRootPath(java.lang.String root)
Sets the "root" object for objects which may not be reachable by navigation.
|
addChildren, addProblems, getExpression, getIdentificationVariable, getIdentificationVariableStateObject, hasAs, hasIdentificationVariable, identificationVariables, initialize, isEquivalent, isIdentificationVariableOptional, isIdentificationVariableVirtual, setAs, setExpression, setIdentificationVariable, setIdentificationVariableOptional, toggleAs, toTextInternalacceptUnknownVisitor, acceptUnknownVisitor, 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, isDecorated, parent, parent, parent, removePropertyChangeListener, setExpression, setParent, toString, toString, toStringInternal, toStringItems, toTextclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddPropertyChangeListener, children, decorate, findIdentificationVariable, getDeclaration, getDecorator, getGrammar, getManagedTypeProvider, getParent, getQueryBuilder, getRoot, isDecorated, removePropertyChangeListener, setParent, toString, toTextpublic RangeVariableDeclarationStateObject(AbstractModifyClauseStateObject parent)
RangeVariableDeclarationStateObject.parent - The parent of this state object, which cannot be nulljava.lang.NullPointerException - The given parent cannot be nullpublic RangeVariableDeclarationStateObject(IdentificationVariableDeclarationStateObject parent)
RangeVariableDeclarationStateObject.parent - The parent of this state object, which cannot be nulljava.lang.NullPointerException - The given parent cannot be nullpublic RangeVariableDeclarationStateObject(IdentificationVariableDeclarationStateObject parent, java.lang.String entityName)
RangeVariableDeclarationStateObject.parent - The parent of this state object, which cannot be nullentityName - The name of the abstract schema, which is the name of the entityjava.lang.NullPointerException - The given parent cannot be nullpublic void accept(StateObjectVisitor visitor)
StateObject by the given visitor.visitor - The visitor to visit this objectpublic RangeVariableDeclarationStateObject addAs()
AS identifier is specified.addAs in class AbstractRangeVariableDeclarationStateObjectprotected StateObject buildRootStateObject()
buildRootStateObject in class AbstractRangeVariableDeclarationStateObjectpublic IEntity getEntity()
IEntity that has the abstract schema name.IEntity or null if no entity existspublic java.lang.String getEntityName()
public IManagedType getManagedType(StateObject stateObject)
IManagedType for the given identification variable. The search does not
traverse up the query hierarchy if this declaration is for a subquery.
SELECT e FROM Department d JOIN KEY(d.employees).addresses a
In the above query, the managed type associated with the identification variable:
stateObject - The StateObject that should be an simple identification variable or
an encapsulated identification variable with the identifier KEY or
VALUEIManagedType representing the domain object declared by the given
identification variablepublic java.lang.String getRootPath()
getRootPath in class AbstractRangeVariableDeclarationStateObjectpublic AbstractSchemaNameStateObject getRootStateObject()
StateObject holding onto the abstract schema name.getRootStateObject in class AbstractRangeVariableDeclarationStateObjectStateObject, which is never nullpublic void setDeclaration(IEntity entity)
entity - The IEntity that this clause will range overpublic void setDeclaration(IEntity entity, java.lang.String identificationVariable)
entity - The IEntity that this clause will range overidentificationVariable - The new identification variablepublic void setDeclaration(java.lang.String entityName,
java.lang.String identificationVariable)
entityName - The name of the entity nameidentificationVariable - The new identification variablepublic void setEntity(IEntity entity)
IEntity and updates the abstract schema name.entity - The IEntity that the clause will range overpublic void setEntityName(java.lang.String abstractSchemaName)
abstractSchemaName - The name of the abstract schema, which is the name of the entitypublic void setRootPath(java.lang.String root)
setRootPath in class AbstractRangeVariableDeclarationStateObjectroot - The "root" object