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

public Class RootImpl<X>

extends AbstractFromImpl<X, X>
implements Root<X>, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, javax.persistence.criteria.Root, javax.persistence.criteria.From, javax.persistence.criteria.FetchParent, javax.persistence.criteria.Path, javax.persistence.criteria.Expression, javax.persistence.criteria.Selection, javax.persistence.TupleElement
Known Direct Subclasses
org.hibernate.query.criteria.internal.path.RootImpl.TreatedRoot
Imports
java.io.Serializable, java.util.LinkedHashSet, .Set, javax.persistence.criteria.Join, .Root, javax.persistence.metamodel.EntityType, org.hibernate.query.criteria.internal.CriteriaBuilderImpl, .CriteriaSubqueryImpl, .FromImplementor, .PathSource, org.hibernate.query.criteria.internal.compile.RenderingContext

Hibernate implementation of the JPA Root contract
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 boolean
private final EntityType<X>
private final Set<RootImpl.TreatedRoot<? extends X>>
Inherited from org.hibernate.query.criteria.internal.path.AbstractFromImpl:
DEFAULT_JOIN_TYPE

Constructor Summary

AccessConstructor and Description
public
RootImpl(CriteriaBuilderImpl criteriaBuilder, EntityType<X> entityType)

public
RootImpl(CriteriaBuilderImpl criteriaBuilder, EntityType<X> entityType, boolean allowJoins)

Method Summary

Modifier and TypeMethod and Description
protected boolean
public RootImpl<X>
protected FromImplementor<X, X>
public EntityType<X>
public EntityType<X>
getModel()

Implements javax.persistence.criteria.Root.getModel, javax.persistence.criteria.Path.getModel.

Return the metamodel entity corresponding to the root.
public String
getPathIdentifier()

Overrides org.hibernate.query.criteria.internal.path.AbstractFromImpl.getPathIdentifier.

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

Get the string representation of this path as a navigation from one of the queries identification variables
public Set<RootImpl.TreatedRoot<? extends X>>
protected RuntimeException
protected RuntimeException
public String
public String
public <T extends X> RootImpl<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.AbstractFromImpl:
canBeDereferencedcanBeFetchSourcecanBeReplacedByCorrelatedParentInSubQueryfetchfetchfetchfetchfetchfetchgetAliasgetAttributegetCorrelationParentgetFetchesgetJoinsgetParentgetPathSourceisCorrelatedjoinjoinjoinjoinjoinjoinjoinjoinjoinjoinjoinjoinjoinCollectionjoinCollectionjoinListjoinListjoinMapjoinMapjoinSetjoinSetlocateAttributeInternallocateManagedTypeprepareAliasprepareCorrelationDelegate

Field Detail

allowJoinsback to summary
private final boolean allowJoins
entityTypeback to summary
private final EntityType<X> entityType
treatsback to summary
private final Set<RootImpl.TreatedRoot<? extends X>> treats

Constructor Detail

RootImplback to summary
public RootImpl(CriteriaBuilderImpl criteriaBuilder, EntityType<X> entityType)
RootImplback to summary
public RootImpl(CriteriaBuilderImpl criteriaBuilder, EntityType<X> entityType, boolean allowJoins)

Method Detail

canBeJoinSourceback to summary
protected boolean canBeJoinSource()

Implements abstract org.hibernate.query.criteria.internal.path.AbstractFromImpl.canBeJoinSource.

Annotations
@Override
correlateToback to summary
public RootImpl<X> correlateTo(CriteriaSubqueryImpl<T> subquery)

Overrides org.hibernate.query.criteria.internal.path.AbstractFromImpl.correlateTo.

Implements org.hibernate.query.criteria.internal.FromImplementor.correlateTo.

Annotations
@Override
createCorrelationDelegateback to summary
protected FromImplementor<X, X> createCorrelationDelegate()

Implements abstract org.hibernate.query.criteria.internal.path.AbstractFromImpl.createCorrelationDelegate.

