public class ReferenceCacheEntryImpl extends Object implements CacheEntry
Specialized CacheEntry for storing direct references to entity instances.
| Constructor and Description |
|---|
ReferenceCacheEntryImpl(Object reference,
EntityPersister subclassPersister)
Constructs a ReferenceCacheEntryImpl
|
| Modifier and Type | Method and Description |
|---|---|
Serializable[] |
getDisassembledState()
Get the underlying disassembled state
|
Object |
getReference()
Provides access to the stored reference.
|
String |
getSubclass()
Hibernate stores all entries pertaining to a given entity hierarchy in a single region.
|
EntityPersister |
getSubclassPersister() |
Object |
getVersion()
Retrieves the version (optimistic locking) associated with this cache entry.
|
boolean |
isReferenceEntry()
Does this entry represent a direct entity reference (rather than disassembled state)?
|
public ReferenceCacheEntryImpl(Object reference, EntityPersister subclassPersister)
Constructs a ReferenceCacheEntryImpl
reference - The reference entity instancesubclassPersister - The specific subclass persisterpublic Object getReference()
Provides access to the stored reference.
public boolean isReferenceEntry()
CacheEntryDoes this entry represent a direct entity reference (rather than disassembled state)?
isReferenceEntry in interface CacheEntrypublic 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 in interface CacheEntrypublic EntityPersister getSubclassPersister()
public Object getVersion()
CacheEntryRetrieves the version (optimistic locking) associated with this cache entry.
getVersion in interface CacheEntrypublic 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 a EntityEntry based on this state for return.
getDisassembledState in interface CacheEntryCopyright © 2001-2018 Red Hat, Inc. All Rights Reserved.