类 StandardCacheEntryImpl
- java.lang.Object
-
- org.hibernate.cache.spi.entry.StandardCacheEntryImpl
-
- 所有已实现的接口:
Serializable,CacheEntry
public class StandardCacheEntryImpl extends Object implements CacheEntry
Standard representation of entity cached data using the "disassembled state".- 作者:
- Steve Ebersole
- 另请参阅:
- 序列化表格
-
-
构造器概要
构造器 构造器 说明 StandardCacheEntryImpl(Object[] state, EntityPersister persister, Object version, SharedSessionContractImplementor session, Object owner)Constructs a StandardCacheEntryImpl
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 Object[]assemble(Object instance, Serializable id, EntityPersister persister, Interceptor interceptor, EventSource session)Assemble the previously disassembled state represented by this entry into the given entity instance.Serializable[]getDisassembledState()Get the underlying disassembled state todo : this was added to support initializing an entity's EntityEntry snapshot during reattach; this should be refactored to instead expose a method to assemble an EntityEntry based on this state for return.StringgetSubclass()Hibernate stores all entries pertaining to a given entity hierarchy in a single region.ObjectgetVersion()Retrieves the version (optimistic locking) associated with this cache entry.booleanisDeepCopyNeeded()After assembly, is a copy of the array needed?booleanisReferenceEntry()Does this entry represent a direct entity reference (rather than disassembled state)?StringtoString()
-
-
-
构造器详细资料
-
StandardCacheEntryImpl
public StandardCacheEntryImpl(Object[] state, EntityPersister persister, Object version, SharedSessionContractImplementor session, Object owner) throws HibernateException
Constructs a StandardCacheEntryImpl- 参数:
state- The extracted statepersister- The entity persisterversion- The current version (if versioned)session- The originating sessionowner- The owner- 抛出:
HibernateException- Generally indicates a problem performing the dis-assembly.
-
-
方法详细资料
-
isReferenceEntry
public boolean isReferenceEntry()
从接口复制的说明:CacheEntryDoes this entry represent a direct entity reference (rather than disassembled state)?- 指定者:
isReferenceEntry在接口中CacheEntry- 返回:
- true/false
-
getDisassembledState
public Serializable[] getDisassembledState()
从接口复制的说明:CacheEntryGet the underlying disassembled state todo : this was added to support initializing an entity's EntityEntry snapshot during reattach; this should be refactored to instead expose a method to assemble an EntityEntry based on this state for return.- 指定者:
getDisassembledState在接口中CacheEntry- 返回:
- The disassembled state
-
getSubclass
public String getSubclass()
从接口复制的说明:CacheEntryHibernate stores all entries pertaining to a given entity hierarchy in a single region. This attribute tells us the specific entity type represented by the cached data.- 指定者:
getSubclass在接口中CacheEntry- 返回:
- The entry's exact entity type.
-
getVersion
public Object getVersion()
从接口复制的说明:CacheEntryRetrieves the version (optimistic locking) associated with this cache entry.- 指定者:
getVersion在接口中CacheEntry- 返回:
- The version of the entity represented by this entry
-
isDeepCopyNeeded
public boolean isDeepCopyNeeded()
After assembly, is a copy of the array needed?- 返回:
- true/false
-
assemble
public Object[] assemble(Object instance, Serializable id, EntityPersister persister, Interceptor interceptor, EventSource session) throws HibernateException
Assemble the previously disassembled state represented by this entry into the given entity instance. Additionally manages the PreLoadEvent callbacks.- 参数:
instance- The entity instanceid- The entity identifierpersister- The entity persisterinterceptor- (currently unused)session- The session- 返回:
- The assembled state
- 抛出:
HibernateException- Indicates a problem performing assembly or calling the PreLoadEventListeners.- 另请参阅:
Type.assemble(java.io.Serializable, org.hibernate.engine.spi.SharedSessionContractImplementor, java.lang.Object),Type.disassemble(java.lang.Object, org.hibernate.engine.spi.SharedSessionContractImplementor, java.lang.Object)
-
-