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 java.lang.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 java.lang.String
SUBCLASS_KEY
static java.lang.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 java.lang.Object
destructure(java.lang.Object structured, SessionFactoryImplementor factory)
Convert the previous structured form of the item back into its item form.java.lang.Object
structure(java.lang.Object item)
Convert the cache item into its "structured" form.
-
-
-
Field Detail
-
SUBCLASS_KEY
public static final java.lang.String SUBCLASS_KEY
- See Also:
- Constant Field Values
-
VERSION_KEY
public static final java.lang.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 java.lang.Object destructure(java.lang.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 java.lang.Object structure(java.lang.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.
-
-