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

pack-priv final Class CollectionDeclaration

extends Declaration
Class Inheritance
Imports
org.eclipse.persistence.descriptors.ClassDescriptor, org.eclipse.persistence.expressions.Expression, org.eclipse.persistence.jpa.jpql.parser.CollectionMemberDeclaration, .CollectionValuedPathExpression, org.eclipse.persistence.mappings.DatabaseMapping

This CollectionDeclaration represents a collection member 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
CollectionMemberDeclaration

Field Summary

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

Constructor Summary

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

Creates a new CollectionDeclaration.

Method Summary

Modifier and TypeMethod and Description
pack-priv Expression
public CollectionValuedPathExpression
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 CollectionMemberDeclaration
public JPQLQueryDeclaration.Type
getType()

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

Determines the type this declaration represents.
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.Declaration:
getDescriptorgetJoinsgetMappinggetQueryExpressiongetVariableNamehasJoinstoString

Constructor Detail

CollectionDeclarationback to summary
pack-priv CollectionDeclaration(JPQLQueryContext queryContext)

Creates a new CollectionDeclaration.

Parameters
queryContext:JPQLQueryContext

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

Method Detail

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
getBaseExpressionback to summary
public CollectionValuedPathExpression 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:CollectionValuedPathExpression

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

Annotations
@Override
getDeclarationExpressionback to summary
public CollectionMemberDeclaration 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:CollectionMemberDeclaration

The root of the declaration expression

Annotations
@Override
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
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