Class LoaderSelectBuilder
- java.lang.Object
-
- org.hibernate.loader.ast.internal.LoaderSelectBuilder
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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)
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 keysstatic 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 parameterstatic 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 keystatic 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
-
-
-
Method Detail
-
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 LoadablepartsToSelect
- Parts of the Loadable to select. Null/empty indicates to select the Loadable itselfrestrictedPart
- Part to base the where-clause restriction oncachedDomainResult
- DomainResult to be used. Null indicates to generate the DomainResultloadQueryInfluencers
- Any influencers (entity graph, fetch profile) to account forlockOptions
- Pessimistic lock options to applyjdbcParameterConsumer
- Consumer for all JdbcParameter references createdsessionFactory
- 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 LoadablepartsToSelect
- Parts of the Loadable to select. Null/empty indicates to select the Loadable itselfrestrictedPart
- Part to base the where-clause restriction oncachedDomainResult
- DomainResult to be used. Null indicates to generate the DomainResultnumberOfKeysToLoad
- How many keys should be accounted for in the where-clause restriction?loadQueryInfluencers
- Any influencers (entity graph, fetch profile) to account forlockOptions
- Pessimistic lock options to applyjdbcParameterConsumer
- Consumer for all JdbcParameter references createdsessionFactory
- 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 loadedsubselect
- The subselect details to applycachedDomainResult
- DomainResult to be used. Null indicates to generate the DomainResult?loadQueryInfluencers
- Any influencers (entity graph, fetch profile) to account forlockOptions
- Pessimistic lock options to applyjdbcParameterConsumer
- Consumer for all JdbcParameter references createdsessionFactory
- The SessionFactory- See Also:
CollectionLoaderSubSelectFetch
-
-