NaturalIdLoader implementations
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final EntityMappingType | |
| private final NaturalIdMapping |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected abstract void | applyNaturalIdRestriction(Object bindValue, TableGroup rootTableGroup, Consumer<Predicate> predicateConsumer, BiConsumer<JdbcParameter, JdbcParameterBinding> jdbcParameterConsumer, LoaderSqlAstCreationState sqlAstCreationState, SharedSessionContractImplementor session)
Apply restriction necessary to match the given natural-id value. |
| protected EntityMappingType | |
| public EntityMappingType | getLoadable()
Implements org. |
| public T | load(Object
The natural-id to load. One of 2 forms accepted:
* Single-value - valid for entities with a simple (single-valued)
natural-id
* Map - valid for any natural-id load. The map is each value keyed
by the attribute name that the value corresponds to. Even though
this form is allowed for simple natural-ids, the single value form
should be used as it is more efficient naturalIdValue, NaturalIdLoadOptions The options to apply to the load operation options, SharedSessionContractImplementor The session into which the entity is being loaded session)Implements org. |
| protected NaturalIdMapping | |
| protected Expression | resolveColumnReference(TableGroup rootTableGroup, SelectableMapping selectableMapping, SqlExpressionResolver sqlExpressionResolver, SessionFactoryImplementor sessionFactory)
Deprecated
as a consequence of
Helper to resolve ColumnReferences
SessionFactoryImplementor being deprecated.
|
| public Object | resolveIdToNaturalId(Object id, SharedSessionContractImplementor session)
Implements org. |
| public Object | resolveNaturalIdToId(Object naturalIdValue, SharedSessionContractImplementor session)
Implements org. |
| protected <L> L | selectByNaturalId(Object bindValue, NaturalIdLoadOptions options, BiFunction<TableGroup, LoaderSqlAstCreationState, DomainResult<?>> domainResultProducer, LoaderSqlAstCreationState.
Perform a select, restricted by natural-id, based on `domainResultProducer` and `fetchProcessor` |
| entityDescriptor | back to summary |
|---|---|
| private final EntityMappingType entityDescriptor | |
| naturalIdMapping | back to summary |
|---|---|
| private final NaturalIdMapping naturalIdMapping | |
| AbstractNaturalIdLoader | back to summary |
|---|---|
| public AbstractNaturalIdLoader(NaturalIdMapping naturalIdMapping, EntityMappingType entityDescriptor) | |
| applyNaturalIdRestriction | back to summary |
|---|---|
| protected abstract void applyNaturalIdRestriction(Object bindValue, TableGroup rootTableGroup, Consumer<Predicate> predicateConsumer, BiConsumer<JdbcParameter, JdbcParameterBinding> jdbcParameterConsumer, LoaderSqlAstCreationState sqlAstCreationState, SharedSessionContractImplementor session) Apply restriction necessary to match the given natural-id value. Should apply any predicates to `predicateConsumer` as well and any parameter / binding pairs | |
| entityDescriptor | back to summary |
|---|---|
| protected EntityMappingType entityDescriptor() | |
| getLoadable | back to summary |
|---|---|
| public EntityMappingType getLoadable() Implements org. Doc from org. The value-mapping loaded by this loader
| |
| load | back to summary |
|---|---|
| public T load(Object naturalIdValue, NaturalIdLoadOptions options, SharedSessionContractImplementor session) Implements org. Doc from org. Perform the load of the entity by its natural-id
| |
| naturalIdMapping | back to summary |
|---|---|
| protected NaturalIdMapping naturalIdMapping() | |
| resolveColumnReference | back to summary |
|---|---|
| protected Expression resolveColumnReference(TableGroup rootTableGroup, SelectableMapping selectableMapping, SqlExpressionResolver sqlExpressionResolver, SessionFactoryImplementor sessionFactory)
Deprecated as a consequence of Helper to resolve ColumnReferences | |
| resolveIdToNaturalId | back to summary |
|---|---|
| public Object resolveIdToNaturalId(Object id, SharedSessionContractImplementor session) Implements org. Doc from org. Resolve the natural-id value(s) from an id
| |
| resolveNaturalIdToId | back to summary |
|---|---|
| public Object resolveNaturalIdToId(Object naturalIdValue, SharedSessionContractImplementor session) Implements org. Doc from org. Resolve the id from natural-id value
| |
| selectByNaturalId | back to summary |
|---|---|
| protected <L> L selectByNaturalId(Object bindValue, NaturalIdLoadOptions options, BiFunction<TableGroup, LoaderSqlAstCreationState, DomainResult<?>> domainResultProducer, LoaderSqlAstCreationState. Perform a select, restricted by natural-id, based on `domainResultProducer` and `fetchProcessor` | |
| Modifier and Type | Field and Description |
|---|---|
| private final Callback | |
| private final QueryOptions |
| Access | Constructor and Description |
|---|---|
| public | NaturalIdLoaderWithOptionsExecutionContext(SharedSessionContractImplementor session, QueryOptions queryOptions)
|
| Modifier and Type | Method and Description |
|---|---|
| public Callback | |
| public QueryOptions |
| callback | back to summary |
|---|---|
| private final Callback callback | |
| queryOptions | back to summary |
|---|---|
| private final QueryOptions queryOptions | |
| NaturalIdLoaderWithOptionsExecutionContext | back to summary |
|---|---|
| public NaturalIdLoaderWithOptionsExecutionContext(SharedSessionContractImplementor session, QueryOptions queryOptions) | |
| getCallback | back to summary |
|---|---|
| public Callback getCallback() Overrides org. Implements org.
| |
| getQueryOptions | back to summary |
|---|---|
| public QueryOptions getQueryOptions() Overrides org. Implements org.
| |