public abstract class AbstractModifyClauseStateObject extends AbstractStateObject implements DeclarationStateObject
Modifier and Type | Method and Description |
---|---|
ListIterable<VariableDeclarationStateObject> |
declarations()
Returns the list of declarations declared in the declaration clause of the current query.
|
IManagedType |
findManagedType(StateObject stateObject)
Returns the
IManagedType for the given identification variable. |
java.lang.String |
getAbstractSchemaName()
Returns the abstract schema name.
|
AbstractSchemaNameStateObject |
getAbstractSchemaNameStateObject()
Returns the
AbstractSchemaNameStateObject holding onto the abstract schema name. |
DeclarationStateObject |
getDeclaration()
Returns the declaration clause which defines the domain of the query by declaring
identification variables.
|
IEntity |
getEntity()
Returns the actual
IEntity that has the abstract schema name. |
java.lang.String |
getIdentificationVariable()
Returns the identification variable name that is ranging over the abstract schema type.
|
IdentificationVariableStateObject |
getIdentificationVariableStateObject()
Returns the
IdentificationVariableStateObject holding onto the identification variable. |
abstract java.lang.String |
getIdentifier()
Returns the JPQL identifier of this clause.
|
IManagedType |
getManagedType(StateObject stateObject)
Returns the
IManagedType for the given identification variable. |
AbstractModifyStatementStateObject |
getParent()
Returns the parent of this
StateObject . |
RangeVariableDeclarationStateObject |
getRangeVariableDeclaration()
Returns the
StateObject that defines the range variable declaration. |
boolean |
hasIdentificationVariable()
Determines whether an identification variable was defined.
|
boolean |
isEquivalent(StateObject stateObject)
Determines whether the given
StateObject is equivalent to this one, i.e. |
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 abstractSchemaName)
Sets the abstract schema name to the given value and removes the identification variable.
|
void |
setDeclaration(java.lang.String abstractSchemaName,
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 entityName)
Sets the name of the abstract schema, which is the name of the entity.
|
void |
setIdentificationVariable(java.lang.String identificationVariable)
Sets the new identification variable that will range over the abstract schema name.
|
addPropertyChangeListener, children, decorate, equals, findIdentificationVariable, getDecorator, getExpression, getGrammar, getManagedTypeProvider, getQueryBuilder, getRoot, getType, getType, getTypeHelper, getTypeRepository, hashCode, isDecorated, removePropertyChangeListener, setExpression, setParent, toString, toString, toText
accept, addPropertyChangeListener, children, decorate, findIdentificationVariable, getDecorator, getExpression, getGrammar, getManagedTypeProvider, getQueryBuilder, getRoot, isDecorated, removePropertyChangeListener, setParent, toString, toText
public ListIterable<VariableDeclarationStateObject> declarations()
declarations
in interface DeclarationStateObject
VariableDeclarationStateObject
that define the domain of the querypublic IManagedType findManagedType(StateObject stateObject)
IManagedType
for the given identification variable. If the declaration is
for a subquery and there is no managed type associated with the identification then the search
will traverse up the query hierarchy.
SELECT e FROM Department d JOIN KEY(d.employees).addresses a
In the above query, the managed type associated with the identification variable:
findManagedType
in interface DeclarationStateObject
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 variableDeclarationStateObject.getManagedType(StateObject)
public java.lang.String getAbstractSchemaName()
public AbstractSchemaNameStateObject getAbstractSchemaNameStateObject()
AbstractSchemaNameStateObject
holding onto the abstract schema name.AbstractSchemaNameStateObject
, which is never null
public DeclarationStateObject getDeclaration()
getDeclaration
in interface StateObject
getDeclaration
in class AbstractStateObject
StateObject
is a child; i.e. either the
top-level declaration if this is part of the top query or the sub-level declaration if this is
part of a subquerypublic IEntity getEntity()
IEntity
that has the abstract schema name.IEntity
or null
if no entity existspublic java.lang.String getIdentificationVariable()
public IdentificationVariableStateObject getIdentificationVariableStateObject()
IdentificationVariableStateObject
holding onto the identification variable.IdentificationVariableStateObject
, which is never null
public abstract java.lang.String getIdentifier()
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:
getManagedType
in interface DeclarationStateObject
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 variableDeclarationStateObject.findManagedType(StateObject)
public AbstractModifyStatementStateObject getParent()
StateObject
.getParent
in interface StateObject
getParent
in class AbstractStateObject
StateObject
, which is null
only when
this is the root of the hierarchypublic RangeVariableDeclarationStateObject getRangeVariableDeclaration()
StateObject
that defines the range variable declaration.StateObject
that defines the range variable declaration, which is never
null
public boolean hasIdentificationVariable()
true
if an identification variable is defined; false
otherwisepublic boolean isEquivalent(StateObject stateObject)
StateObject
is equivalent to this one, i.e. the
information of both StateObject
is the same.isEquivalent
in interface StateObject
isEquivalent
in class AbstractStateObject
stateObject
- The StateObject
to compare its content to this onetrue
if both object are equivalent; false
otherwisepublic 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 abstractSchemaName)
abstractSchemaName
- The name of the abstract schema, which is the name of the entitypublic void setDeclaration(java.lang.String abstractSchemaName, java.lang.String identificationVariable)
abstractSchemaName
- The name of the abstract schema, which is the name of the entityidentificationVariable
- The new identification variablepublic void setEntity(IEntity entity)
IEntity
and updates the abstract schema name.entity
- The IEntity
that this clause will range overpublic void setEntityName(java.lang.String entityName)
entityName
- The name of the entitypublic void setIdentificationVariable(java.lang.String identificationVariable)
identificationVariable
- The new identification variableEclipseLink 2.6.3, "build v20160428-59c81c5" API Reference