LoadPlan.Disposition| Modifier | Constructor and Description |
|---|---|
|
LoadPlanImpl(CollectionReturn rootReturn,
QuerySpaces querySpaces)
Creates a
Disposition#COLLECTION_INITIALIZER LoadPlan. |
|
LoadPlanImpl(EntityReturn rootReturn,
QuerySpaces querySpaces)
Creates a
Disposition#ENTITY_LOADER LoadPlan. |
|
LoadPlanImpl(java.util.List<? extends Return> returns,
QuerySpaces querySpaces,
boolean areLazyAttributesForceFetched)
Creates a
Disposition#MIXED LoadPlan. |
protected |
LoadPlanImpl(java.util.List<? extends Return> returns,
QuerySpaces querySpaces,
LoadPlan.Disposition disposition,
boolean areLazyAttributesForceFetched) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
LoadPlan.Disposition |
getDisposition()
What is the disposition of this LoadPlan, in terms of its returns.
|
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. |
java.util.List<? extends Return> |
getReturns()
Get the returns indicated by this LoadPlan.
A
LoadPlan.Disposition.ENTITY_LOADER LoadPlan would have just a single Return of type EntityReturn. |
boolean |
hasAnyScalarReturns()
Convenient form of checking
LoadPlan.getReturns() for scalar root returns. |
protected LoadPlanImpl(java.util.List<? extends Return> returns, QuerySpaces querySpaces, LoadPlan.Disposition disposition, boolean areLazyAttributesForceFetched)
public LoadPlanImpl(EntityReturn rootReturn, QuerySpaces querySpaces)
Disposition#ENTITY_LOADER LoadPlan.rootReturn - The EntityReturn representation of the entity being loaded.querySpaces - The QuerySpaces containing all the query space references
required for rootReturn and joined entity, collection,
and composite references.public LoadPlanImpl(CollectionReturn rootReturn, QuerySpaces querySpaces)
Disposition#COLLECTION_INITIALIZER LoadPlan.rootReturn - The CollectionReturn representation of the collection being initialized.querySpaces - The QuerySpaces containing all the query space references
required for rootReturn and joined entity, collection,
and composite references.public LoadPlanImpl(java.util.List<? extends Return> returns, QuerySpaces querySpaces, boolean areLazyAttributesForceFetched)
Disposition#MIXED LoadPlan.returns - The mixed Return referencesquerySpaces - The QuerySpaces containing all the query space references
required for rootReturn and joined entity, collection,
and composite references.areLazyAttributesForceFetched - Should lazy attributes (bytecode enhanced laziness) be fetched also? This
effects the eventual SQL SELECT-clause which is why we have it here. Currently this is "all-or-none"; you
can request that all lazy properties across all entities in the loadplan be force fetched or none. There is
no entity-by-entity option. FETCH ALL PROPERTIES is the way this is requested in HQL. Would be nice to
consider this entity-by-entity, as opposed to all-or-none. For example, "fetch the LOB value for the Item.image
attribute, but no others (leave them lazy)". Not too concerned about having it at the attribute level.public java.util.List<? extends Return> getReturns()
LoadPlanLoadPlan.Disposition.ENTITY_LOADER LoadPlan would have just a single Return of type EntityReturn.
LoadPlan.Disposition.COLLECTION_INITIALIZER LoadPlan would have just a single Return of type
CollectionReturn.
LoadPlan.Disposition.MIXED LoadPlan would contain a mix of EntityReturn and
ScalarReturn elements, but no CollectionReturn.
getReturns in interface LoadPlanLoadPlan.Dispositionpublic QuerySpaces getQuerySpaces()
LoadPlanQuerySpaces 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.getQuerySpaces in interface LoadPlanpublic LoadPlan.Disposition getDisposition()
LoadPlangetDisposition in interface LoadPlanpublic boolean areLazyAttributesForceFetched()
LoadPlanFETCH ALL PROPERTIES
key-phrase. In all other cases, this returns false.areLazyAttributesForceFetched in interface LoadPlanpublic boolean hasAnyScalarReturns()
LoadPlanLoadPlan.getReturns() for scalar root returns.hasAnyScalarReturns in interface LoadPlantrue if LoadPlan.getReturns() contained any scalar returns; false otherwise.Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.