public class StandardCacheEntryImpl extends Object implements CacheEntry
Constructor and Description |
---|
StandardCacheEntryImpl(Object[] state,
EntityPersister persister,
Object version,
SharedSessionContractImplementor session,
Object owner)
Constructs a StandardCacheEntryImpl
|
Modifier and Type | Method and Description |
---|---|
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 a EntityEntry based on this
state for return.
|
String |
getSubclass()
Hibernate stores all entries pertaining to a given entity hierarchy in a single region.
|
Object |
getVersion()
Retrieves the version (optimistic locking) associated with this cache entry.
|
boolean |
isDeepCopyNeeded()
After assembly, is a copy of the array needed?
|
boolean |
isReferenceEntry()
Does this entry represent a direct entity reference (rather than disassembled state)?
|
String |
toString() |
public StandardCacheEntryImpl(Object[] state, EntityPersister persister, Object version, SharedSessionContractImplementor session, Object owner) throws HibernateException
state
- The extracted statepersister
- The entity persisterversion
- The current version (if versioned)session
- The originating sessionowner
- The ownerHibernateException
- Generally indicates a problem performing the dis-assembly.public boolean isReferenceEntry()
CacheEntry
isReferenceEntry
in interface CacheEntry
public Serializable[] getDisassembledState()
CacheEntry
getDisassembledState
in interface CacheEntry
public String getSubclass()
CacheEntry
getSubclass
in interface CacheEntry
public Object getVersion()
CacheEntry
getVersion
in interface CacheEntry
public boolean isDeepCopyNeeded()
public Object[] assemble(Object instance, Serializable id, EntityPersister persister, Interceptor interceptor, EventSource session) throws HibernateException
instance
- The entity instanceid
- The entity identifierpersister
- The entity persisterinterceptor
- (currently unused)session
- The sessionHibernateException
- 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)
Copyright © 2019 JBoss by Red Hat. All rights reserved.