Package org.hibernate.loader.ast.spi
Interface NaturalIdLoader<T>
- All Superinterfaces:
EntityLoader,Loader,MultiKeyLoader
- All Known Implementing Classes:
AbstractNaturalIdLoader,CompoundNaturalIdLoader,SimpleNaturalIdLoader
public interfaceNaturalIdLoader<T>extendsEntityLoader,MultiKeyLoader
Loader forNaturalIdhandling
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Tload(Object naturalIdToLoad,NaturalIdLoadOptions options,SharedSessionContractImplementor session)Perform the load of the entity by its natural-idObjectresolveIdToNaturalId(Object id,SharedSessionContractImplementor session)Resolve the natural-id value(s) from an idObjectresolveNaturalIdToId(Object naturalIdValue,SharedSessionContractImplementor session)Resolve the id from natural-id valueMethods inherited from interface org.hibernate.loader.ast.spi.EntityLoader
getLoadable
Method Detail
load
T load(Object naturalIdToLoad,NaturalIdLoadOptions options,SharedSessionContractImplementor session)
Perform the load of the entity by its natural-id- Parameters:
naturalIdToLoad- 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 efficientoptions- The options to apply to the load operationsession- The session into which the entity is being loaded
resolveNaturalIdToId
Object resolveNaturalIdToId(Object naturalIdValue,SharedSessionContractImplementor session)
Resolve the id from natural-id value
resolveIdToNaturalId
Object resolveIdToNaturalId(Object id,SharedSessionContractImplementor session)
Resolve the natural-id value(s) from an id