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()
CacheEntry
Does this entry represent a direct entity reference (rather than disassembled state)?
isReferenceEntry
in interface CacheEntry
public String getSubclass()
CacheEntry
Hibernate 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 CacheEntry
public EntityPersister getSubclassPersister()
public Object getVersion()
CacheEntry
Retrieves the version (optimistic locking) associated with this cache entry.
getVersion
in interface CacheEntry
public Serializable[] getDisassembledState()
CacheEntry
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.
getDisassembledState
in interface CacheEntry
Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.