Package org.hibernate.event.internal
Class DefaultLoadEventListener
java.lang.Object
org.hibernate.event.internal.DefaultLoadEventListener
- All Implemented Interfaces:
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 -
Method Summary
Modifier and TypeMethodDescriptionprotected 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.
-
Constructor Details
-
DefaultLoadEventListener
public DefaultLoadEventListener()
-
-
Method Details
-
onLoad
Handle the given load event.- Specified by:
onLoad
in interfaceLoadEventListener
- Parameters:
event
- The load event to be handled.- Throws:
HibernateException
-
getPersister
-
loadFromDatasource
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.
-