Package org.apache.ofbiz.entity.cache
Class AbstractEntityConditionCache<K,V>
java.lang.Object
org.apache.ofbiz.entity.cache.AbstractCache<EntityCondition,ConcurrentMap<K,V>>
org.apache.ofbiz.entity.cache.AbstractEntityConditionCache<K,V>
- Type Parameters:
K
- the type parameterV
- the type parameter
- Direct Known Subclasses:
EntityListCache
,EntityObjectCache
public abstract class AbstractEntityConditionCache<K,V>
extends AbstractCache<EntityCondition,ConcurrentMap<K,V>>
The type AbstractEntityConditionCache.
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractEntityConditionCache
(String delegatorName, String id) -
Method Summary
Modifier and TypeMethodDescriptionconvert
(String targetEntityName, GenericEntity entity) Convert list.protected V
get
(String entityName, EntityCondition condition, K key) Get v.protected ConcurrentMap<K,
V> getConditionCache
(String entityName, EntityCondition condition) Gets condition cache.static final EntityCondition
getConditionKey
(EntityCondition condition) static final EntityCondition
getFrozenConditionKey
(EntityCondition condition) protected ModelEntity
getModelCheckValid
(GenericEntity oldEntity, GenericEntity newEntity) Gets model check valid.getOrCreateConditionCache
(String entityName, EntityCondition condition) Gets or create condition cache.protected static final <K,
V> boolean protected V
put
(String entityName, EntityCondition condition, K key, V value) Put v.void
remove
(String entityName, EntityCondition condition) Remove.protected V
remove
(String entityName, EntityCondition condition, K key) Remove v.void
remove
(GenericEntity entity) Removes all condition caches that include the specified entity.void
storeHook
(boolean isPK, GenericEntity oldEntity, GenericEntity newEntity) Store hook.Store hook.void
storeHook
(GenericEntity newEntity) Store hook.void
storeHook
(GenericEntity oldEntity, GenericEntity newEntity) Store hook.void
storeHook
(GenericPK oldPK, GenericEntity newEntity) Store hook.Methods inherited from class org.apache.ofbiz.entity.cache.AbstractCache
clear, getCache, getCacheName, getCacheNamePrefix, getCacheNamePrefixes, getCacheNames, getDelegator, getOrCreateCache, remove
-
Constructor Details
-
AbstractEntityConditionCache
-
-
Method Details
-
get
Get v.- Parameters:
entityName
- the entity namecondition
- the conditionkey
- the key- Returns:
- the v
-
put
Put v.- Parameters:
entityName
- the entity namecondition
- the conditionkey
- the keyvalue
- the value- Returns:
- the v
-
remove
Removes all condition caches that include the specified entity. -
remove
Remove.- Parameters:
entityName
- the entity namecondition
- the condition
-
remove
Remove v.- Parameters:
entityName
- the entity namecondition
- the conditionkey
- the key- Returns:
- the v
-
getConditionKey
-
getFrozenConditionKey
-
getConditionCache
Gets condition cache.- Parameters:
entityName
- the entity namecondition
- the condition- Returns:
- the condition cache
-
getOrCreateConditionCache
Gets or create condition cache.- Parameters:
entityName
- the entity namecondition
- the condition- Returns:
- the or create condition cache
-
isNull
-
getModelCheckValid
Gets model check valid.- Parameters:
oldEntity
- the old entitynewEntity
- the new entity- Returns:
- the model check valid
-
storeHook
Store hook.- Parameters:
newEntity
- the new entity
-
storeHook
Store hook.- Parameters:
oldEntity
- the old entitynewEntity
- the new entity if oldValue == null, then this is a new entity if newValue == null, then
-
storeHook
Store hook.- Parameters:
oldPK
- the old pknewEntity
- the new entity if oldValue == null, then this is a new entity if newValue == null, then
-
convert
Convert list.- Parameters:
targetEntityName
- the target entity nameentity
- the entity- Returns:
- the list
-
storeHook
Store hook.- Parameters:
isPK
- the is pkoldEntity
- the old entitynewEntity
- the new entity
-
storeHook
protected <T1 extends Map<String,Object>, void storeHookT2 extends Map<String, Object>> (String entityName, boolean isPK, List<T1> oldValues, List<T2> newValues) Store hook.- Type Parameters:
T1
- the type parameterT2
- the type parameter- Parameters:
entityName
- the entity nameisPK
- the is pkoldValues
- the old valuesnewValues
- the new values
-