Package org.hibernate.cache.spi.entry
Class StructuredCacheEntry
- java.lang.Object
-
- org.hibernate.cache.spi.entry.StructuredCacheEntry
-
- All Implemented Interfaces:
CacheEntryStructure
public class StructuredCacheEntry extends Object implements CacheEntryStructure
Structured CacheEntry format for entities. Used to store the entry into the second-level cache as a Map so that users can more easily see the cached state.
-
-
Field Summary
Fields Modifier and Type Field Description static String
SUBCLASS_KEY
static String
VERSION_KEY
-
Constructor Summary
Constructors Constructor Description StructuredCacheEntry(EntityPersister persister)
Constructs a StructuredCacheEntry strategy
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
destructure(Object structured, SessionFactoryImplementor factory)
Convert the previous structured form of the item back into its item form.Object
structure(Object item)
Convert the cache item into its "structured" form.
-
-
-
Field Detail
-
SUBCLASS_KEY
public static final String SUBCLASS_KEY
- See Also:
- Constant Field Values
-
VERSION_KEY
public static final String VERSION_KEY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
StructuredCacheEntry
public StructuredCacheEntry(EntityPersister persister)
Constructs a StructuredCacheEntry strategy- Parameters:
persister
- The persister whose data needs to be structured.
-
-
Method Detail
-
destructure
public Object destructure(Object structured, SessionFactoryImplementor factory)
Description copied from interface:CacheEntryStructure
Convert the previous structured form of the item back into its item form.- Specified by:
destructure
in interfaceCacheEntryStructure
- Parameters:
structured
- The structured form.factory
- The session factory.- Returns:
- The item
-
structure
public Object structure(Object item)
Description copied from interface:CacheEntryStructure
Convert the cache item into its "structured" form. Perfectly valid to return the item as-is.- Specified by:
structure
in interfaceCacheEntryStructure
- Parameters:
item
- The item to structure.- Returns:
- The structured form.
-
-