Top Description Fields Constructors Methods
org.eclipse.persistence.jpa.jpql.tools.resolver

public abstract Class Declaration

extends Object
implements JPQLQueryDeclaration
Class Inheritance
All Implemented Interfaces
org.eclipse.persistence.jpa.jpql.JPQLQueryDeclaration
Known Direct Subclasses
org.eclipse.persistence.jpa.jpql.tools.resolver.SubqueryDeclaration, org.eclipse.persistence.jpa.jpql.tools.resolver.TableDeclaration, org.eclipse.persistence.jpa.jpql.tools.resolver.UnknownDeclaration, org.eclipse.persistence.jpa.jpql.tools.resolver.AbstractRangeDeclaration, org.eclipse.persistence.jpa.jpql.tools.resolver.CollectionDeclaration
Imports
java.util.Collections, .List, org.eclipse.persistence.jpa.jpql.ExpressionTools, .JPQLQueryDeclaration, org.eclipse.persistence.jpa.jpql.parser.AbstractExpression, .Expression, .IdentificationVariable, .Join

The abstract definition of JPQLQueryDeclaration.
Author
Pascal Filion
Since
2.5
Version
2.5

Field Summary

Modifier and TypeField 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
protected IdentificationVariable
identificationVariable

The identification variable used to declare the "root" object.

protected 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.

Constructor Summary

AccessConstructor and Description
protected
Declaration()

Creates a new Declaration.

Method Summary

Modifier and TypeMethod and Description
public Expression
getBaseExpression()

Implements org.eclipse.persistence.jpa.jpql.JPQLQueryDeclaration.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.
public Expression
getDeclarationExpression()

Implements org.eclipse.persistence.jpa.jpql.JPQLQueryDeclaration.getDeclarationExpression.

Returns 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.
public IdentificationVariable

Returns:

The alias for the "root" object
getIdentificationVariable
()

Returns the IdentificationVariable used to declare the "root" object.

public List<Join>
getJoins()

Implements org.eclipse.persistence.jpa.jpql.JPQLQueryDeclaration.getJoins.

Returns the JOIN expressions defined with this declaration, if supported.
public String

Returns:

The "root" object for objects which may not be reachable by navigation or null if this Declaration is a collection member declaration
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.

public String
getVariableName()

Implements org.eclipse.persistence.jpa.jpql.JPQLQueryDeclaration.getVariableName.

Returns the identification variable name that is defining either the abstract schema name or the collection-valued path expression
public boolean
hasJoins()

Implements org.eclipse.persistence.jpa.jpql.JPQLQueryDeclaration.hasJoins.

Determines whether the declaration contains JOIN expressions.
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

baseExpressionback to summary
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.

declarationExpressionback to summary
protected Expression declarationExpression

The declaration expression, which is either an org.eclipse.persistence.jpa.jpql.parser.IdentificationVariableDeclaration or a org.eclipse.persistence.jpa.jpql.parser.CollectionMemberDeclaration when part of a FROM clause, otherwise it's either the org.eclipse.persistence.jpa.jpql.parser.DeleteClause or the org.eclipse.persistence.jpa.jpql.parser.UpdateClause.

identificationVariableback to summary
protected IdentificationVariable identificationVariable

The identification variable used to declare the "root" object.

rootPathback to summary
protected 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.

Constructor Detail

Declarationback to summary
protected Declaration()

Creates a new Declaration.

Method Detail

getBaseExpressionback to summary
public Expression getBaseExpression()

Implements org.eclipse.persistence.jpa.jpql.JPQLQueryDeclaration.getBaseExpression.

Doc from org.eclipse.persistence.jpa.jpql.JPQLQueryDeclaration.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:Expression

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

Annotations
@Override
getDeclarationExpressionback to summary
public Expression getDeclarationExpression()

Implements org.eclipse.persistence.jpa.jpql.JPQLQueryDeclaration.getDeclarationExpression.

Doc from org.eclipse.persistence.jpa.jpql.JPQLQueryDeclaration.getDeclarationExpression.

Returns 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.

Returns:Expression

The root of the declaration expression

Annotations
@Override
getIdentificationVariableback to summary
public IdentificationVariable getIdentificationVariable()

Returns the IdentificationVariable used to declare the "root" object.

Returns:IdentificationVariable

The alias for the "root" object

getJoinsback to summary
public List<Join> getJoins()

Implements org.eclipse.persistence.jpa.jpql.JPQLQueryDeclaration.getJoins.

Doc from org.eclipse.persistence.jpa.jpql.JPQLQueryDeclaration.getJoins.

Returns the JOIN expressions defined with this declaration, if supported. The list contains the JOIN expressions in ordered they were declared.

Returns:List<Join>

The JOIN expressions defined with this declaration or an empty list if this declaration does not support it

Annotations
@Override
getRootPathback to summary
public 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.

Returns:String

The "root" object for objects which may not be reachable by navigation or null if this Declaration is a collection member declaration

getVariableNameback to summary
public String getVariableName()

Implements org.eclipse.persistence.jpa.jpql.JPQLQueryDeclaration.getVariableName.

Doc from org.eclipse.persistence.jpa.jpql.JPQLQueryDeclaration.getVariableName.

Returns the identification variable name that is defining either the abstract schema name or the collection-valued path expression

Returns:String

The identification variable or an empty string if none was defined

Annotations
@Override
hasJoinsback to summary
public boolean hasJoins()

Implements org.eclipse.persistence.jpa.jpql.JPQLQueryDeclaration.hasJoins.

Doc from org.eclipse.persistence.jpa.jpql.JPQLQueryDeclaration.hasJoins.

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

Returns:boolean

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

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override