Class Declaration
java.lang.Object
org.eclipse.persistence.jpa.jpql.tools.resolver.Declaration
- All Implemented Interfaces:
JPQLQueryDeclaration
- Direct Known Subclasses:
AbstractRangeDeclaration
,CollectionDeclaration
,SubqueryDeclaration
,TableDeclaration
,UnknownDeclaration
The abstract definition of
JPQLQueryDeclaration
.- Since:
- 2.5
- Version:
- 2.5
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.persistence.jpa.jpql.JPQLQueryDeclaration
JPQLQueryDeclaration.Type
-
Field Summary
Modifier and TypeFieldDescriptionprotected Expression
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
The declaration expression, which is either anIdentificationVariableDeclaration
or aCollectionMemberDeclaration
when part of a FROM clause, otherwise it's either theDeleteClause
or theUpdateClause
.protected IdentificationVariable
The identification variable used to declare the "root" object.protected String
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) ornull
if thisDeclaration
is a collection member declaration. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the range variable declaration if this is a range declaration otherwise the collection-valued path expression when this is a collection member declaration.Returns the declaration expression, which is either anIdentificationVariableDeclaration
or aCollectionMemberDeclaration
when part of a FROM clause, otherwise it's either theDeleteClause
or theUpdateClause
.Returns theIdentificationVariable
used to declare the "root" object.getJoins()
Returns theJOIN
expressions defined with this declaration, if supported.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) ornull
if thisDeclaration
is a collection member declaration.Returns the identification variable name that is defining either the abstract schema name or the collection-valued path expressionboolean
hasJoins()
Determines whether the declaration contains JOIN expressions.toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.persistence.jpa.jpql.JPQLQueryDeclaration
getType
-
Field Details
-
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. -
declarationExpression
The declaration expression, which is either anIdentificationVariableDeclaration
or aCollectionMemberDeclaration
when part of a FROM clause, otherwise it's either theDeleteClause
or theUpdateClause
. -
identificationVariable
The identification variable used to declare the "root" object. -
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) ornull
if thisDeclaration
is a collection member declaration.
-
-
Constructor Details
-
Declaration
protected Declaration()Creates a newDeclaration
.
-
-
Method Details
-
getBaseExpression
Description copied from interface:JPQLQueryDeclaration
Returns the range variable declaration if this is a range declaration otherwise the collection-valued path expression when this is a collection member declaration.- Specified by:
getBaseExpression
in interfaceJPQLQueryDeclaration
- Returns:
- Either the range variable declaration or the collection-valued path expression
-
getDeclarationExpression
Description copied from interface:JPQLQueryDeclaration
Returns the declaration expression, which is either anIdentificationVariableDeclaration
or aCollectionMemberDeclaration
when part of a FROM clause, otherwise it's either theDeleteClause
or theUpdateClause
.- Specified by:
getDeclarationExpression
in interfaceJPQLQueryDeclaration
- Returns:
- The root of the declaration expression
-
getIdentificationVariable
Returns theIdentificationVariable
used to declare the "root" object.- Returns:
- The alias for the "root" object
-
getJoins
Description copied from interface:JPQLQueryDeclaration
Returns theJOIN
expressions defined with this declaration, if supported. The list contains theJOIN
expressions in ordered they were declared.- Specified by:
getJoins
in interfaceJPQLQueryDeclaration
- Returns:
- The JOIN expressions defined with this declaration or an empty list if this declaration does not support it
-
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) ornull
if thisDeclaration
is a collection member declaration.- Returns:
- The "root" object for objects which may not be reachable by navigation or
null
if thisDeclaration
is a collection member declaration
-
getVariableName
Description copied from interface:JPQLQueryDeclaration
Returns the identification variable name that is defining either the abstract schema name or the collection-valued path expression- Specified by:
getVariableName
in interfaceJPQLQueryDeclaration
- Returns:
- The identification variable or an empty string if none was defined
-
hasJoins
public boolean hasJoins()Description copied from interface:JPQLQueryDeclaration
Determines whether the declaration contains JOIN expressions. This can betrue
only whenJPQLQueryDeclaration.Type.isRange()
returnstrue
. A collection member declaration does not have JOIN expressions.- Specified by:
hasJoins
in interfaceJPQLQueryDeclaration
- Returns:
true
if at least one JOIN expression was parsed; otherwisefalse
-
toString
-