public interface Cache
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(Class<?> cls,
Object primaryKey)
Whether the cache contains data for the given entity.
|
void |
evict(Class<?> cls)
Remove the data for entities of the specified class (and its subclasses) from the cache.
|
void |
evict(Class<?> cls,
Object primaryKey)
Remove the data for the given entity from the cache.
|
void |
evictAll()
Clear the cache.
|
<T> T |
unwrap(Class<T> cls)
Return an object of the specified type to allow access to the provider-specific API.
|
boolean contains(Class<?> cls, Object primaryKey)
cls - entity classprimaryKey - primary keyvoid evict(Class<?> cls)
cls - entity classvoid evict(Class<?> cls, Object primaryKey)
cls - entity classprimaryKey - primary keyvoid evictAll()
<T> T unwrap(Class<T> cls)
T - type of the classcls - the class of the object to be returned. This is normally either the underlying Cache implementation class or an interface
that it implements.PersistenceException - if the provider does not support the callCopyright © 2012 Batoo Software & Consultancy. All Rights Reserved.