EclipseLink 2.4.2, build 'v20130514-5956486' API Reference

org.eclipse.persistence.jpa.jpql
Interface JPQLQueryDeclaration

All Known Implementing Classes:
DeclarationResolver.Declaration

public interface JPQLQueryDeclaration

A JPQLQueryDeclaration represents either an identification variable declaration or a collection member declaration. For a subquery, the declaration can be a derived path expression.

Provisional API: This interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.

Version:
2.4
Author:
Pascal Filion
Since:
2.4

Method Summary
 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.
 java.util.List<Join> getJoins()
          Returns the JOIN expressions that were part of the range variable declaration in the ordered they were parsed.
 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.
 boolean isCollection()
          Determines whether this JPQLQueryDeclaration declaration represents a collection member declaration or not.
 boolean isDerived()
          Determines whether the "root" object is a derived path expression where the identification variable is declared in the super query, otherwise it's an entity name.
 boolean isRange()
          Determines whether this JPQLQueryDeclaration represents a range identification variable declaration, example: "Employee e".
 

Method Detail

getBaseExpression

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.

Returns:
Either the range variable declaration or the collection-valued path expression

getDeclarationExpression

Expression getDeclarationExpression()
Returns the declaration expression, which is either an 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.

Returns:
The root of the declaration expression

getJoins

java.util.List<Join> getJoins()
Returns the JOIN expressions that were part of the range variable declaration in the ordered they were parsed.

Returns:
The ordered list of JOIN expressions or an empty collection if none was present

getVariableName

java.lang.String getVariableName()
Returns the identification variable name that is defining either the abstract schema name or the collection-valued path expression

Returns:
The identification variable or an empty string if none was defined

hasJoins

boolean hasJoins()
Determines whether the declaration contains JOIN expressions. This can be true only when isRange() returns true. A collection member declaration does not have JOIN expressions.

Returns:
true if at least one JOIN expression was parsed; otherwise false

isCollection

boolean isCollection()
Determines whether this JPQLQueryDeclaration declaration represents a collection member declaration or not.

Returns:
true if this is a collection member declaration; false otherwise

isDerived

boolean isDerived()
Determines whether the "root" object is a derived path expression where the identification variable is declared in the super query, otherwise it's an entity name.

Returns:
true if the root path is a derived path expression; false otherwise

isRange

boolean isRange()
Determines whether this JPQLQueryDeclaration represents a range identification variable declaration, example: "Employee e".

Returns:
true if the declaration is over an abstract schema name; false if it's over a collection-valued path expression
See Also:
isDerived()

EclipseLink 2.4.2, build 'v20130514-5956486' API Reference