public interface EntityCache extends Session
| Modifier and Type | Method and Description |
|---|---|
void |
cacheRemove(Class<?> entityClass,
String entityId)
Removes the
Entity of the given type with the given id from the cache. |
<T> List<T> |
findInCache(Class<T> entityClass)
Returns all cached
Entity instances of a given type. |
<T> T |
findInCache(Class<T> entityClass,
String id)
Returns the cached
Entity instance of the given class with the provided id. |
<T> Collection<CachedEntity> |
findInCacheAsCachedObjects(Class<T> entityClass)
Returns all
CachedEntity instances for the given type. |
Map<Class<?>,Map<String,CachedEntity>> |
getAllCachedEntities()
Returns all cached
Entity instances as a map with following structure: { entityClassName, {entityId, entity} } |
CachedEntity |
put(Entity entity,
boolean storeState)
Adds the gives
Entity to the cache. |
Map<Class<?>,Map<String,CachedEntity>> getAllCachedEntities()
Entity instances as a map with following structure: { entityClassName, {entityId, entity} }CachedEntity put(Entity entity, boolean storeState)
Entity to the cache.entity - The Entity instancestoreState - If true, the current state Entity.getPersistentState() will be stored for future diffing. Note that, if false, the Entity will always be seen as changed.CachedEntity instance, which can be enriched later on.<T> List<T> findInCache(Class<T> entityClass)
Entity instances of a given type. Returns an empty list if no instances of the given type exist.<T> Collection<CachedEntity> findInCacheAsCachedObjects(Class<T> entityClass)
CachedEntity instances for the given type. The difference with findInCache(Class) is that here the whole CachedEntity is returned, which gives access to the
persistent state at the moment of putting it in the cache.Copyright © 2021 Flowable. All rights reserved.