Top Description Methods
org.hibernate.loader.ast.spi

public Interface NaturalIdLoader<T>

extends EntityLoader, MultiKeyLoader
Known Direct Implementers
org.hibernate.loader.ast.internal.AbstractNaturalIdLoader
Imports
org.hibernate.engine.spi.SharedSessionContractImplementor

Loader for org.hibernate.annotations.NaturalId handling
Author
Steve Ebersole

Method Summary

Modifier and TypeMethod and Description
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
naturalIdToLoad
,
NaturalIdLoadOptions
The options to apply to the load operation
options
,
SharedSessionContractImplementor
The session into which the entity is being loaded
session
)

Perform the load of the entity by its natural-id

public Object
resolveIdToNaturalId(Object id, SharedSessionContractImplementor session)

Resolve the natural-id value(s) from an id

public Object
resolveNaturalIdToId(Object naturalIdValue, SharedSessionContractImplementor session)

Resolve the id from natural-id value

Inherited from org.hibernate.loader.ast.spi.EntityLoader:
getLoadable

Method Detail

loadback to summary
public T load(Object naturalIdToLoad, NaturalIdLoadOptions options, SharedSessionContractImplementor session)

Perform the load of the entity by its natural-id

Parameters
naturalIdToLoad: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

options:NaturalIdLoadOptions

The options to apply to the load operation

session:SharedSessionContractImplementor

The session into which the entity is being loaded

resolveIdToNaturalIdback to summary
public Object resolveIdToNaturalId(Object id, SharedSessionContractImplementor session)

Resolve the natural-id value(s) from an id

resolveNaturalIdToIdback to summary
public Object resolveNaturalIdToId(Object naturalIdValue, SharedSessionContractImplementor session)

Resolve the id from natural-id value