|
EclipseLink 2.4.1, build 'v20121003-ad44345' API Reference | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.persistence.jpa.jpql.model.query.AbstractStateObject
org.eclipse.persistence.jpa.jpql.model.query.AbstractRangeVariableDeclarationStateObject
public abstract class AbstractRangeVariableDeclarationStateObject
| Field Summary | |
|---|---|
static java.lang.String |
AS_PROPERTY
Notifies the visibility of the AS identifier has changed. |
static java.lang.String |
IDENTIFICATION_VARIABLE_PROPERTY
Notifies the identification variable property has changed. |
| Constructor Summary | |
|---|---|
AbstractRangeVariableDeclarationStateObject(AbstractIdentificationVariableDeclarationStateObject parent)
Creates a new RangeVariableDeclarationStateObject. |
|
AbstractRangeVariableDeclarationStateObject(AbstractIdentificationVariableDeclarationStateObject parent,
java.lang.String root)
Creates a new RangeVariableDeclarationStateObject. |
|
AbstractRangeVariableDeclarationStateObject(AbstractModifyClauseStateObject parent)
Creates a new AbstractRangeVariableDeclarationStateObject. |
|
| Method Summary | |
|---|---|
AbstractRangeVariableDeclarationStateObject |
addAs()
Makes sure the AS identifier is specified. |
protected void |
addChildren(java.util.List<StateObject> children)
Adds the children of this StateObject to the given list. |
protected void |
addProblems(java.util.List<Problem> problems)
Adds to the given list the problems that were found with the current state of this StateObject, which means there are validation issues. |
protected abstract StateObject |
buildRootStateObject()
|
RangeVariableDeclaration |
getExpression()
Returns the actual parsed object if this StateObject representation of the JPQL query
was created by parsing an existing JPQL query. |
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 |
getRootPath()
Returns the "root" object for objects which may not be reachable by navigation. |
StateObject |
getRootStateObject()
Returns the StateObject holding onto the abstract schema name. |
boolean |
hasAs()
Determines whether the AS identifier is used or not. |
boolean |
hasIdentificationVariable()
Determines whether an identification variable was defined. |
IterableListIterator<IdentificationVariableStateObject> |
identificationVariables()
Returns the IdentificationVariableStateObject that are used by this state object. |
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. |
boolean |
isIdentificationVariableOptional()
Determines whether the identification variable is optional or not. |
boolean |
isIdentificationVariableVirtual()
Determines whether this identification variable is virtual, meaning it's not part of the query but is required for proper navigability. |
void |
setAs(boolean as)
Sets whether the AS identifier is used or not. |
void |
setExpression(RangeVariableDeclaration expression)
Keeps a reference of the parsed object object, which should
only be* done when this object is instantiated during the conversion of a parsed JPQL query
into StateObjects. |
void |
setIdentificationVariable(java.lang.String identificationVariable)
Sets the new identification variable that will range over the "root" object. |
protected void |
setIdentificationVariableOptional(boolean identificationVariableOptional)
Sets whether the identification variable is optional or not. |
abstract void |
setRootPath(java.lang.String root)
Sets the "root" object for objects which may not be reachable by navigation. |
void |
toggleAs()
Toggles the usage of the AS identifier. |
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, 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, 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.VariableDeclarationStateObject |
|---|
getManagedType |
| Methods inherited from interface org.eclipse.persistence.jpa.jpql.model.query.StateObject |
|---|
accept, addPropertyChangeListener, children, decorate, findIdentificationVariable, getDeclaration, getDecorator, getGrammar, getManagedTypeProvider, getParent, getQueryBuilder, getRoot, isDecorated, removePropertyChangeListener, setParent, toString, toText |
| Field Detail |
|---|
public static final java.lang.String AS_PROPERTY
AS identifier has changed.
public static final java.lang.String IDENTIFICATION_VARIABLE_PROPERTY
| Constructor Detail |
|---|
public AbstractRangeVariableDeclarationStateObject(AbstractIdentificationVariableDeclarationStateObject parent)
RangeVariableDeclarationStateObject.
parent - The parent of this state object, which cannot be null
java.lang.NullPointerException - The given parent cannot be null
public AbstractRangeVariableDeclarationStateObject(AbstractIdentificationVariableDeclarationStateObject parent,
java.lang.String root)
RangeVariableDeclarationStateObject.
parent - The parent of this state object, which cannot be null
java.lang.NullPointerException - The given parent cannot be nullpublic AbstractRangeVariableDeclarationStateObject(AbstractModifyClauseStateObject parent)
AbstractRangeVariableDeclarationStateObject.
parent - The parent of this state object, which cannot be null
java.lang.NullPointerException - The given parent cannot be null| Method Detail |
|---|
public AbstractRangeVariableDeclarationStateObject addAs()
AS identifier is specified.
protected void addChildren(java.util.List<StateObject> children)
StateObject to the given list.
addChildren in class AbstractStateObjectchildren - The list used to store the childrenprotected void addProblems(java.util.List<Problem> problems)
StateObject, which means there are validation issues.
addProblems in class AbstractStateObjectproblems - The list to which the problems are addedprotected abstract StateObject buildRootStateObject()
public RangeVariableDeclaration getExpression()
StateObject representation of the JPQL query
was created by parsing an existing JPQL query.
getExpression in interface StateObjectgetExpression in class AbstractStateObjectStateObject
or null when the JPQL query is manually created (i.e. not from a string)public java.lang.String getIdentificationVariable()
public IdentificationVariableStateObject getIdentificationVariableStateObject()
IdentificationVariableStateObject holding onto the identification variable.
IdentificationVariableStateObject, which is never nullpublic abstract java.lang.String getRootPath()
public StateObject getRootStateObject()
StateObject holding onto the abstract schema name.
StateObject, which is never nullpublic boolean hasAs()
AS identifier is used or not.
true if the AS identifier is part of the expression;
false otherwisepublic boolean hasIdentificationVariable()
true if an identification variable is defined; false otherwisepublic IterableListIterator<IdentificationVariableStateObject> identificationVariables()
IdentificationVariableStateObject that are used by this state object. It
is possible more than one declaration exists, like a range variable declaration has also joins
and join fetches.
identificationVariables in interface VariableDeclarationStateObjectIdentificationVariableStateObjectprotected void initialize()
initialize in class AbstractStateObjectpublic boolean isEquivalent(StateObject stateObject)
StateObject is equivalent to this one, i.e. the
information of both StateObject is the same.
isEquivalent in interface StateObjectisEquivalent in class AbstractStateObjectstateObject - The StateObject to compare its content to this one
true if both object are equivalent; false otherwisepublic boolean isIdentificationVariableOptional()
DELETE or
UPDATE).
true if an identification variable is not required; false if
it is requiredpublic boolean isIdentificationVariableVirtual()
true if this identification variable was virtually created to fully
qualify path expression; false if it was parsedpublic void setAs(boolean as)
AS identifier is used or not.
as - true if the AS identifier is part of the
expression; false otherwisepublic void setExpression(RangeVariableDeclaration expression)
parsed object object, which should
only be* done when this object is instantiated during the conversion of a parsed JPQL query
into StateObjects.
expression - The parsed object representing a range
variable declarationpublic void setIdentificationVariable(java.lang.String identificationVariable)
identificationVariable - The new identification variableprotected void setIdentificationVariableOptional(boolean identificationVariableOptional)
DELETE or
UPDATE).
identificationVariableOptional - true if an identification variable is not
required; false if it is requiredpublic abstract void setRootPath(java.lang.String root)
root - The "root" objectpublic void toggleAs()
AS identifier.
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 AbstractStateObjectwriter - 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.1, build 'v20121003-ad44345' API Reference | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||