public abstract class AbstractIdentificationVariableDeclarationStateObject extends AbstractListHolderStateObject<JoinStateObject> implements VariableDeclarationStateObject
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
JOINS_LIST
Notifies the content of the list of
JoinStateObject has changed. |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractIdentificationVariableDeclarationStateObject(AbstractFromClauseStateObject parent)
Creates a new
AbstractIdentificationVariableDeclarationStateObject. |
protected |
AbstractIdentificationVariableDeclarationStateObject(AbstractFromClauseStateObject parent,
java.lang.String root,
java.lang.String identificationVariable)
Creates a new
AbstractIdentificationVariableDeclarationStateObject. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addChildren(java.util.List<StateObject> children)
Adds the children of this
StateObject to the given list. |
JoinStateObject |
addInnerJoin(java.lang.String path,
java.lang.String identificationVariable)
Adds a new
INNER JOIN expression to this declaration. |
JoinStateObject |
addJoin(java.lang.String joinType)
Adds a new
JOIN expression to this declaration. |
JoinStateObject |
addJoin(java.lang.String joinType,
java.util.ListIterator<java.lang.String> paths,
java.lang.String identificationVariable)
Adds a new
JOIN expression to this declaration. |
JoinStateObject |
addJoin(java.lang.String path,
java.lang.String identificationVariable)
Adds a new
JOIN expression to this declaration. |
JoinStateObject |
addJoin(java.lang.String joinType,
java.lang.String path,
java.lang.String identificationVariable)
Adds a new
JOIN expression to this declaration. |
JoinStateObject |
addLeftJoin(java.lang.String path,
java.lang.String identificationVariable)
Adds a new
LEFT JOIN expression to this declaration. |
JoinStateObject |
addLeftOuterJoin(java.lang.String path,
java.lang.String identificationVariable)
Adds a new
LEFT OUTER JOIN expression to this declaration. |
protected abstract AbstractRangeVariableDeclarationStateObject |
buildRangeVariableDeclarationStateObject()
Creates
|
IdentificationVariableDeclaration |
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 identifying the "root".
|
IdentificationVariableStateObject |
getIdentificationVariableStateObject()
Returns the
IdentificationVariableStateObject holding onto the identification variable. |
AbstractFromClauseStateObject |
getParent()
Returns the parent of this
StateObject. |
AbstractRangeVariableDeclarationStateObject |
getRangeVariableDeclaration()
Returns the
StateObject representing the range variable declaration portion. |
java.lang.String |
getRootPath()
Returns the "root" object for objects which may not be reachable by navigation.
|
StateObject |
getRootStateObject()
Returns the
StateObject representing the "root" for objects which may not be
reachable by navigation. |
ListIterable<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. |
protected java.lang.String |
listName()
Returns the name that is uniquely identifying the list.
|
void |
parseJoin(java.lang.String jpqlFragment)
Parses the given JPQL fragment that should contain a single
JOIN
expression. |
void |
setExpression(IdentificationVariableDeclaration 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".
|
void |
setRootPath(java.lang.String root)
Sets the "root" object for objects which may not be reachable by navigation.
|
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. |
addItem, addItems, addListChangeListener, areChildrenEquivalent, canMoveDown, canMoveUp, getItem, hasItems, items, itemsSize, moveDown, moveUp, removeItem, removeItems, removeListChangeListener, toStringItemsacceptUnknownVisitor, acceptUnknownVisitor, addProblems, 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, toTextclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetManagedTypeaccept, addPropertyChangeListener, children, decorate, findIdentificationVariable, getDeclaration, getDecorator, getGrammar, getManagedTypeProvider, getQueryBuilder, getRoot, isDecorated, removePropertyChangeListener, setParent, toString, toTextpublic static final java.lang.String JOINS_LIST
JoinStateObject has changed.protected AbstractIdentificationVariableDeclarationStateObject(AbstractFromClauseStateObject parent)
AbstractIdentificationVariableDeclarationStateObject.parent - The parent of this state object, which cannot be nulljava.lang.NullPointerException - The given parent cannot be nullprotected AbstractIdentificationVariableDeclarationStateObject(AbstractFromClauseStateObject parent, java.lang.String root, java.lang.String identificationVariable)
AbstractIdentificationVariableDeclarationStateObject.parent - The parent of this state object, which cannot be nullroot - The "root" objectidentificationVariable - The identification variable defining the given pathjava.lang.NullPointerException - The given parent cannot be nullprotected void addChildren(java.util.List<StateObject> children)
StateObject to the given list.addChildren in class AbstractListHolderStateObject<JoinStateObject>children - The list used to store the childrenpublic JoinStateObject addInnerJoin(java.lang.String path, java.lang.String identificationVariable)
INNER JOIN expression to this declaration.path - The join association path expressionidentificationVariable - The new variable defining the join association pathJoinStateObjectpublic JoinStateObject addJoin(java.lang.String joinType)
JOIN expression to this declaration.joinType - One of the joining types: LEFT JOIN, LEFT OUTER
JOIN, INNER JOIN or JOINJoinStateObjectpublic JoinStateObject addJoin(java.lang.String joinType, java.util.ListIterator<java.lang.String> paths, java.lang.String identificationVariable)
JOIN expression to this declaration.joinType - One of the joining types: LEFT JOIN, LEFT OUTER
JOIN, INNER JOIN or JOINpaths - The join association path expressionidentificationVariable - The new variable defining the join association pathJoinStateObjectpublic JoinStateObject addJoin(java.lang.String path, java.lang.String identificationVariable)
JOIN expression to this declaration.path - The join association path expressionidentificationVariable - The new variable defining the join association pathJoinStateObjectpublic JoinStateObject addJoin(java.lang.String joinType, java.lang.String path, java.lang.String identificationVariable)
JOIN expression to this declaration.joinType - One of the joining types: LEFT JOIN, LEFT OUTER
JOIN, INNER JOIN or JOINpath - The join association path expressionidentificationVariable - The new variable defining the join association pathJoinStateObjectpublic JoinStateObject addLeftJoin(java.lang.String path, java.lang.String identificationVariable)
LEFT JOIN expression to this declaration.path - The join association path expressionidentificationVariable - The new variable defining the join association pathJoinStateObjectpublic JoinStateObject addLeftOuterJoin(java.lang.String path, java.lang.String identificationVariable)
LEFT OUTER JOIN expression to this declaration.path - The join association path expressionidentificationVariable - The new variable defining the join association pathJoinStateObjectprotected abstract AbstractRangeVariableDeclarationStateObject buildRangeVariableDeclarationStateObject()
public IdentificationVariableDeclaration 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 AbstractFromClauseStateObject getParent()
StateObject.getParent in interface StateObjectgetParent in class AbstractStateObjectStateObject, which is null only when
this is the root of the hierarchypublic AbstractRangeVariableDeclarationStateObject getRangeVariableDeclaration()
StateObject representing the range variable declaration portion.public java.lang.String getRootPath()
public StateObject getRootStateObject()
StateObject representing the "root" for objects which may not be
reachable by navigation.StateObject representing one of the possible valid "root"public ListIterable<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 AbstractListHolderStateObject<JoinStateObject>public 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 onetrue if both object are equivalent; false otherwiseprotected java.lang.String listName()
listName in class AbstractListHolderStateObject<JoinStateObject>public void parseJoin(java.lang.String jpqlFragment)
JOIN
expression.jpqlFragment - The portion representing a JOIN expressionpublic void setExpression(IdentificationVariableDeclaration 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 an
identification variable declarationpublic void setIdentificationVariable(java.lang.String identificationVariable)
identificationVariable - The new identification variablepublic void setRootPath(java.lang.String root)
root - The "root" objectprotected 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 representationjava.io.IOException - This should never happens, it is only required because Appendable
is used instead of any concrete class