|
EclipseLink 2.4.2, build 'v20130514-5956486' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.persistence.jpa.jpql.model.query.AbstractStateObject org.eclipse.persistence.jpa.jpql.model.query.AbstractModifyClauseStateObject
public abstract class AbstractModifyClauseStateObject
Constructor Summary | |
---|---|
protected |
AbstractModifyClauseStateObject(AbstractModifyStatementStateObject parent)
Creates a new UpdateClauseStateObject . |
Method Summary | |
---|---|
protected void |
addChildren(java.util.List<StateObject> children)
Adds the children of this StateObject to the given list. |
IterableListIterator<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. |
protected void |
initialize()
Initializes this state object. |
boolean |
isEquivalent(StateObject stateObject)
Determines whether the given StateObject is equivalent to this one, i.e. the
information of both StateObject is the same. |
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. |
protected void |
toTextInternal(java.lang.Appendable writer)
Prints out a string representation of this StateObject , which should not be used to
define a true string representation of a JPQL query but should be used for
debugging purposes. |
Methods inherited from class org.eclipse.persistence.jpa.jpql.model.query.AbstractStateObject |
---|
acceptUnknownVisitor, acceptUnknownVisitor, addProblems, addPropertyChangeListener, areEquivalent, buildProblem, buildProblem, buildStateObject, buildStateObjects, checkParent, children, decorate, equals, findIdentificationVariable, firePropertyChanged, getChangeSupport, getDecorator, getExpression, getGrammar, getManagedTypeProvider, getQueryBuilder, getRoot, getType, getType, getTypeHelper, getTypeRepository, hashCode, 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 |
Methods inherited from interface org.eclipse.persistence.jpa.jpql.model.query.StateObject |
---|
accept, addPropertyChangeListener, children, decorate, findIdentificationVariable, getDecorator, getExpression, getGrammar, getManagedTypeProvider, getQueryBuilder, getRoot, isDecorated, removePropertyChangeListener, setParent, toString, toText |
Constructor Detail |
---|
protected AbstractModifyClauseStateObject(AbstractModifyStatementStateObject parent)
UpdateClauseStateObject
.
parent
- The parent of this state objectMethod Detail |
---|
protected void addChildren(java.util.List<StateObject> children)
StateObject
to the given list.
addChildren
in class AbstractStateObject
children
- The list used to store the childrenpublic IterableListIterator<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
otherwiseprotected void initialize()
initialize
in class AbstractStateObject
public 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 one
true
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 variableprotected void toTextInternal(java.lang.Appendable writer) throws java.io.IOException
StateObject
, which should not be used to
define a true
string representation of a JPQL query but should be used for
debugging purposes.
toTextInternal
in class AbstractStateObject
writer
- The writer used to print out the string representation
java.io.IOException
- This should never happens, it is only required because Appendable
is used instead of any concrete class
|
EclipseLink 2.4.2, build 'v20130514-5956486' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |