Package de.hybris.platform.persistence
Class ItemCacheKey
java.lang.Object
de.hybris.platform.persistence.ItemCacheKey
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
ItemACLCacheKey,ItemPropertyCacheKey
using this key object, transient caches can be stored for an Item using its methods
ItemEJB.getCachedValueForModification(de.hybris.platform.persistence.ItemCacheKey) and ItemEJB.getCachedValueForReading(de.hybris.platform.persistence.ItemCacheKey)-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract ObjectcloneValue(Object value) this method should clone a cached value object.protected abstract ObjectcomputeValue(ItemEJB item) initially creates the cached data object for a specified item.protected abstract Objectit's ok to return the result ofgetValuein this method; otherwise, the returned object has to reflect subsequent changes of the object returned by getValueprotected voiddispose(boolean inRemove) called when this cache key object is remove from cache.final ItemCacheKeygetCopy()create a copy of this ItemCacheKey; must be public for hjmpprotected abstract Objectprotected final Objectprotected final ObjectgetValueForReading(ItemEJB item) protected final Objectprotected final Objectprotected abstract boolean
-
Constructor Details
-
ItemCacheKey
public ItemCacheKey() -
ItemCacheKey
-
-
Method Details
-
getCopy
create a copy of this ItemCacheKey; must be public for hjmp -
getValueInternal
-
getQualifier
- Returns:
- an key for the CachedValue that is unique within the Item instance
-
isValid
- Returns:
- true if the cache key object is still valid for the given item. this is called each time when the cache key is retrieved.
-
dispose
protected void dispose(boolean inRemove) called when this cache key object is remove from cache. -
computeValue
initially creates the cached data object for a specified item. this method is only called once for one ItemCacheKey instance. -
getValueForReading
-
getValueForReadingIfAvailable
-
getValueForModification
-
cloneValue
this method should clone a cached value object. it will be called duringgetCopy()only if this ItemCacheKey object already holds a cached value object. -
createUnmodifiableViewOfValue
it's ok to return the result ofgetValuein this method; otherwise, the returned object has to reflect subsequent changes of the object returned by getValue
-