Top Fields Constructors Methods
org.hibernate.loader.plan.exec.internal

public Class RootHelper

extends Object
Class Inheritance
Imports
org.hibernate.loader.plan.spi.EntityQuerySpace, .LoadPlan, .QuerySpace, .QuerySpaces, .Return

Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
public static final RootHelper
INSTANCE

Singleton access

Constructor Summary

AccessConstructor and Description
private
RootHelper()

Disallow direct instantiation

Method Summary

Modifier and TypeMethod and Description
public <T extends QuerySpace> T

Returns:

The root QuerySpace
extractRootQuerySpace
(QuerySpaces
The QuerySpaces from which to extract the root.
querySpaces
,
Class<EntityQuerySpace>
The QuerySpace type expected, passed as an argument
returnType
)

Extract the root QuerySpace of the LoadPlan, assuming there is just one.

public <
The parameterized type of the specific Return type expected
T extends Return
>
T

Returns:

The root Return
extractRootReturn
(LoadPlan
The LoadPlan from which to extract the root return
loadPlan
,
Class<T>
The Return type expected, passed as an argument
returnType
)

Extract the root return of the LoadPlan, assuming there is just one.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INSTANCEback to summary
public static final RootHelper INSTANCE

Singleton access

Constructor Detail

RootHelperback to summary
private RootHelper()

Disallow direct instantiation

Method Detail

extractRootQuerySpaceback to summary
public <T extends QuerySpace> T extractRootQuerySpace(QuerySpaces querySpaces, Class<EntityQuerySpace> returnType)

Extract the root QuerySpace of the LoadPlan, assuming there is just one.

Parameters
querySpaces:QuerySpaces

The QuerySpaces from which to extract the root.

returnType:Class<EntityQuerySpace>

The QuerySpace type expected, passed as an argument

Returns:T

The root QuerySpace

Annotations
@SuppressWarnings:unchecked
Exceptions
IllegalStateException:
If there is no root, more than one root or the single root is not of the expected type.
extractRootReturnback to summary
public <T extends Return> T extractRootReturn(LoadPlan loadPlan, Class<T> returnType)

Extract the root return of the LoadPlan, assuming there is just one.

Parameters
<T>
The parameterized type of the specific Return type expected
loadPlan:LoadPlan

The LoadPlan from which to extract the root return

returnType:Class<T>

The Return type expected, passed as an argument

Returns:T

The root Return

Annotations
@SuppressWarnings:unchecked
Exceptions
IllegalStateException:
If there is no root, more than one root or the single root is not of the expected type.