Top Description Fields Constructors Methods
org.eclipse.persistence.internal.jpa.jpql

pack-priv abstract Class AbstractRangeDeclaration

extends Declaration
Class Inheritance
Known Direct Subclasses
org.eclipse.persistence.internal.jpa.jpql.DerivedDeclaration, org.eclipse.persistence.internal.jpa.jpql.RangeDeclaration
Imports
java.util.Collections, .LinkedList, .List, org.eclipse.persistence.jpa.jpql.parser.IdentificationVariableDeclaration, .Join, .RangeVariableDeclaration

The abstract definition of a range declaration, which is used to navigate to a "root" object.
Author
Pascal Filion
Since
2.4
Version
2.5
See Also
DerivedDeclaration, RangeDeclaration

Field Summary

Modifier and TypeField and Description
protected List<Join>
joins

The list of JOIN expressions that are declared in the same declaration than the range variable declaration represented by this declaration.

Inherited from org.eclipse.persistence.internal.jpa.jpql.Declaration:
baseExpressiondeclarationExpressionidentificationVariablequeryContextrootPath

Constructor Summary

AccessConstructor and Description
pack-priv
AbstractRangeDeclaration(JPQLQueryContext
The context used to query information about the application metadata and cached information
queryContext
)

Creates a new AbstractRangeDeclaration.

Method Summary

Modifier and TypeMethod and Description
pack-priv void
addJoin(Join
The Join that is declared in the range variable declaration
join
)

Adds the given Join.

public RangeVariableDeclaration
getBaseExpression()

Overrides org.eclipse.persistence.internal.jpa.jpql.Declaration.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 IdentificationVariableDeclaration
public List<Join>
getJoins()

Overrides org.eclipse.persistence.internal.jpa.jpql.Declaration.getJoins.

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

Returns the JOIN expressions defined with this declaration, if supported.
public boolean
hasJoins()

Overrides org.eclipse.persistence.internal.jpa.jpql.Declaration.hasJoins.

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

Determines whether the declaration contains JOIN expressions.
Inherited from org.eclipse.persistence.internal.jpa.jpql.Declaration:
buildQueryExpressiongetDescriptorgetMappinggetQueryExpressiongetVariableNameresolveDescriptorresolveMappingtoString

Field Detail

joinsback to summary
protected List<Join> joins

The list of JOIN expressions that are declared in the same declaration than the range variable declaration represented by this declaration.

Constructor Detail

AbstractRangeDeclarationback to summary
pack-priv AbstractRangeDeclaration(JPQLQueryContext queryContext)

Creates a new AbstractRangeDeclaration.

Parameters
queryContext:JPQLQueryContext

The context used to query information about the application metadata and cached information

Method Detail

addJoinback to summary
pack-priv void addJoin(Join join)

Adds the given Join.

Parameters
join:Join

The Join that is declared in the range variable declaration

getBaseExpressionback to summary
public RangeVariableDeclaration getBaseExpression()

Overrides org.eclipse.persistence.internal.jpa.jpql.Declaration.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:RangeVariableDeclaration

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

Annotations
@Override
getDeclarationExpressionback to summary
public IdentificationVariableDeclaration getDeclarationExpression()

Overrides org.eclipse.persistence.internal.jpa.jpql.Declaration.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:IdentificationVariableDeclaration

The root of the declaration expression

Annotations
@Override
getJoinsback to summary
public List<Join> getJoins()

Overrides org.eclipse.persistence.internal.jpa.jpql.Declaration.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
hasJoinsback to summary
public boolean hasJoins()

Overrides org.eclipse.persistence.internal.jpa.jpql.Declaration.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