类 LoadPlanImpl
- java.lang.Object
-
- org.hibernate.loader.plan.build.internal.LoadPlanImpl
-
-
嵌套类概要
-
从接口继承的嵌套类/接口 org.hibernate.loader.plan.spi.LoadPlan
LoadPlan.Disposition
-
-
构造器概要
构造器 限定符 构造器 说明 LoadPlanImpl(List<? extends Return> returns, QuerySpaces querySpaces, boolean areLazyAttributesForceFetched)Creates aLoadPlan.Disposition.MIXEDLoadPlan.protectedLoadPlanImpl(List<? extends Return> returns, QuerySpaces querySpaces, LoadPlan.Disposition disposition, boolean areLazyAttributesForceFetched)LoadPlanImpl(CollectionReturn rootReturn, QuerySpaces querySpaces)Creates aLoadPlan.Disposition.COLLECTION_INITIALIZERLoadPlan.LoadPlanImpl(EntityReturn rootReturn, QuerySpaces querySpaces)Creates aLoadPlan.Disposition.ENTITY_LOADERLoadPlan.
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 booleanareLazyAttributesForceFetched()Does this load plan indicate that lazy attributes are to be force fetched?LoadPlan.DispositiongetDisposition()What is the disposition of this LoadPlan, in terms of its returns.QuerySpacesgetQuerySpaces()Gets theQuerySpacesfor the load plan, which contains aQuerySpacereference for each non-scalar return and for each entity, collection, and compositeFetchSource.List<? extends Return>getReturns()Get the returns indicated by this LoadPlan. ALoadPlan.Disposition.ENTITY_LOADERLoadPlan would have just a single Return of typeEntityReturn.booleanhasAnyScalarReturns()Convenient form of checkingLoadPlan.getReturns()for scalar root returns.
-
-
-
构造器详细资料
-
LoadPlanImpl
protected LoadPlanImpl(List<? extends Return> returns, QuerySpaces querySpaces, LoadPlan.Disposition disposition, boolean areLazyAttributesForceFetched)
-
LoadPlanImpl
public LoadPlanImpl(EntityReturn rootReturn, QuerySpaces querySpaces)
Creates aLoadPlan.Disposition.ENTITY_LOADERLoadPlan.- 参数:
rootReturn- The EntityReturn representation of the entity being loaded.querySpaces- The QuerySpaces containing all the query space references required forrootReturnand joined entity, collection, and composite references.
-
LoadPlanImpl
public LoadPlanImpl(CollectionReturn rootReturn, QuerySpaces querySpaces)
Creates aLoadPlan.Disposition.COLLECTION_INITIALIZERLoadPlan.- 参数:
rootReturn- The CollectionReturn representation of the collection being initialized.querySpaces- The QuerySpaces containing all the query space references required forrootReturnand joined entity, collection, and composite references.
-
LoadPlanImpl
public LoadPlanImpl(List<? extends Return> returns, QuerySpaces querySpaces, boolean areLazyAttributesForceFetched)
Creates aLoadPlan.Disposition.MIXEDLoadPlan.- 参数:
returns- The mixed Return referencesquerySpaces- The QuerySpaces containing all the query space references required forrootReturnand 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 PROPERTIESis 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.
-
-
方法详细资料
-
getReturns
public List<? extends Return> getReturns()
从接口复制的说明:LoadPlanGet the returns indicated by this LoadPlan.-
A
LoadPlan.Disposition.ENTITY_LOADERLoadPlan would have just a single Return of typeEntityReturn. -
A
LoadPlan.Disposition.COLLECTION_INITIALIZERLoadPlan would have just a single Return of typeCollectionReturn. -
A
LoadPlan.Disposition.MIXEDLoadPlan would contain a mix ofEntityReturnandScalarReturnelements, but noCollectionReturn.
- 指定者:
getReturns在接口中LoadPlan- 返回:
- The Returns for this LoadPlan.
- 另请参阅:
LoadPlan.Disposition
-
A
-
getQuerySpaces
public QuerySpaces getQuerySpaces()
从接口复制的说明:LoadPlanGets theQuerySpacesfor the load plan, which contains aQuerySpacereference for each non-scalar return and for each entity, collection, and compositeFetchSource. When generating SQL, the query spaces provide data for the "from clause" including joins.- 指定者:
getQuerySpaces在接口中LoadPlan- 返回:
- The QuerySpaces
-
getDisposition
public LoadPlan.Disposition getDisposition()
从接口复制的说明:LoadPlanWhat is the disposition of this LoadPlan, in terms of its returns.- 指定者:
getDisposition在接口中LoadPlan- 返回:
- The LoadPlan's disposition
-
areLazyAttributesForceFetched
public boolean areLazyAttributesForceFetched()
从接口复制的说明:LoadPlanDoes 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 theFETCH ALL PROPERTIESkey-phrase. In all other cases, this returns false.- 指定者:
areLazyAttributesForceFetched在接口中LoadPlan- 返回:
- Whether or not to
-
hasAnyScalarReturns
public boolean hasAnyScalarReturns()
从接口复制的说明:LoadPlanConvenient form of checkingLoadPlan.getReturns()for scalar root returns.- 指定者:
hasAnyScalarReturns在接口中LoadPlan- 返回:
trueifLoadPlan.getReturns()contained any scalar returns;falseotherwise.
-
-