Package org.apache.ofbiz.entity.cache
Class AbstractEntityConditionCache<K,V>
- java.lang.Object
-
- org.apache.ofbiz.entity.cache.AbstractCache<EntityCondition,java.util.concurrent.ConcurrentMap<K,V>>
-
- org.apache.ofbiz.entity.cache.AbstractEntityConditionCache<K,V>
-
- Direct Known Subclasses:
EntityListCache
,EntityObjectCache
public abstract class AbstractEntityConditionCache<K,V> extends AbstractCache<EntityCondition,java.util.concurrent.ConcurrentMap<K,V>>
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
module
-
Fields inherited from class org.apache.ofbiz.entity.cache.AbstractCache
cacheNamePrefix, delegatorName, id
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractEntityConditionCache(java.lang.String delegatorName, java.lang.String id)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.List<? extends java.util.Map<java.lang.String,java.lang.Object>>
convert(java.lang.String targetEntityName, GenericEntity entity)
protected V
get(java.lang.String entityName, EntityCondition condition, K key)
protected java.util.concurrent.ConcurrentMap<K,V>
getConditionCache(java.lang.String entityName, EntityCondition condition)
static EntityCondition
getConditionKey(EntityCondition condition)
static EntityCondition
getFrozenConditionKey(EntityCondition condition)
protected ModelEntity
getModelCheckValid(GenericEntity oldEntity, GenericEntity newEntity)
protected java.util.Map<K,V>
getOrCreateConditionCache(java.lang.String entityName, EntityCondition condition)
protected static <K,V>
booleanisNull(java.util.Map<K,V> value)
protected V
put(java.lang.String entityName, EntityCondition condition, K key, V value)
void
remove(java.lang.String entityName, EntityCondition condition)
protected V
remove(java.lang.String entityName, EntityCondition condition, K key)
void
remove(GenericEntity entity)
Removes all condition caches that include the specified entity.void
storeHook(boolean isPK, GenericEntity oldEntity, GenericEntity newEntity)
protected <T1 extends java.util.Map<java.lang.String,java.lang.Object>,T2 extends java.util.Map<java.lang.String,java.lang.Object>>
voidstoreHook(java.lang.String entityName, boolean isPK, java.util.List<T1> oldValues, java.util.List<T2> newValues)
void
storeHook(GenericEntity newEntity)
void
storeHook(GenericEntity oldEntity, GenericEntity newEntity)
void
storeHook(GenericPK oldPK, GenericEntity newEntity)
-
Methods inherited from class org.apache.ofbiz.entity.cache.AbstractCache
clear, getCache, getCacheName, getCacheNamePrefix, getCacheNamePrefixes, getCacheNames, getDelegator, getOrCreateCache, remove
-
-
-
-
Method Detail
-
get
protected V get(java.lang.String entityName, EntityCondition condition, K key)
-
put
protected V put(java.lang.String entityName, EntityCondition condition, K key, V value)
-
remove
public void remove(GenericEntity entity)
Removes all condition caches that include the specified entity.
-
remove
public void remove(java.lang.String entityName, EntityCondition condition)
-
remove
protected V remove(java.lang.String entityName, EntityCondition condition, K key)
-
getConditionKey
public static final EntityCondition getConditionKey(EntityCondition condition)
-
getFrozenConditionKey
public static final EntityCondition getFrozenConditionKey(EntityCondition condition)
-
getConditionCache
protected java.util.concurrent.ConcurrentMap<K,V> getConditionCache(java.lang.String entityName, EntityCondition condition)
-
getOrCreateConditionCache
protected java.util.Map<K,V> getOrCreateConditionCache(java.lang.String entityName, EntityCondition condition)
-
isNull
protected static final <K,V> boolean isNull(java.util.Map<K,V> value)
-
getModelCheckValid
protected ModelEntity getModelCheckValid(GenericEntity oldEntity, GenericEntity newEntity)
-
storeHook
public void storeHook(GenericEntity newEntity)
-
storeHook
public void storeHook(GenericEntity oldEntity, GenericEntity newEntity)
-
storeHook
public void storeHook(GenericPK oldPK, GenericEntity newEntity)
-
convert
protected java.util.List<? extends java.util.Map<java.lang.String,java.lang.Object>> convert(java.lang.String targetEntityName, GenericEntity entity)
-
storeHook
public void storeHook(boolean isPK, GenericEntity oldEntity, GenericEntity newEntity)
-
storeHook
protected <T1 extends java.util.Map<java.lang.String,java.lang.Object>,T2 extends java.util.Map<java.lang.String,java.lang.Object>> void storeHook(java.lang.String entityName, boolean isPK, java.util.List<T1> oldValues, java.util.List<T2> newValues)
-
-