Class CacheEntityLoaderHelper
java.lang.Object
org.hibernate.loader.ast.internal.CacheEntityLoaderHelper
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
static class
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionloadFromSecondLevelCache
(EventSource source, Object entity, LockMode lockMode, EntityPersister persister, EntityKey entityKey) Attempts to load the entity from the second-level cache.loadFromSecondLevelCache
(LoadEvent event, EntityPersister persister, EntityKey entityKey) Attempts to load the entity from the second-level cache.loadFromSessionCache
(EntityKey keyToLoad, LoadEventListener.LoadType options, LockOptions lockOptions, EventSource session) loadFromSessionCache
(LoadEvent event, EntityKey keyToLoad, LoadEventListener.LoadType options) Attempts to locate the entity in the session-level cache.loadFromSessionCacheStatic
(LoadEvent event, EntityKey keyToLoad, LoadEventListener.LoadType options) Attempts to locate the entity in the session-level cache.
-
Field Details
-
INSTANCE
-
-
Method Details
-
loadFromSessionCache
@Incubating public CacheEntityLoaderHelper.PersistenceContextEntry loadFromSessionCache(EntityKey keyToLoad, LoadEventListener.LoadType options, LockOptions lockOptions, EventSource session) -
loadFromSessionCacheStatic
public static CacheEntityLoaderHelper.PersistenceContextEntry loadFromSessionCacheStatic(LoadEvent event, EntityKey keyToLoad, LoadEventListener.LoadType 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, its current status within the session cache is checked to see if it has previously been scheduled for deletion.
- Parameters:
event
- The load eventkeyToLoad
- The EntityKey representing the entity to be loaded.options
- The load options.- Returns:
- The entity from the session-level cache, or null.
- Throws:
HibernateException
- Generally indicates problems applying a lock-mode.
-
loadFromSessionCache
public CacheEntityLoaderHelper.PersistenceContextEntry loadFromSessionCache(LoadEvent event, EntityKey keyToLoad, LoadEventListener.LoadType options) throws HibernateException 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, its current status within the session cache is checked to see if it has previously been scheduled for deletion.
- Parameters:
event
- The load eventkeyToLoad
- The EntityKey representing the entity to be loaded.options
- The load options.- Returns:
- The entity from the session-level cache, or null.
- Throws:
HibernateException
- Generally indicates problems applying a lock-mode.
-
loadFromSecondLevelCache
public Object loadFromSecondLevelCache(LoadEvent event, EntityPersister persister, EntityKey entityKey) Attempts to load the entity from the second-level cache.- Parameters:
event
- The load eventpersister
- The persister for the entity being requested for loadentityKey
- The entity key- Returns:
- The entity from the second-level cache, or null.
-
loadFromSecondLevelCache
public Object loadFromSecondLevelCache(EventSource source, Object entity, LockMode lockMode, EntityPersister persister, EntityKey entityKey) Attempts to load the entity from the second-level cache.- Parameters:
source
- The sourceentity
- The entitylockMode
- The lock modepersister
- The persister for the entity being requested for loadentityKey
- The entity key- Returns:
- The entity from the second-level cache, or null.
-