Interface NaturalIdLoader<T>

All Superinterfaces:
EntityLoader, Loader, MultiKeyLoader
All Known Implementing Classes:
AbstractNaturalIdLoader, CompoundNaturalIdLoader, SimpleNaturalIdLoader

public interface NaturalIdLoader<T> extends EntityLoader, MultiKeyLoader
Loader for NaturalId handling
  • Method Details

    • 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 efficient
      options - The options to apply to the load operation
      session - 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