|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.epm.util.EPMCache.ObjectCache
An Object Cache holds Persistable objects and indexes them by their object identifiers. Given an object identifier, it returns the object with that identifier. If an object is not in its cache, the Object Cache will query it from the database and add it to its cache.
Field Summary | |
private HashMap |
cache
|
Constructor Summary | |
EPMCache.ObjectCache()
Constructs an ObjectCache. |
|
EPMCache.ObjectCache(Collection objects)
Constructs an ObjectCache adding the collection of Persistable objects to its cache. |
Method Summary | |
void |
add(Collection objects)
Adds a collection of Persistable objects to the Object Cache. |
void |
add(Persistable object)
Adds a Persistable object to the Object Cache. |
boolean |
contains(ObjectIdentifier objectId)
Returns true if the cache contains the Persistable object with the given object identifier. |
boolean |
contains(Persistable object)
Returns true if the cache contains the given Persistable object. |
List |
find(Collection objectIds)
Given a collection of object identifiers, returns the Persistable objects with these identifiers. |
Persistable |
get(ObjectIdentifier objectId)
Given an object identifier, returns the object with that identifier provided it is in the cache. |
boolean |
isEmpty()
Returns true if the cache contains no objects. |
Collection |
objects()
Returns an unmodifiable collection view of the objects in this cache. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private HashMap cache
Constructor Detail |
public EPMCache.ObjectCache()
public EPMCache.ObjectCache(Collection objects)
Method Detail |
public Persistable get(ObjectIdentifier objectId)
public void add(Persistable object)
public void add(Collection objects)
public List find(Collection objectIds) throws WTException
WTException
public Collection objects()
public boolean isEmpty()
public boolean contains(Persistable object)
public boolean contains(ObjectIdentifier objectId)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |