Top Description Fields Constructors Methods
org.hibernate.query.criteria.internal.path

public Class PluralAttributePath<X>

extends AbstractPathImpl<X>
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Imports
java.io.Serializable, javax.persistence.metamodel.Attribute, .Bindable, .EntityType, .IdentifiableType, .MappedSuperclassType, .PluralAttribute, .SingularAttribute, .Type, org.hibernate.AssertionFailure, org.hibernate.engine.spi.SessionFactoryImplementor, org.hibernate.query.criteria.internal.CriteriaBuilderImpl, .PathSource, org.hibernate.persister.collection.CollectionPersister

Models a path for a PluralAttribute generally obtained from a javax.persistence.criteria.Path#get call
Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private final PluralAttribute<?, X, ?>
private final CollectionPersister

Constructor Summary

AccessConstructor and Description
public
PluralAttributePath(CriteriaBuilderImpl criteriaBuilder, PathSource<X> source, PluralAttribute<?, X, ?> attribute)

Method Summary

Modifier and TypeMethod and Description
protected boolean
public PluralAttribute<?, X, ?>
getAttribute()

Implements org.hibernate.query.criteria.internal.PathImplementor.getAttribute.

Retrieve reference to the attribute this path represents.
public Bindable<X>
getModel()

Implements javax.persistence.criteria.Path.getModel.

Return the bindable object that corresponds to the path expression.
public CollectionPersister
protected Attribute<X, Y>
locateAttributeInternal(String
The name of the attribute to locate
attributeName
)

Implements abstract org.hibernate.query.criteria.internal.path.AbstractPathImpl.locateAttributeInternal.

Get the attribute by name from the underlying model.
private EntityType<X>
locateNearestSubclassEntity(MappedSuperclassType<X> mappedSuperclassType, EntityType<X> entityTypeTop)

private CollectionPersister
resolvePersister(CriteriaBuilderImpl criteriaBuilder, PluralAttribute<X, C, E> attribute)

private String
resolveRole(PluralAttribute<X, C, E> attribute)

public <T extends X> PluralAttributePath<T>
treatAs(Class<T>
The type to treat the path as.
treatAsType
)

Implements org.hibernate.query.criteria.internal.PathImplementor.treatAs.

Defines handling for the JPA 2.1 TREAT down-casting feature.
Inherited from org.hibernate.query.criteria.internal.path.AbstractPathImpl:
getgetgetgetgetParentPathgetPathIdentifiergetPathSourcegetPathSourceForSubPathsillegalDereferencelocateAttributeprepareAliasregisterAttributePathregisterParametersrenderresolveCachedAttributePathtypeunknownAttribute

Field Detail

attributeback to summary
private final PluralAttribute<?, X, ?> attribute
persisterback to summary
private final CollectionPersister persister

Constructor Detail

PluralAttributePathback to summary
public PluralAttributePath(CriteriaBuilderImpl criteriaBuilder, PathSource<X> source, PluralAttribute<?, X, ?> attribute)

Method Detail

canBeDereferencedback to summary
protected boolean canBeDereferenced()

Implements abstract org.hibernate.query.criteria.internal.path.AbstractPathImpl.canBeDereferenced.

Annotations
@Override
getAttributeback to summary
public PluralAttribute<?, X, ?> getAttribute()

Implements org.hibernate.query.criteria.internal.PathImplementor.getAttribute.

Doc from org.hibernate.query.criteria.internal.PathImplementor.getAttribute.

Retrieve reference to the attribute this path represents.

Returns:PluralAttribute<?, X, ?>

The metamodel attribute.

getModelback to summary
public Bindable<X> getModel()

Implements javax.persistence.criteria.Path.getModel.

Doc from javax.persistence.criteria.Path.getModel.

Return the bindable object that corresponds to the path expression.

Returns:Bindable<X>

bindable object corresponding to the path

getPersisterback to summary
public CollectionPersister getPersister()
Annotations
@SuppressWarnings:UnusedDeclaration
locateAttributeInternalback to summary
protected Attribute<X, Y> locateAttributeInternal(String attributeName)

Implements abstract org.hibernate.query.criteria.internal.path.AbstractPathImpl.locateAttributeInternal.

Doc from org.hibernate.query.criteria.internal.path.AbstractPathImpl.locateAttributeInternal.

Get the attribute by name from the underlying model. This allows subclasses to define exactly how the attribute is derived. Called from locateAttribute which also applies nullness checking for proper error reporting.

Parameters
attributeName:String

The name of the attribute to locate

Returns:Attribute<X, Y>

The attribute; may be null.

Annotations
@Override
locateNearestSubclassEntityback to summary
private EntityType<X> locateNearestSubclassEntity(MappedSuperclassType<X> mappedSuperclassType, EntityType<X> entityTypeTop)
resolvePersisterback to summary
private CollectionPersister resolvePersister(CriteriaBuilderImpl criteriaBuilder, PluralAttribute<X, C, E> attribute)
resolveRoleback to summary
private String resolveRole(PluralAttribute<X, C, E> attribute)
treatAsback to summary
public <T extends X> PluralAttributePath<T> treatAs(Class<T> treatAsType)

Implements org.hibernate.query.criteria.internal.PathImplementor.treatAs.

Doc from org.hibernate.query.criteria.internal.PathImplementor.treatAs.

Defines handling for the JPA 2.1 TREAT down-casting feature.

Parameters
<T>
The parameterized type representation of treatAsType.
treatAsType:Class<T>

The type to treat the path as.

Returns:PluralAttributePath<T>

The properly typed view of this path.

Annotations
@Override