Package org.hibernate.event.internal
Class DefaultLoadEventListener
- java.lang.Object
-
- org.hibernate.event.internal.DefaultLoadEventListener
-
- All Implemented Interfaces:
LoadEventListener
public class DefaultLoadEventListener extends Object implements LoadEventListener
Defines the default load event listeners used by hibernate for loading entities in response to generated load events.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.hibernate.event.spi.LoadEventListener
LoadEventListener.LoadType
-
-
Field Summary
-
Fields inherited from interface org.hibernate.event.spi.LoadEventListener
GET, IMMEDIATE_LOAD, INTERNAL_LOAD_EAGER, INTERNAL_LOAD_LAZY, INTERNAL_LOAD_NULLABLE, LOAD, RELOAD
-
-
Constructor Summary
Constructors Constructor Description DefaultLoadEventListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected EntityPersister
getPersister(LoadEvent event)
protected Object
loadFromDatasource(LoadEvent event, EntityPersister persister)
Performs the process of loading an entity from the configured underlying datasource.void
onLoad(LoadEvent event, LoadEventListener.LoadType loadType)
Handle the given load event.
-
-
-
Method Detail
-
onLoad
public void onLoad(LoadEvent event, LoadEventListener.LoadType loadType) throws HibernateException
Handle the given load event.- Specified by:
onLoad
in interfaceLoadEventListener
- Parameters:
event
- The load event to be handled.- Throws:
HibernateException
-
getPersister
protected EntityPersister getPersister(LoadEvent event)
-
loadFromDatasource
protected Object loadFromDatasource(LoadEvent event, EntityPersister persister)
Performs the process of loading an entity from the configured underlying datasource.- Parameters:
event
- The load eventpersister
- The persister for the entity being requested for load- Returns:
- The object loaded from the datasource, or null if not found.
-
-