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

pack-priv final Class RangeDeclaration

extends AbstractRangeDeclaration
Class Inheritance
Imports
java.util.Collections, .LinkedList, .List, org.eclipse.persistence.descriptors.ClassDescriptor, org.eclipse.persistence.expressions.Expression, .ExpressionBuilder, org.eclipse.persistence.jpa.jpql.parser.Join, org.eclipse.persistence.mappings.DatabaseMapping

This RangeDeclaration represents an identification variable declaration that was declared in the FROM clause of a SELECT top-level query or subquery.
Author
Pascal Filion
Since
2.4
Version
2.5
See Also
IdentificationVariableDeclaration

Field Summary

Modifier and TypeField and Description
private List<Join>
joinFetches

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

public Class<?>
type

If the "root" path is the fully qualified class name, then this will be set.

Inherited from org.eclipse.persistence.internal.jpa.jpql.AbstractRangeDeclaration:
joins

Constructor Summary

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

Creates a new RangeDeclaration.

Method Summary

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

Overrides org.eclipse.persistence.internal.jpa.jpql.AbstractRangeDeclaration.addJoin.

Adds the given Join.
private void
pack-priv Expression
private void
convertUnqualifiedDeclaration()

Converts the given Declaration from being set as a range variable declaration to a path expression declaration.

pack-priv List<Join>

Returns:

The ordered list of JOIN FETCH expressions or an empty collection if none was present
getJoinFetches
()

Returns the JOIN FETCH expressions that were part of the range variable declaration in the ordered they were parsed.

public JPQLQueryDeclaration.Type
getType()

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

Determines the type this declaration represents.
public boolean

Returns:

true if it is the fully qualified class name; false if it is the entity name
isFullyQualifiedClassName
()

Determines whether the "root" path is either the abstract schema name (entity name) or the abstract schema name.

pack-priv ClassDescriptor
pack-priv DatabaseMapping
resolveMapping()

Implements abstract org.eclipse.persistence.internal.jpa.jpql.Declaration.resolveMapping.

Resolves this Declaration and returns the associated DatabaseMapping if this represents a path expression.
Inherited from org.eclipse.persistence.internal.jpa.jpql.AbstractRangeDeclaration:
getBaseExpressiongetDeclarationExpressiongetJoinshasJoins

Field Detail

joinFetchesback to summary
private List<Join> joinFetches

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

typeback to summary
public Class<?> type

If the "root" path is the fully qualified class name, then this will be set.

Constructor Detail

RangeDeclarationback to summary
pack-priv RangeDeclaration(JPQLQueryContext queryContext)

Creates a new RangeDeclaration.

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)

Overrides org.eclipse.persistence.internal.jpa.jpql.AbstractRangeDeclaration.addJoin.

Doc from org.eclipse.persistence.internal.jpa.jpql.AbstractRangeDeclaration.addJoin.

Adds the given Join.

Parameters
join:Join

The Join that is declared in the range variable declaration

Annotations
@Override
addJoinFetchback to summary
private void addJoinFetch(Join join)
buildQueryExpressionback to summary
pack-priv Expression buildQueryExpression()

Implements abstract org.eclipse.persistence.internal.jpa.jpql.Declaration.buildQueryExpression.

Doc from org.eclipse.persistence.internal.jpa.jpql.Declaration.buildQueryExpression.

Creates the Expression Expression for this Declaration.

Returns:Expression

A new Expression

Annotations
@Override
convertUnqualifiedDeclarationback to summary
private void convertUnqualifiedDeclaration()

Converts the given Declaration from being set as a range variable declaration to a path expression declaration.

In this query "UPDATE Employee SET firstName = 'MODIFIED' WHERE (SELECT COUNT(m) FROM managedEmployees m) > 0" managedEmployees is an unqualified collection-valued path expression (employee.managedEmployees).

getJoinFetchesback to summary
pack-priv List<Join> getJoinFetches()

Returns the JOIN FETCH expressions that were part of the range variable declaration in the ordered they were parsed.

Returns:List<Join>

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

getTypeback to summary
public JPQLQueryDeclaration.Type getType()

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

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

Determines the type this declaration represents.

Returns:JPQLQueryDeclaration.Type

One of the possible types

Annotations
@Override
isFullyQualifiedClassNameback to summary
public boolean isFullyQualifiedClassName()

Determines whether the "root" path is either the abstract schema name (entity name) or the abstract schema name.

Returns:boolean

true if it is the fully qualified class name; false if it is the entity name

resolveDescriptorback to summary
pack-priv ClassDescriptor resolveDescriptor()

Implements abstract org.eclipse.persistence.internal.jpa.jpql.Declaration.resolveDescriptor.

Doc from org.eclipse.persistence.internal.jpa.jpql.Declaration.resolveDescriptor.

Resolves this Declaration and returns the associated ClassDescriptor. For a org.eclipse.persistence.jpa.jpql.parser.RangeVariableDeclaration, this will return the actual descriptor for the entity. For a mapping, this will return the reference descriptor.

Returns:ClassDescriptor

The descriptor associated with this declaration

Annotations
@Override
resolveMappingback to summary
pack-priv DatabaseMapping resolveMapping()

Implements abstract org.eclipse.persistence.internal.jpa.jpql.Declaration.resolveMapping.

Doc from org.eclipse.persistence.internal.jpa.jpql.Declaration.resolveMapping.

Resolves this Declaration and returns the associated DatabaseMapping if this represents a path expression. In the case of a org.eclipse.persistence.jpa.jpql.parser.RangeVariableDeclaration, this will return null.

Returns:DatabaseMapping

The mapping associated with this declaration

Annotations
@Override