java.lang.Object | |||
↳ | org.hibernate.event.def.AbstractReassociateEventListener | ||
↳ | org.hibernate.event.def.AbstractLockUpgradeEventListener | ||
↳ | org.hibernate.event.def.DefaultLoadEventListener |
Defines the default load event listeners used by hibernate for loading entities in response to generated load events.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
DEFAULT_LOCK_MODE | |||||||||||
INCONSISTENT_RTN_CLASS_MARKER | |||||||||||
REMOVED_ENTITY_MARKER |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
org.hibernate.event.LoadEventListener
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Handle the given load event.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Coordinates the efforts to load a given entity.
| |||||||||||
Perfoms the load of an entity.
| |||||||||||
Performs the process of loading an entity from the configured
underlying datasource.
| |||||||||||
Attempts to load the entity from the second-level cache.
| |||||||||||
Attempts to locate the entity in the session-level cache.
| |||||||||||
If the class to be loaded has been configured with a cache, then lock
given id in that cache and then perform the load.
| |||||||||||
Based on configured options, will either return a pre-existing proxy,
generate a new proxy, or perform an actual load.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.hibernate.event.def.AbstractLockUpgradeEventListener
| |||||||||||
From class
org.hibernate.event.def.AbstractReassociateEventListener
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
org.hibernate.event.LoadEventListener
|
Handle the given load event.
event | The load event to be handled. |
---|
HibernateException |
---|
Coordinates the efforts to load a given entity. First, an attempt is made to load the entity from the session-level cache. If not found there, an attempt is made to locate it in second-level cache. Lastly, an attempt is made to load it directly from the datasource.
event | The load event |
---|---|
persister | The persister for the entity being requested for load |
keyToLoad | The EntityKey representing the entity to be loaded. |
options | The load options. |
Perfoms the load of an entity.
event | The initiating load request event |
---|---|
persister | The persister corresponding to the entity to be loaded |
keyToLoad | The key of the entity to be loaded |
options | The defined load options |
HibernateException |
---|
Performs the process of loading an entity from the configured underlying datasource.
event | The load event |
---|---|
persister | The persister for the entity being requested for load |
keyToLoad | The EntityKey representing the entity to be loaded. |
options | The load options. |
Attempts to load the entity from the second-level cache.
event | The load event |
---|---|
persister | The persister for the entity being requested for load |
options | The load options. |
Attempts to locate the entity in the session-level cache.
If allowed to return nulls, then if the entity happens to be found in the session cache, we check the entity type for proper handling of entity hierarchies. If checkDeleted was set to true, then if the entity is found in the session-level cache, it's current status within the session cache is checked to see if it has previously been scheduled for deletion.event | The load event |
---|---|
keyToLoad | The EntityKey representing the entity to be loaded. |
options | The load options. |
HibernateException | Generally indicates problems applying a lock-mode. |
---|
If the class to be loaded has been configured with a cache, then lock given id in that cache and then perform the load.
event | The initiating load request event |
---|---|
persister | The persister corresponding to the entity to be loaded |
keyToLoad | The key of the entity to be loaded |
options | The defined load options |
source | The originating session |
HibernateException |
---|
Based on configured options, will either return a pre-existing proxy, generate a new proxy, or perform an actual load.
event | The initiating load request event |
---|---|
persister | The persister corresponding to the entity to be loaded |
keyToLoad | The key of the entity to be loaded |
options | The defined load options |