类 CacheEntityLoaderHelper
- java.lang.Object
-
- org.hibernate.event.internal.AbstractReassociateEventListener
-
- org.hibernate.event.internal.AbstractLockUpgradeEventListener
-
- org.hibernate.loader.entity.CacheEntityLoaderHelper
-
- 所有已实现的接口:
Serializable
public class CacheEntityLoaderHelper extends AbstractLockUpgradeEventListener
- 作者:
- Vlad Mihalcea
- 另请参阅:
- 序列化表格
-
-
嵌套类概要
嵌套类 修饰符和类型 类 说明 static classCacheEntityLoaderHelper.EntityStatusstatic classCacheEntityLoaderHelper.PersistenceContextEntry
-
字段概要
字段 修饰符和类型 字段 说明 static CacheEntityLoaderHelperINSTANCE
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 ObjectloadFromSecondLevelCache(LoadEvent event, EntityPersister persister, EntityKey entityKey)Attempts to load the entity from the second-level cache.CacheEntityLoaderHelper.PersistenceContextEntryloadFromSessionCache(LoadEvent event, EntityKey keyToLoad, LoadEventListener.LoadType options)Attempts to locate the entity in the session-level cache.-
从类继承的方法 org.hibernate.event.internal.AbstractLockUpgradeEventListener
upgradeLock
-
从类继承的方法 org.hibernate.event.internal.AbstractReassociateEventListener
reassociate
-
-
-
-
字段详细资料
-
INSTANCE
public static final CacheEntityLoaderHelper INSTANCE
-
-
方法详细资料
-
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, it's current status within the session cache is checked to see if it has previously been scheduled for deletion.- 参数:
event- The load eventkeyToLoad- The EntityKey representing the entity to be loaded.options- The load options.- 返回:
- The entity from the session-level cache, or null.
- 抛出:
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.- 参数:
event- The load eventpersister- The persister for the entity being requested for load- 返回:
- The entity from the second-level cache, or null.
-
-