Loader implementations.
| Modifier and Type | Class and Description |
|---|---|
| private static interface | |
| private static enum | LoaderSelectBuilder.RowCardinality
Describes the JDBC result set cardinality per entity result object. |
| Modifier and Type | Field and Description |
|---|---|
| private final DomainResult | |
| private final SqlAstCreationContext | |
| private final EntityGraphTraversalState | |
| private int | |
| private final boolean | |
| private final Consumer | |
| private final Loadable | |
| private final LoadQueryInfluencers | |
| private final LockOptions | |
| private static final Logger | |
| private final int | |
| private final List | |
| private final List | |
| private LoaderSelectBuilder. |
| Access | Constructor and Description |
|---|---|
| private | LoaderSelectBuilder(SqlAstCreationContext creationContext, Loadable loadable, List<? extends ModelPart> partsToSelect, List<ModelPart> restrictedParts, DomainResult<?> cachedDomainResult, int numberOfKeysToLoad, LoadQueryInfluencers loadQueryInfluencers, LockOptions lockOptions, EntityGraphTraversalState entityGraphTraversalState, boolean forceIdentifierSelection, Consumer<JdbcParameter> jdbcParameterConsumer)
|
| private | LoaderSelectBuilder(SqlAstCreationContext creationContext, Loadable loadable, List<? extends ModelPart> partsToSelect, List<ModelPart> restrictedParts, DomainResult<?> cachedDomainResult, int numberOfKeysToLoad, LoadQueryInfluencers loadQueryInfluencers, LockOptions lockOptions, Consumer<JdbcParameter> jdbcParameterConsumer)
|
| private | LoaderSelectBuilder(SqlAstCreationContext creationContext, Loadable loadable, List<? extends ModelPart> partsToSelect, ModelPart restrictedPart, DomainResult<?> cachedDomainResult, int numberOfKeysToLoad, LoadQueryInfluencers loadQueryInfluencers, LockOptions lockOptions, Consumer<JdbcParameter> jdbcParameterConsumer)
|
| Modifier and Type | Method and Description |
|---|---|
| private static void | applyArrayParamRestriction(QuerySpec rootQuerySpec, NavigablePath rootNavigablePath, TableGroup rootTableGroup, ValuedModelPart restrictedPart, JdbcParameter jdbcArrayParameter, LoaderSqlAstCreationState sqlAstCreationState)
|
| private void | applyFiltering(QuerySpec querySpec, TableGroup tableGroup, PluralAttributeMapping pluralAttributeMapping, SqlAstCreationState astCreationState)
|
| private void | applyFiltering(QuerySpec querySpec, TableGroup tableGroup, Restrictable restrictable, SqlAstCreationState astCreationState)
|
| private void | applyOrdering(QuerySpec querySpec, TableGroup tableGroup, PluralAttributeMapping pluralAttributeMapping, SqlAstCreationState astCreationState)
|
| private void | applyOrdering(QuerySpec querySpec, TableGroup tableGroup, OrderByFragment orderByFragment, SqlAstCreationState astCreationState)
|
| private void | applyOrdering(QuerySpec querySpec, NavigablePath navigablePath, PluralAttributeMapping pluralAttributeMapping, LoaderSqlAstCreationState sqlAstCreationState)
|
| private void | applyRestriction(QuerySpec rootQuerySpec, NavigablePath rootNavigablePath, TableGroup rootTableGroup, ModelPart restrictedPart, int numberColumns, Consumer<JdbcParameter> jdbcParameterConsumer, LoaderSqlAstCreationState sqlAstCreationState)
|
| private void | applySubSelectRestriction(QuerySpec querySpec, TableGroup rootTableGroup, SubselectFetch subselect, LoaderSqlAstCreationState sqlAstCreationState)
|
| private List | buildRequestedDomainResults(NavigablePath rootNavigablePath, LoaderSqlAstCreationState sqlAstCreationState, TableGroup rootTableGroup)
|
| private TableGroup | buildRootTableGroup(NavigablePath rootNavigablePath, QuerySpec rootQuerySpec, LoaderSqlAstCreationState sqlAstCreationState)
|
| private LoaderSelectBuilder. | createFetchableConsumer(FetchParent fetchParent, LoaderSqlAstCreationState creationState, ImmutableFetchList.
|
| public static SelectStatement | createSelect(Loadable
The root Loadable loadable, List<? extends ModelPart> Parts of the Loadable to select. Null/empty indicates to select the Loadable itself partsToSelect, ModelPart Part to base the where-clause restriction on restrictedPart, DomainResult<?> DomainResult to be used. Null indicates to generate the DomainResult cachedDomainResult, int How many keys should be accounted for in the where-clause restriction? numberOfKeysToLoad, LoadQueryInfluencers Any influencers (entity graph, fetch profile) to account for loadQueryInfluencers, LockOptions Pessimistic lock options to apply lockOptions, Consumer<JdbcParameter> Consumer for all JdbcParameter references created jdbcParameterConsumer, SessionFactoryImplementor The SessionFactory sessionFactory)
Deprecated
as a consequence of
Create an SQL AST select-statement based on matching one-or-more keys
SessionFactoryImplementor being deprecated.
|
| 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)
Deprecated
as a consequence of
SessionFactoryImplementor being deprecated.
|
| pack-priv static SelectStatement | createSelect(Loadable loadable, List<ModelPart> partsToSelect, boolean forceIdentifierSelection, List<ModelPart> restrictedParts, DomainResult<?> cachedDomainResult, int numberOfKeysToLoad, LoadQueryInfluencers loadQueryInfluencers, LockOptions lockOptions, Consumer<JdbcParameter> jdbcParameterConsumer, SessionFactoryImplementor sessionFactory)
Deprecated
as a consequence of
SessionFactoryImplementor being deprecated.
|
| public static SelectStatement | createSelectBySingleArrayParameter(Loadable loadable, ValuedModelPart restrictedPart, LoadQueryInfluencers influencers, LockOptions lockOptions, JdbcParameter jdbcArrayParameter, SessionFactoryImplementor sessionFactory)
Deprecated
as a consequence of
Create a select-statement (SQL AST) for loading by multiple keys using a single SQL ARRAY parameter
SessionFactoryImplementor being deprecated.
|
| public static SelectStatement | createSelectByUniqueKey(Loadable
The root Loadable loadable, List<? extends ModelPart> Parts of the Loadable to select. Null/empty indicates to select the Loadable itself partsToSelect, ModelPart Part to base the where-clause restriction on restrictedPart, DomainResult<?> DomainResult to be used. Null indicates to generate the DomainResult cachedDomainResult, LoadQueryInfluencers Any influencers (entity graph, fetch profile) to account for loadQueryInfluencers, LockOptions Pessimistic lock options to apply lockOptions, Consumer<JdbcParameter> Consumer for all JdbcParameter references created jdbcParameterConsumer, SessionFactoryImplementor The SessionFactory sessionFactory)
Deprecated
as a consequence of
Create an SQL AST select-statement for loading by unique key
SessionFactoryImplementor being deprecated.
|
| private LoaderSqlAstCreationState | |
| public static SelectStatement | createSubSelectFetchSelect(PluralAttributeMapping
The plural-attribute being loaded attributeMapping, SubselectFetch The subselect details to apply subselect, DomainResult<?> DomainResult to be used. Null indicates to generate the DomainResult? cachedDomainResult, LoadQueryInfluencers Any influencers (entity graph, fetch profile) to account for loadQueryInfluencers, LockOptions Pessimistic lock options to apply lockOptions, Consumer<JdbcParameter> Consumer for all JdbcParameter references created jdbcParameterConsumer, SessionFactoryImplementor The SessionFactory sessionFactory)
Deprecated
as a consequence of
Create an SQL AST select-statement used for subselect-based CollectionLoader
SessionFactoryImplementor being deprecated.
|
| private static EntityGraphTraversalState | determineGraphTraversalState(LoadQueryInfluencers loadQueryInfluencers, SessionFactoryImplementor sessionFactory)
Deprecated
as a consequence of
SessionFactoryImplementor being deprecated.
|
| private static boolean | |
| private SelectStatement | |
| private SelectStatement | |
| private QueryPart | generateSubSelect(PluralAttributeMapping attributeMapping, SubselectFetch subselect, LoaderSqlAstCreationState creationState)
|
| private boolean | |
| private boolean | |
| private void | |
| private boolean | shouldExplicitFetch(Integer maxFetchDepth, Fetchable fetchable, LoaderSqlAstCreationState creationState)
|
| private ImmutableFetchList |
| cachedDomainResult | back to summary |
|---|---|
| private final DomainResult<?> cachedDomainResult | |
| creationContext | back to summary |
|---|---|
| private final SqlAstCreationContext creationContext | |
| entityGraphTraversalState | back to summary |
|---|---|
| private final EntityGraphTraversalState entityGraphTraversalState | |
| fetchDepth | back to summary |
|---|---|
| private int fetchDepth | |
| forceIdentifierSelection | back to summary |
|---|---|
| private final boolean forceIdentifierSelection | |
| jdbcParameterConsumer | back to summary |
|---|---|
| private final Consumer<JdbcParameter> jdbcParameterConsumer | |
| loadable | back to summary |
|---|---|
| private final Loadable loadable | |
| loadQueryInfluencers | back to summary |
|---|---|
| private final LoadQueryInfluencers loadQueryInfluencers | |
| lockOptions | back to summary |
|---|---|
| private final LockOptions lockOptions | |
| log | back to summary |
|---|---|
| private static final Logger log | |
| numberOfKeysToLoad | back to summary |
|---|---|
| private final int numberOfKeysToLoad | |
| partsToSelect | back to summary |
|---|---|
| private final List<? extends ModelPart> partsToSelect | |
| restrictedParts | back to summary |
|---|---|
| private final List<ModelPart> restrictedParts | |
| rowCardinality | back to summary |
|---|---|
| private LoaderSelectBuilder. | |
| LoaderSelectBuilder | back to summary |
|---|---|
| private LoaderSelectBuilder(SqlAstCreationContext creationContext, Loadable loadable, List<? extends ModelPart> partsToSelect, List<ModelPart> restrictedParts, DomainResult<?> cachedDomainResult, int numberOfKeysToLoad, LoadQueryInfluencers loadQueryInfluencers, LockOptions lockOptions, EntityGraphTraversalState entityGraphTraversalState, boolean forceIdentifierSelection, Consumer<JdbcParameter> jdbcParameterConsumer) | |
| LoaderSelectBuilder | back to summary |
|---|---|
| private LoaderSelectBuilder(SqlAstCreationContext creationContext, Loadable loadable, List<? extends ModelPart> partsToSelect, List<ModelPart> restrictedParts, DomainResult<?> cachedDomainResult, int numberOfKeysToLoad, LoadQueryInfluencers loadQueryInfluencers, LockOptions lockOptions, Consumer<JdbcParameter> jdbcParameterConsumer) | |
| LoaderSelectBuilder | back to summary |
|---|---|
| private LoaderSelectBuilder(SqlAstCreationContext creationContext, Loadable loadable, List<? extends ModelPart> partsToSelect, ModelPart restrictedPart, DomainResult<?> cachedDomainResult, int numberOfKeysToLoad, LoadQueryInfluencers loadQueryInfluencers, LockOptions lockOptions, Consumer<JdbcParameter> jdbcParameterConsumer) | |
| applyArrayParamRestriction | back to summary |
|---|---|
| private static void applyArrayParamRestriction(QuerySpec rootQuerySpec, NavigablePath rootNavigablePath, TableGroup rootTableGroup, ValuedModelPart restrictedPart, JdbcParameter jdbcArrayParameter, LoaderSqlAstCreationState sqlAstCreationState) | |
| applyFiltering | back to summary |
|---|---|
| private void applyFiltering(QuerySpec querySpec, TableGroup tableGroup, PluralAttributeMapping pluralAttributeMapping, SqlAstCreationState astCreationState) | |
| applyFiltering | back to summary |
|---|---|
| private void applyFiltering(QuerySpec querySpec, TableGroup tableGroup, Restrictable restrictable, SqlAstCreationState astCreationState) | |
| applyOrdering | back to summary |
|---|---|
| private void applyOrdering(QuerySpec querySpec, TableGroup tableGroup, PluralAttributeMapping pluralAttributeMapping, SqlAstCreationState astCreationState) | |
| applyOrdering | back to summary |
|---|---|
| private void applyOrdering(QuerySpec querySpec, TableGroup tableGroup, OrderByFragment orderByFragment, SqlAstCreationState astCreationState) | |
| applyOrdering | back to summary |
|---|---|
| private void applyOrdering(QuerySpec querySpec, NavigablePath navigablePath, PluralAttributeMapping pluralAttributeMapping, LoaderSqlAstCreationState sqlAstCreationState) | |
| applyRestriction | back to summary |
|---|---|
| private void applyRestriction(QuerySpec rootQuerySpec, NavigablePath rootNavigablePath, TableGroup rootTableGroup, ModelPart restrictedPart, int numberColumns, Consumer<JdbcParameter> jdbcParameterConsumer, LoaderSqlAstCreationState sqlAstCreationState) | |
| applySubSelectRestriction | back to summary |
|---|---|
| private void applySubSelectRestriction(QuerySpec querySpec, TableGroup rootTableGroup, SubselectFetch subselect, LoaderSqlAstCreationState sqlAstCreationState) | |
| buildRequestedDomainResults | back to summary |
|---|---|
| private List | |
| buildRootTableGroup | back to summary |
|---|---|
| private TableGroup buildRootTableGroup(NavigablePath rootNavigablePath, QuerySpec rootQuerySpec, LoaderSqlAstCreationState sqlAstCreationState) | |
| createFetchableConsumer | back to summary |
|---|---|
| private LoaderSelectBuilder. | |
| createSelect | back to summary |
|---|---|
| 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)
Deprecated as a consequence of Create an SQL AST select-statement based on matching one-or-more keys
| |
| createSelect | back to summary |
|---|---|
| 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)
Deprecated as a consequence of | |
| createSelect | back to summary |
|---|---|
| pack-priv static SelectStatement createSelect(Loadable loadable, List<ModelPart> partsToSelect, boolean forceIdentifierSelection, List<ModelPart> restrictedParts, DomainResult<?> cachedDomainResult, int numberOfKeysToLoad, LoadQueryInfluencers loadQueryInfluencers, LockOptions lockOptions, Consumer<JdbcParameter> jdbcParameterConsumer, SessionFactoryImplementor sessionFactory)
Deprecated as a consequence of | |
| createSelectBySingleArrayParameter | back to summary |
|---|---|
| public static SelectStatement createSelectBySingleArrayParameter(Loadable loadable, ValuedModelPart restrictedPart, LoadQueryInfluencers influencers, LockOptions lockOptions, JdbcParameter jdbcArrayParameter, SessionFactoryImplementor sessionFactory)
Deprecated as a consequence of Create a select-statement (SQL AST) for loading by multiple keys using a single SQL ARRAY parameter | |
| createSelectByUniqueKey | back to summary |
|---|---|
| public static SelectStatement createSelectByUniqueKey(Loadable loadable, List<? extends ModelPart> partsToSelect, ModelPart restrictedPart, DomainResult<?> cachedDomainResult, LoadQueryInfluencers loadQueryInfluencers, LockOptions lockOptions, Consumer<JdbcParameter> jdbcParameterConsumer, SessionFactoryImplementor sessionFactory)
Deprecated as a consequence of Create an SQL AST select-statement for loading by unique key
| |
| createSqlAstCreationState | back to summary |
|---|---|
| private LoaderSqlAstCreationState createSqlAstCreationState(QuerySpec rootQuerySpec) | |
| createSubSelectFetchSelect | back to summary |
|---|---|
| public static SelectStatement createSubSelectFetchSelect(PluralAttributeMapping attributeMapping, SubselectFetch subselect, DomainResult<?> cachedDomainResult, LoadQueryInfluencers loadQueryInfluencers, LockOptions lockOptions, Consumer<JdbcParameter> jdbcParameterConsumer, SessionFactoryImplementor sessionFactory)
Deprecated as a consequence of Create an SQL AST select-statement used for subselect-based CollectionLoader
| |
| determineGraphTraversalState | back to summary |
|---|---|
| private static EntityGraphTraversalState determineGraphTraversalState(LoadQueryInfluencers loadQueryInfluencers, SessionFactoryImplementor sessionFactory)
Deprecated as a consequence of | |
| determineWhetherToForceIdSelection | back to summary |
|---|---|
| private static boolean determineWhetherToForceIdSelection(int numberOfKeysToLoad, List<ModelPart> restrictedParts) | |
| generateSelect | back to summary |
|---|---|
| private SelectStatement generateSelect() | |
| generateSelect | back to summary |
|---|---|
| private SelectStatement generateSelect(SubselectFetch subselect) | |
| generateSubSelect | back to summary |
|---|---|
| private QueryPart generateSubSelect(PluralAttributeMapping attributeMapping, SubselectFetch subselect, LoaderSqlAstCreationState creationState) | |
| isBag | back to summary |
|---|---|
| private boolean isBag(Fetchable fetchable) | |
| isPluralAttributeMapping | back to summary |
|---|---|
| private boolean isPluralAttributeMapping(Fetchable fetchable) | |
| registerPluralTableGroupParts | back to summary |
|---|---|
| private void registerPluralTableGroupParts(FromClauseAccess fromClauseAccess, TableGroup tableGroup) | |
| shouldExplicitFetch | back to summary |
|---|---|
| private boolean shouldExplicitFetch(Integer maxFetchDepth, Fetchable fetchable, LoaderSqlAstCreationState creationState) | |
| visitFetches | back to summary |
|---|---|
| private ImmutableFetchList visitFetches(FetchParent fetchParent, LoaderSqlAstCreationState creationState) | |
| Modifier and Type | Method and Description |
|---|---|
| public void |
| accept | back to summary |
|---|---|
| public void accept(Fetchable fetchable, boolean isKeyFetchable, boolean isABag) | |
| Modifier and Type | Field and Description |
|---|---|
| public static final LoaderSelectBuilder. | BAG
Means there are multiple JDBC result rows per entity result object, but the aggregation of rows is dependent on the result cardinality. |
| public static final LoaderSelectBuilder. | SET
Means there are multiple JDBC result rows per entity result object, but the aggregation of rows is not affected the result cardinality. |
| public static final LoaderSelectBuilder. | SINGLE
Means that there is a single JDBC result row per entity result object. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static LoaderSelectBuilder. | |
| public static LoaderSelectBuilder. |
| BAG | back to summary |
|---|---|
| public static final LoaderSelectBuilder. Means there are multiple JDBC result rows per entity result object, but the aggregation of rows is dependent on the result cardinality. | |
| SET | back to summary |
|---|---|
| public static final LoaderSelectBuilder. Means there are multiple JDBC result rows per entity result object, but the aggregation of rows is not affected the result cardinality. | |
| SINGLE | back to summary |
|---|---|
| public static final LoaderSelectBuilder. Means that there is a single JDBC result row per entity result object. | |
| RowCardinality | back to summary |
|---|---|
| private RowCardinality() | |
| valueOf | back to summary |
|---|---|
| public static LoaderSelectBuilder. | |
| values | back to summary |
|---|---|
| public static LoaderSelectBuilder. | |