Class ReferenceCacheEntryImpl

  • All Implemented Interfaces:
    java.io.Serializable, CacheEntry

    public class ReferenceCacheEntryImpl
    extends java.lang.Object
    implements CacheEntry
    Specialized CacheEntry for storing direct references to entity instances.
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.io.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.
      java.lang.Object getReference()
      Provides access to the stored reference.
      java.lang.String getSubclass()
      Hibernate stores all entries pertaining to a given entity hierarchy in a single region.
      EntityPersister getSubclassPersister()  
      java.lang.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)?
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ReferenceCacheEntryImpl

        public ReferenceCacheEntryImpl​(java.lang.Object reference,
                                       EntityPersister subclassPersister)
        Constructs a ReferenceCacheEntryImpl
        Parameters:
        reference - The reference entity instance
        subclassPersister - The specific subclass persister
    • Method Detail

      • getReference

        public java.lang.Object getReference()
        Provides access to the stored reference.
        Returns:
        The stored reference
      • isReferenceEntry

        public boolean isReferenceEntry()
        Description copied from interface: CacheEntry
        Does this entry represent a direct entity reference (rather than disassembled state)?
        Specified by:
        isReferenceEntry in interface CacheEntry
        Returns:
        true/false
      • getSubclass

        public java.lang.String getSubclass()
        Description copied from interface: 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.
        Specified by:
        getSubclass in interface CacheEntry
        Returns:
        The entry's exact entity type.
      • getVersion

        public java.lang.Object getVersion()
        Description copied from interface: CacheEntry
        Retrieves the version (optimistic locking) associated with this cache entry.
        Specified by:
        getVersion in interface CacheEntry
        Returns:
        The version of the entity represented by this entry
      • getDisassembledState

        public java.io.Serializable[] getDisassembledState()
        Description copied from interface: 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 an EntityEntry based on this state for return.
        Specified by:
        getDisassembledState in interface CacheEntry
        Returns:
        The disassembled state