类 LoadPlanImpl

  • 所有已实现的接口:
    LoadPlan

    public class LoadPlanImpl
    extends Object
    implements LoadPlan
    作者:
    Steve Ebersole
    • 构造器详细资料

      • LoadPlanImpl

        public LoadPlanImpl​(EntityReturn rootReturn,
                            QuerySpaces querySpaces)
        参数:
        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.
      • LoadPlanImpl

        public LoadPlanImpl​(CollectionReturn rootReturn,
                            QuerySpaces querySpaces)
        参数:
        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.
      • LoadPlanImpl

        public LoadPlanImpl​(List<? extends Return> returns,
                            QuerySpaces querySpaces,
                            boolean areLazyAttributesForceFetched)
        Creates a LoadPlan.Disposition.MIXED LoadPlan.
        参数:
        returns - The mixed Return references
        querySpaces - 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.
    • 方法详细资料

      • getQuerySpaces

        public QuerySpaces getQuerySpaces()
        从接口复制的说明: LoadPlan
        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.

        指定者:
        getQuerySpaces 在接口中 LoadPlan
        返回:
        The QuerySpaces
      • getDisposition

        public LoadPlan.Disposition getDisposition()
        从接口复制的说明: LoadPlan
        What is the disposition of this LoadPlan, in terms of its returns.
        指定者:
        getDisposition 在接口中 LoadPlan
        返回:
        The LoadPlan's disposition
      • areLazyAttributesForceFetched

        public boolean areLazyAttributesForceFetched()
        从接口复制的说明: LoadPlan
        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.

        指定者:
        areLazyAttributesForceFetched 在接口中 LoadPlan
        返回:
        Whether or not to