Class LoaderSelectBuilder

java.lang.Object
org.hibernate.loader.ast.internal.LoaderSelectBuilder

public class LoaderSelectBuilder extends Object
Builder for SQL AST trees used by Loader implementations.
  • Method Details

    • createSelectByUniqueKey

      public static SelectStatement createSelectByUniqueKey(Loadable loadable, List<? extends ModelPart> partsToSelect, ModelPart restrictedPart, DomainResult<?> cachedDomainResult, LoadQueryInfluencers loadQueryInfluencers, LockOptions lockOptions, Consumer<JdbcParameter> jdbcParameterConsumer, SessionFactoryImplementor sessionFactory)
      Create an SQL AST select-statement for loading by unique key
      Parameters:
      loadable - The root Loadable
      partsToSelect - Parts of the Loadable to select. Null/empty indicates to select the Loadable itself
      restrictedPart - Part to base the where-clause restriction on
      cachedDomainResult - DomainResult to be used. Null indicates to generate the DomainResult
      loadQueryInfluencers - Any influencers (entity graph, fetch profile) to account for
      lockOptions - Pessimistic lock options to apply
      jdbcParameterConsumer - Consumer for all JdbcParameter references created
      sessionFactory - The SessionFactory
    • createSelectBySingleArrayParameter

      public static SelectStatement createSelectBySingleArrayParameter(Loadable loadable, ValuedModelPart restrictedPart, LoadQueryInfluencers influencers, LockOptions lockOptions, JdbcParameter jdbcArrayParameter, SessionFactoryImplementor sessionFactory)
      Create a select-statement (SQL AST) for loading by multiple keys using a single SQL ARRAY parameter
    • createSelect

      public static SelectStatement createSelect(Loadable loadable, List<? extends ModelPart> partsToSelect, ModelPart restrictedPart, DomainResult<?> cachedDomainResult, int numberOfKeysToLoad, LoadQueryInfluencers loadQueryInfluencers, LockOptions lockOptions, Consumer<JdbcParameter> jdbcParameterConsumer, SessionFactoryImplementor sessionFactory)
      Create an SQL AST select-statement based on matching one-or-more keys
      Parameters:
      loadable - The root Loadable
      partsToSelect - Parts of the Loadable to select. Null/empty indicates to select the Loadable itself
      restrictedPart - Part to base the where-clause restriction on
      cachedDomainResult - DomainResult to be used. Null indicates to generate the DomainResult
      numberOfKeysToLoad - How many keys should be accounted for in the where-clause restriction?
      loadQueryInfluencers - Any influencers (entity graph, fetch profile) to account for
      lockOptions - Pessimistic lock options to apply
      jdbcParameterConsumer - Consumer for all JdbcParameter references created
      sessionFactory - The SessionFactory
    • createSelect

      public static SelectStatement createSelect(Loadable loadable, List<? extends ModelPart> partsToSelect, List<ModelPart> restrictedParts, DomainResult<?> cachedDomainResult, int numberOfKeysToLoad, LoadQueryInfluencers loadQueryInfluencers, LockOptions lockOptions, Consumer<JdbcParameter> jdbcParameterConsumer, SessionFactoryImplementor sessionFactory)
    • createSubSelectFetchSelect

      public static SelectStatement createSubSelectFetchSelect(PluralAttributeMapping attributeMapping, SubselectFetch subselect, DomainResult<?> cachedDomainResult, LoadQueryInfluencers loadQueryInfluencers, LockOptions lockOptions, Consumer<JdbcParameter> jdbcParameterConsumer, SessionFactoryImplementor sessionFactory)
      Create an SQL AST select-statement used for subselect-based CollectionLoader
      Parameters:
      attributeMapping - The plural-attribute being loaded
      subselect - The subselect details to apply
      cachedDomainResult - DomainResult to be used. Null indicates to generate the DomainResult?
      loadQueryInfluencers - Any influencers (entity graph, fetch profile) to account for
      lockOptions - Pessimistic lock options to apply
      jdbcParameterConsumer - Consumer for all JdbcParameter references created
      sessionFactory - The SessionFactory
      See Also: