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

public Class SingularAttributePath<X>

extends AbstractPathImpl<X>
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Known Direct Subclasses
org.hibernate.query.criteria.internal.path.SingularAttributePath.TreatedSingularAttributePath
Imports
java.io.Serializable, javax.persistence.metamodel.Attribute, .Bindable, .EmbeddableType, .IdentifiableType, .ManagedType, .SingularAttribute, org.hibernate.query.criteria.internal.CriteriaBuilderImpl, .PathSource, org.hibernate.query.criteria.internal.compile.RenderingContext

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

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
private final SingularAttribute<?, X>
private final ManagedType<X>

Constructor Summary

AccessConstructor and Description
public
SingularAttributePath(CriteriaBuilderImpl criteriaBuilder, Class<X> javaType, PathSource<X> pathSource, SingularAttribute<?, X> attribute)

Method Summary

Modifier and TypeMethod and Description
protected boolean
public SingularAttribute<?, 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.
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 ManagedType<X>
public <T extends X> SingularAttributePath<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 SingularAttribute<?, X> attribute
managedTypeback to summary
private final ManagedType<X> managedType

Constructor Detail

SingularAttributePathback to summary
public SingularAttributePath(CriteriaBuilderImpl criteriaBuilder, Class<X> javaType, PathSource<X> pathSource, SingularAttribute<?, X> attribute)
Annotations
@SuppressWarnings:unchecked

Method Detail

canBeDereferencedback to summary
protected boolean canBeDereferenced()

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

Annotations
@Override
getAttributeback to summary
public SingularAttribute<?, 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:SingularAttribute<?, X>

The metamodel attribute.

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

Annotations
@Override
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
resolveManagedTypeback to summary
private ManagedType<X> resolveManagedType(SingularAttribute<?, X> attribute)
treatAsback to summary
public <T extends X> SingularAttributePath<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:SingularAttributePath<T>

The properly typed view of this path.

Annotations
@Override
org.hibernate.query.criteria.internal.path back to summary

public Class SingularAttributePath.TreatedSingularAttributePath<T>

extends SingularAttributePath<T>
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final SingularAttributePath<? super T>
private final Class<T>

Constructor Summary

AccessConstructor and Description
public
TreatedSingularAttributePath(SingularAttributePath<? super T> original, Class<T> treatAsType)

Method Summary

Modifier and TypeMethod and Description
public String
getAlias()

Overrides org.hibernate.query.criteria.internal.expression.AbstractTupleElement.getAlias.

Implements javax.persistence.TupleElement.getAlias.

Return the alias assigned to the tuple element or null, if no alias has been assigned.
public void
public String
Inherited from org.hibernate.query.criteria.internal.path.SingularAttributePath:
canBeDereferencedgetAttributegetModellocateAttributeInternaltreatAs

Field Detail

originalback to summary
private final SingularAttributePath<? super T> original
treatAsTypeback to summary
private final Class<T> treatAsType

Constructor Detail

TreatedSingularAttributePathback to summary
public TreatedSingularAttributePath(SingularAttributePath<? super T> original, Class<T> treatAsType)
Annotations
@SuppressWarnings:unchecked

Method Detail

getAliasback to summary
public String getAlias()

Overrides org.hibernate.query.criteria.internal.expression.AbstractTupleElement.getAlias.

Implements javax.persistence.TupleElement.getAlias.

Doc from javax.persistence.TupleElement.getAlias.

Return the alias assigned to the tuple element or null, if no alias has been assigned.

Returns:String

alias

Annotations
@Override
prepareAliasback to summary
public void prepareAlias(RenderingContext renderingContext)

Overrides org.hibernate.query.criteria.internal.path.AbstractPathImpl.prepareAlias.

Implements org.hibernate.query.criteria.internal.PathSource.prepareAlias.

Annotations
@Override
renderback to summary
public String render(RenderingContext renderingContext)

Overrides org.hibernate.query.criteria.internal.path.AbstractPathImpl.render.

Implements org.hibernate.query.criteria.internal.Renderable.render.

Doc from org.hibernate.query.criteria.internal.Renderable.render.

Perform the rendering, returning the rendition

Annotations
@Override