Top Description Fields Constructors Methods
org.hibernate.cache.spi.entry

public Class ReferenceCacheEntryImpl

extends Object
implements CacheEntry
Class Inheritance
All Implemented Interfaces
org.hibernate.cache.spi.entry.CacheEntry, java.io.Serializable
Imports
java.io.Serializable, org.hibernate.persister.entity.EntityPersister

Specialized CacheEntry for storing direct references to entity instances.
Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private final Object
private final EntityPersister

Constructor Summary

AccessConstructor and Description
public
ReferenceCacheEntryImpl(Object
The reference entity instance
reference
,
EntityPersister
The specific subclass persister
subclassPersister
)

Constructs a ReferenceCacheEntryImpl

Method Summary

Modifier and TypeMethod and Description
public Serializable[]
getDisassembledState()

Implements org.hibernate.cache.spi.entry.CacheEntry.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.
public Object

Returns:

The stored reference
getReference
()

Provides access to the stored reference.

public String
getSubclass()

Implements org.hibernate.cache.spi.entry.CacheEntry.getSubclass.

Hibernate stores all entries pertaining to a given entity hierarchy in a single region.
public EntityPersister
public Object
getVersion()

Implements org.hibernate.cache.spi.entry.CacheEntry.getVersion.

Retrieves the version (optimistic locking) associated with this cache entry.
public boolean
isReferenceEntry()

Implements org.hibernate.cache.spi.entry.CacheEntry.isReferenceEntry.

Does this entry represent a direct entity reference (rather than disassembled state)?
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

referenceback to summary
private final Object reference
subclassPersisterback to summary
private final EntityPersister subclassPersister

Constructor Detail

ReferenceCacheEntryImplback to summary
public ReferenceCacheEntryImpl(Object reference, EntityPersister subclassPersister)

Constructs a ReferenceCacheEntryImpl

Parameters
reference:Object

The reference entity instance

subclassPersister:EntityPersister

The specific subclass persister

Method Detail

getDisassembledStateback to summary
public Serializable[] getDisassembledState()

Implements org.hibernate.cache.spi.entry.CacheEntry.getDisassembledState.

Doc from org.hibernate.cache.spi.entry.CacheEntry.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.

Returns:Serializable[]

The disassembled state

Annotations
@Override
getReferenceback to summary
public Object getReference()

Provides access to the stored reference.

Returns:Object

The stored reference

getSubclassback to summary
public String getSubclass()

Implements org.hibernate.cache.spi.entry.CacheEntry.getSubclass.

Doc from org.hibernate.cache.spi.entry.CacheEntry.getSubclass.

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.

Returns:String

The entry's exact entity type.

Annotations
@Override
getSubclassPersisterback to summary
public EntityPersister getSubclassPersister()
getVersionback to summary
public Object getVersion()

Implements org.hibernate.cache.spi.entry.CacheEntry.getVersion.

Doc from org.hibernate.cache.spi.entry.CacheEntry.getVersion.

Retrieves the version (optimistic locking) associated with this cache entry.

Returns:Object

The version of the entity represented by this entry

Annotations
@Override
isReferenceEntryback to summary
public boolean isReferenceEntry()

Implements org.hibernate.cache.spi.entry.CacheEntry.isReferenceEntry.

Doc from org.hibernate.cache.spi.entry.CacheEntry.isReferenceEntry.

Does this entry represent a direct entity reference (rather than disassembled state)?

Returns:boolean

true/false

Annotations
@Override