Annotations
@Override
getEntityTypeback to summary
public EntityType<X> getEntityType()
getModelback to summary
public EntityType<X> getModel()

Implements javax.persistence.criteria.Root.getModel, javax.persistence.criteria.Path.getModel.

Doc from javax.persistence.criteria.Root.getModel.

Return the metamodel entity corresponding to the root.

Returns:EntityType<X>

metamodel entity corresponding to the root

getPathIdentifierback to summary
public String getPathIdentifier()

Overrides org.hibernate.query.criteria.internal.path.AbstractFromImpl.getPathIdentifier.

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

Doc from org.hibernate.query.criteria.internal.PathSource.getPathIdentifier.

Get the string representation of this path as a navigation from one of the queries identification variables

Returns:String

The path's identifier.

Annotations
@Override
getTreatsback to summary
public Set<RootImpl.TreatedRoot<? extends X>> getTreats()
illegalFetchback to summary
protected RuntimeException illegalFetch()

Overrides org.hibernate.query.criteria.internal.path.AbstractFromImpl.illegalFetch.

Annotations
@Override
@SuppressWarnings:ThrowableResultOfMethodCallIgnored
illegalJoinback to summary
protected RuntimeException illegalJoin()

Overrides org.hibernate.query.criteria.internal.path.AbstractFromImpl.illegalJoin.

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

Overrides org.hibernate.query.criteria.internal.path.AbstractFromImpl.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
renderTableExpressionback to summary
public String renderTableExpression(RenderingContext renderingContext)

Implements org.hibernate.query.criteria.internal.FromImplementor.renderTableExpression.

treatAsback to summary
public <T extends X> RootImpl<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:RootImpl<T>

The properly typed view of this path.

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

public Class RootImpl.TreatedRoot<T>

extends RootImpl<T>
Class Inheritance

Field Summary

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

Constructor Summary

AccessConstructor and Description
public
TreatedRoot(RootImpl<? super T> original, Class<T> treatAsType)

Method Summary

Modifier and TypeMethod and Description
public String
getAlias()

Overrides org.hibernate.query.criteria.internal.path.AbstractFromImpl.getAlias.

Implements javax.persistence.TupleElement.getAlias.

Return the alias assigned to the tuple element or null, if no alias has been assigned.
public String
getPathIdentifier()

Overrides org.hibernate.query.criteria.internal.path.RootImpl.getPathIdentifier.

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

Get the string representation of this path as a navigation from one of the queries identification variables
protected PathSource<X>
protected String
public void
public String
render(RenderingContext renderingContext)

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

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

Perform the rendering, returning the rendition
Inherited from org.hibernate.query.criteria.internal.path.RootImpl:
canBeJoinSourcecorrelateTocreateCorrelationDelegategetEntityTypegetModelgetTreatsillegalFetchillegalJoinrenderTableExpressiontreatAs

Field Detail

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

Constructor Detail

TreatedRootback to summary
public TreatedRoot(RootImpl<? super T> original, Class<T> treatAsType)

Method Detail

getAliasback to summary
public String getAlias()

Overrides org.hibernate.query.criteria.internal.path.AbstractFromImpl.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
getPathIdentifierback to summary
public String getPathIdentifier()

Overrides org.hibernate.query.criteria.internal.path.RootImpl.getPathIdentifier.

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

Doc from org.hibernate.query.criteria.internal.PathSource.getPathIdentifier.

Get the string representation of this path as a navigation from one of the queries identification variables

Returns:String

The path's identifier.

Annotations
@Override
getPathSourceForSubPathsback to summary
protected PathSource<X> getPathSourceForSubPaths()

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

Annotations
@Override
getTreatFragmentback to summary
protected String getTreatFragment()
prepareAliasback to summary
public void prepareAlias(RenderingContext renderingContext)

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

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

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

Overrides org.hibernate.query.criteria.internal.path.RootImpl.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