Interface LoadPlan


  • public interface LoadPlan
    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...

    • follow-on locking
    • join fetch conversions to subselect fetches
    • Method Detail

      • getDisposition

        LoadPlan.Disposition getDisposition()
        What is the disposition of this LoadPlan, in terms of its returns.
        Returns:
        The LoadPlan's disposition
      • getQuerySpaces

        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:
        The QuerySpaces
      • areLazyAttributesForceFetched

        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:
        Whether or not to
      • hasAnyScalarReturns

        boolean hasAnyScalarReturns()
        Convenient form of checking getReturns() for scalar root returns.
        Returns:
        true if getReturns() contained any scalar returns; false otherwise.