public class DerivedPathVariableDeclarationStateObject extends AbstractRangeVariableDeclarationStateObject
subselect_identification_variable_declaration ::= derived_path_expression [AS] identification_variable {join}*
derived_path_expression ::= superquery_identification_variable.{single_valued_object_field.}*collection_valued_field |
superquery_identification_variable.{single_valued_object_field.}*single_valued_object_field
RangeVariableDeclaration
AS_PROPERTY, IDENTIFICATION_VARIABLE_PROPERTY
Constructor and Description |
---|
DerivedPathVariableDeclarationStateObject(DerivedPathIdentificationVariableDeclarationStateObject parent)
Creates a new
DerivedPathVariableDeclarationStateObject . |
DerivedPathVariableDeclarationStateObject(DerivedPathIdentificationVariableDeclarationStateObject parent,
java.lang.String path)
Creates a new
DerivedPathVariableDeclarationStateObject . |
Modifier and Type | Method and Description |
---|---|
void |
accept(StateObjectVisitor visitor)
Visits this
StateObject by the given visitor . |
protected StateObject |
buildRootStateObject() |
IManagedType |
getManagedType(StateObject stateObject)
Returns the
IManagedType for the given identification variable. |
DerivedPathIdentificationVariableDeclarationStateObject |
getParent()
Returns the parent of this
StateObject . |
java.lang.String |
getPath()
Returns the string representation of the path expression.
|
java.lang.String |
getRootPath()
Returns the "root" object for objects which may not be reachable by navigation.
|
CollectionValuedPathExpressionStateObject |
getRootStateObject()
Returns the
StateObject holding onto the abstract schema name. |
void |
setRootPath(java.lang.String path)
Sets the "root" object for objects which may not be reachable by navigation.
|
addAs, addChildren, addProblems, getExpression, getIdentificationVariable, getIdentificationVariableStateObject, hasAs, hasIdentificationVariable, identificationVariables, initialize, isEquivalent, isIdentificationVariableOptional, isIdentificationVariableVirtual, setAs, setExpression, setIdentificationVariable, setIdentificationVariableOptional, toggleAs, toTextInternal
acceptUnknownVisitor, acceptUnknownVisitor, addPropertyChangeListener, areEquivalent, buildProblem, buildProblem, buildStateObject, buildStateObjects, checkParent, children, decorate, equals, findIdentificationVariable, firePropertyChanged, getChangeSupport, getDeclaration, getDecorator, getGrammar, getManagedTypeProvider, getQueryBuilder, getRoot, getType, getType, getTypeHelper, getTypeRepository, hashCode, isDecorated, parent, parent, parent, removePropertyChangeListener, setExpression, setParent, toString, toString, toStringInternal, toStringItems, toText
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addPropertyChangeListener, children, decorate, findIdentificationVariable, getDeclaration, getDecorator, getGrammar, getManagedTypeProvider, getQueryBuilder, getRoot, isDecorated, removePropertyChangeListener, setParent, toString, toText
public DerivedPathVariableDeclarationStateObject(DerivedPathIdentificationVariableDeclarationStateObject parent)
DerivedPathVariableDeclarationStateObject
.parent
- The parent of this state object, which cannot be null
java.lang.NullPointerException
- The given parent cannot be null
public DerivedPathVariableDeclarationStateObject(DerivedPathIdentificationVariableDeclarationStateObject parent, java.lang.String path)
DerivedPathVariableDeclarationStateObject
.parent
- The parent of this state object, which cannot be null
path
- Either the derived singled-valued object path expression or the collection-valued
path expressionjava.lang.NullPointerException
- The given parent cannot be null
public void accept(StateObjectVisitor visitor)
StateObject
by the given visitor
.visitor
- The visitor
to visit this objectprotected StateObject buildRootStateObject()
buildRootStateObject
in class AbstractRangeVariableDeclarationStateObject
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
VALUE
IManagedType
representing the domain object declared by the given
identification variablepublic DerivedPathIdentificationVariableDeclarationStateObject getParent()
StateObject
.getParent
in interface StateObject
getParent
in class AbstractStateObject
StateObject
, which is null
only when
this is the root of the hierarchypublic java.lang.String getPath()
null
public java.lang.String getRootPath()
getRootPath
in class AbstractRangeVariableDeclarationStateObject
public CollectionValuedPathExpressionStateObject getRootStateObject()
StateObject
holding onto the abstract schema name.getRootStateObject
in class AbstractRangeVariableDeclarationStateObject
StateObject
, which is never null
public void setRootPath(java.lang.String path)
setRootPath
in class AbstractRangeVariableDeclarationStateObject
path
- The "root" object