Top Description Inners Methods
org.hibernate.loader.plan.spi

public Interface LoadPlan

Known Direct Implementers
org.hibernate.loader.plan.build.internal.LoadPlanImpl
Imports
java.util.List

Describes a plan for performing a load of results. Generally speaking there are 3 forms of load plans:

todo : would also like to see "call back" style access for handling "subsequent actions" such as...

Author
Steve Ebersole

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
LoadPlan.Disposition

Enumerated possibilities for describing the disposition of this LoadPlan.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

Whether or not to
areLazyAttributesForceFetched
()

Does this load plan indicate that lazy attributes are to be force fetched?

public LoadPlan.Disposition

Returns:

The LoadPlan's disposition
getDisposition
()

What is the disposition of this LoadPlan, in terms of its returns.

public QuerySpaces

Returns:

The QuerySpaces
getQuerySpaces
()

Gets the QuerySpaces for the load plan, which contains a QuerySpace reference for each non-scalar return and for each entity, collection, and composite FetchSource.

public List<? extends Return>

Returns:

The Returns for this LoadPlan.
getReturns
()

Get the returns indicated by this LoadPlan.

public boolean

Returns:

true if getReturns() contained any scalar returns; false otherwise.
hasAnyScalarReturns
()

Convenient form of checking getReturns() for scalar root returns.

Method Detail

areLazyAttributesForceFetchedback to summary
public boolean areLazyAttributesForceFetched()

Does this load plan indicate that lazy attributes are to be force fetched?

Here we are talking about laziness in regards to the legacy bytecode enhancement which adds support for partial selects of an entity's state (e.g., skip loading a lob initially, wait until/if it is needed)

This one would effect the SQL that needs to get generated as well as how the result set would be read. Therefore we make this part of the LoadPlan contract.

NOTE that currently this is only relevant for HQL loaders when the HQL has specified the FETCH ALL PROPERTIES key-phrase. In all other cases, this returns false.

Returns:boolean

Whether or not to

getDispositionback to summary
public LoadPlan.Disposition getDisposition()

What is the disposition of this LoadPlan, in terms of its returns.

Returns:LoadPlan.Disposition

The LoadPlan's disposition

getQuerySpacesback to summary
public QuerySpaces getQuerySpaces()

Gets the QuerySpaces for the load plan, which contains a QuerySpace reference for each non-scalar return and for each entity, collection, and composite FetchSource.

When generating SQL, the query spaces provide data for the "from clause" including joins.

Returns:QuerySpaces

The QuerySpaces

getReturnsback to summary
public List<? extends Return> getReturns()

Get the returns indicated by this LoadPlan.

When generating SQL, the Returns provide columns/formulas used in the "select clause".

Returns:List<? extends Return>

The Returns for this LoadPlan.

See Also
Disposition
hasAnyScalarReturnsback to summary
public boolean hasAnyScalarReturns()

Convenient form of checking getReturns() for scalar root returns.

Returns:boolean

true if getReturns() contained any scalar returns; false otherwise.

org.hibernate.loader.plan.spi back to summary

public final Enum LoadPlan.Disposition

extends Enum<LoadPlan.Disposition>
Class Inheritance

Enumerated possibilities for describing the disposition of this LoadPlan.

Field Summary

Modifier and TypeField and Description
public static final LoadPlan.Disposition
COLLECTION_INITIALIZER

This is a "collection initializer" load plan, which describes a plan for loading one or more entity instances of the same collection type.

public static final LoadPlan.Disposition
ENTITY_LOADER

This is an "entity loader" load plan, which describes a plan for loading one or more entity instances of the same entity type.

public static final LoadPlan.Disposition

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static LoadPlan.Disposition
public static LoadPlan.Disposition[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

COLLECTION_INITIALIZERback to summary
public static final LoadPlan.Disposition COLLECTION_INITIALIZER

This is a "collection initializer" load plan, which describes a plan for loading one or more entity instances of the same collection type. There is a single return, which will be of type org.hibernate.loader.plan.spi.CollectionReturn

ENTITY_LOADERback to summary
public static final LoadPlan.Disposition ENTITY_LOADER

This is an "entity loader" load plan, which describes a plan for loading one or more entity instances of the same entity type. There is a single return, which will be of type org.hibernate.loader.plan.spi.EntityReturn

MIXEDback to summary
public static final LoadPlan.Disposition MIXED

We have a mixed load plan, which will have one or more returns of org.hibernate.loader.plan.spi.EntityReturn and org.hibernate.loader.plan.spi.ScalarReturn (NOT org.hibernate.loader.plan.spi.CollectionReturn).

Constructor Detail

Dispositionback to summary
private Disposition()

Method Detail

valueOfback to summary
public static LoadPlan.Disposition valueOf(String name)
valuesback to summary
public static LoadPlan.Disposition[] values()