1 package eu
.etaxonomy
.cdm
.model
;
5 import eu
.etaxonomy
.cdm
.model
.common
.CdmBase
;
10 * Cache class for CDM Entities based on Ehcache.
11 * The class manages a singleton {@link net.sf.ehcache.CacheManager} having a
12 * {@link net.sf.ehcache.Cache} initialised with a default configuration.
16 public interface ICdmCacher
<T
extends CdmBase
> {
19 * Load a CDM Entity object with given UUID.
20 * This method checks the (default) cache for the entity,
21 * else retrieves the entity from the service layer.
23 * NOTE : Currently this method can only be used for CDM Term
24 * (DefinedTermBase) entities.
26 * @param uuid of CDM Entity to return
29 public T
load(UUID uuid
);
32 * Get a CDM Entity object with given UUID from the (default) cache.
37 public T
getFromCache(UUID uuid
);
40 * Check if a CDM Entity with given UUID exists in the cache.
42 * @param uuid of CDM Entity to check
43 * @return true if CDM Entity with given UUID exists in the cache, o/w false
45 public boolean exists(UUID uuid
);
48 * Check if a CDM Entity with given UUID exists in the cache
49 * and that it is not null.
51 * @param uuid of CDM Entity to check
52 * @return true if CDM Entity with given UUID exists in the cache and that it is not null, o/w false
54 public boolean existsAndIsNotNull(UUID uuid
);