public abstract class Declaration extends java.lang.Object implements JPQLQueryDeclaration
JPQLQueryDeclaration
.JPQLQueryDeclaration.Type
Modifier and Type | Field and Description |
---|---|
protected Expression |
baseExpression
Either the range variable declaration if this is a range declaration otherwise the
collection-valued path expression when this is a collection member declaration.
|
protected Expression |
declarationExpression
The declaration expression, which is either an
IdentificationVariableDeclaration or
a CollectionMemberDeclaration when part of a FROM clause, otherwise it's
either the DeleteClause or the UpdateClause . |
protected IdentificationVariable |
identificationVariable
The identification variable used to declare the "root" object.
|
protected java.lang.String |
rootPath
The "root" object for objects which may not be reachable by navigation, it is either the
abstract schema name (entity name), a derived path expression (which is only defined in a
subquery) or
null if this Declaration is a collection member declaration. |
Modifier | Constructor and Description |
---|---|
protected |
Declaration()
Creates a new
Declaration . |
Modifier and Type | Method and Description |
---|---|
Expression |
getBaseExpression()
Returns the range variable declaration if this is a range declaration otherwise the
collection-valued path expression when this is a collection member declaration.
|
Expression |
getDeclarationExpression()
Returns the declaration expression, which is either an {@link org.eclipse.persistence.jpa.jpql.
|
IdentificationVariable |
getIdentificationVariable()
Returns the
IdentificationVariable used to declare the "root" object. |
java.util.List<Join> |
getJoins()
Returns the
JOIN expressions defined with this declaration, if supported. |
java.lang.String |
getRootPath()
Returns the "root" object for objects which may not be reachable by navigation, it is
either the abstract schema name (entity name), a derived path expression (which is only
defined in a subquery) or
null if this Declaration is a collection
member declaration. |
java.lang.String |
getVariableName()
Returns the identification variable name that is defining either the abstract schema name
or the collection-valued path expression
|
boolean |
hasJoins()
Determines whether the declaration contains JOIN expressions.
|
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getType
protected Expression baseExpression
protected Expression declarationExpression
IdentificationVariableDeclaration
or
a CollectionMemberDeclaration
when part of a FROM clause, otherwise it's
either the DeleteClause
or the UpdateClause
.protected IdentificationVariable identificationVariable
protected java.lang.String rootPath
null
if this Declaration
is a collection member declaration.public Expression getBaseExpression()
getBaseExpression
in interface JPQLQueryDeclaration
public Expression getDeclarationExpression()
parser.IdentificationVariableDeclaration IdentificationVariableDeclaration
or a CollectionMemberDeclaration
when part of a FROM clause, otherwise it's either the jpa.jpql.parser.DeleteClause DeleteClause
or the parser.UpdateClause UpdateClause
.getDeclarationExpression
in interface JPQLQueryDeclaration
public IdentificationVariable getIdentificationVariable()
IdentificationVariable
used to declare the "root" object.public java.util.List<Join> getJoins()
JOIN
expressions defined with this declaration, if supported.
The list contains the JOIN
expressions in ordered they were declared.getJoins
in interface JPQLQueryDeclaration
public java.lang.String getRootPath()
null
if this Declaration
is a collection
member declaration.null
if this Declaration
is a collection member declarationpublic java.lang.String getVariableName()
getVariableName
in interface JPQLQueryDeclaration
public boolean hasJoins()
true
only when #isRange()
returns true
. A collection
member declaration does not have JOIN expressions.hasJoins
in interface JPQLQueryDeclaration
true
if at least one JOIN expression was parsed;
otherwise false
public java.lang.String toString()
toString
in class java.lang.Object