|
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.AbstractModifyStatementStateObject
public abstract class AbstractModifyStatementStateObject
The abstract definition of a modify statement. TODO
DeleteStatementStateObject
,
UpdateStatementStateObject
Field Summary | |
---|---|
static java.lang.String |
WHERE_CLAUSE_PROPERTY
Notify the state object representing the WHERE clause has changed. |
Constructor Summary | |
---|---|
protected |
AbstractModifyStatementStateObject(JPQLQueryStateObject parent)
Creates a new AbstractModifyStatementStateObject . |
Method Summary | |
---|---|
protected void |
addChildren(java.util.List<StateObject> children)
Adds the children of this StateObject to the given list. |
WhereClauseStateObject |
addWhereClause()
Adds the WHERE clause. |
protected abstract AbstractModifyClauseStateObject |
buildModifyClause()
Creates the actual AbstractModifyClauseStateObject that represents the modify clause. |
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. |
AbstractModifyClauseStateObject |
getModifyClause()
Returns the state object representing the modify clause part of the modify statement. |
JPQLQueryStateObject |
getParent()
Returns the parent of this StateObject . |
RangeVariableDeclarationStateObject |
getRangeVariableDeclaration()
Returns the StateObject that defines the range variable declaration. |
WhereClauseStateObject |
getWhereClause()
Returns the state object representing the WHERE clause. |
boolean |
hasWhereClause()
Returns the state object representing the WHERE clause. |
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 |
removeWhereClause()
Removes the WHERE clause. |
void |
setConditionalStateObject(StateObject conditionalStateObject)
Sets the given StateObject to be the conditional expression of the WHERE
clause. |
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. |
void |
toggleWhereClause()
Either adds or removes the state object representing the WHERE clause. |
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 |
Field Detail |
---|
public static final java.lang.String WHERE_CLAUSE_PROPERTY
WHERE
clause has changed.
Constructor Detail |
---|
protected AbstractModifyStatementStateObject(JPQLQueryStateObject parent)
AbstractModifyStatementStateObject
.
parent
- The parent of this state object, which cannot be null
java.lang.NullPointerException
- The given parent cannot be null
Method 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 WhereClauseStateObject addWhereClause()
WHERE
clause. The clause is not added if it's already present.
GroupByClauseStateObject
protected abstract AbstractModifyClauseStateObject buildModifyClause()
AbstractModifyClauseStateObject
that represents the modify clause.
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 AbstractModifyClauseStateObject getModifyClause()
null
public JPQLQueryStateObject 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 WhereClauseStateObject getWhereClause()
WHERE
clause.
WHERE
clause or
the null
state object since null
is never returnedpublic boolean hasWhereClause()
WHERE
clause.
WHERE
clause or
null
if it's not presentprotected 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 removeWhereClause()
WHERE
clause.
public void setConditionalStateObject(StateObject conditionalStateObject)
StateObject
to be the conditional expression of the WHERE
clause.
conditionalStateObject
- The new conditional expressionpublic 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 variablepublic void toggleWhereClause()
WHERE
clause.
protected 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 |