public class DefaultLoadEventListener extends AbstractLockUpgradeEventListener implements LoadEventListener
LoadEventListener.LoadType
Modifier and Type | Field and Description |
---|---|
static LockMode |
DEFAULT_LOCK_MODE |
static Object |
INCONSISTENT_RTN_CLASS_MARKER |
static Object |
REMOVED_ENTITY_MARKER |
GET, IMMEDIATE_LOAD, INTERNAL_LOAD_EAGER, INTERNAL_LOAD_LAZY, INTERNAL_LOAD_NULLABLE, LOAD, RELOAD
Constructor and Description |
---|
DefaultLoadEventListener() |
Modifier and Type | Method and Description |
---|---|
protected Object |
loadFromSessionCache(LoadEvent event,
EntityKey keyToLoad,
LoadEventListener.LoadType options)
Attempts to locate the entity in the session-level cache.
|
void |
onLoad(LoadEvent event,
LoadEventListener.LoadType loadType)
Handle the given load event.
|
upgradeLock
reassociate
public static final Object REMOVED_ENTITY_MARKER
public static final Object INCONSISTENT_RTN_CLASS_MARKER
public static final LockMode DEFAULT_LOCK_MODE
public void onLoad(LoadEvent event, LoadEventListener.LoadType loadType) throws HibernateException
onLoad
in interface LoadEventListener
event
- The load event to be handled.HibernateException
protected Object loadFromSessionCache(LoadEvent event, EntityKey keyToLoad, LoadEventListener.LoadType options) throws HibernateException
event
- The load eventkeyToLoad
- The EntityKey representing the entity to be loaded.options
- The load options.HibernateException
- Generally indicates problems applying a lock-mode.Copyright © 2001-2017 Red Hat, Inc. All Rights Reserved.