|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.epm.util.EPMCache.IterationCache
An Iteration Cache holds Iterated objects and indexes them by the object identifier of their master. Given an object identifier of a master, it returns the iteration for that master selected by the config spec. If an iteration is not in the cache, the Iteration Cache will use its config spec to query it from the database and add it to its cache.
Field Summary | |
private ConfigSpec |
configSpec
|
private HashMap |
masterToIteration
|
private EPMCache.ObjectCache |
objectCache
|
Constructor Summary | |
EPMCache.IterationCache(ConfigSpec configSpec)
Using the given config spec, constructs an Iteration Cache. |
|
EPMCache.IterationCache(ConfigSpec configSpec,
Collection objects)
Using the given config spec, constructs an Iteration Cache and adds the collection of Iterated objects to its cache. |
Method Summary | |
void |
add(Collection iterations)
Adds a collection of Iterated objects to the Iteration Cache. |
void |
add(Iterated iteration)
Adds an Iterated object to the Iteration Cache. |
protected void |
add(Mastered master)
|
List |
find(Collection masterIds,
boolean returnMasters)
Given the object identifiers for a set of masters, returns the iterations of those masters selected by the config spec. |
Persistable |
getIteration(ObjectIdentifier masterId)
Given the object identifier for a master, return the iteration selected by the config spec for this master provided it is in the cache. |
ObjectIdentifier |
getIterationId(ObjectIdentifier masterId)
Given the object identifier for a master, return the object identifier for iteration selected by the config spec for this master provided it is in the cache. |
Persistable |
getObject(ObjectIdentifier objectId)
Given the object identifier for an iteration or a master, return the object provided it is in the cache. |
boolean |
isEmpty()
Returns true if this cache contains no objects. |
Collection |
objects()
Returns an unmodifiable collection view of the iterations and masters in this cache. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private EPMCache.ObjectCache objectCache
private HashMap masterToIteration
private ConfigSpec configSpec
Constructor Detail |
public EPMCache.IterationCache(ConfigSpec configSpec)
public EPMCache.IterationCache(ConfigSpec configSpec, Collection objects)
Method Detail |
public Persistable getIteration(ObjectIdentifier masterId)
public Persistable getObject(ObjectIdentifier objectId)
public ObjectIdentifier getIterationId(ObjectIdentifier masterId)
public void add(Iterated iteration)
public void add(Collection iterations)
public List find(Collection masterIds, boolean returnMasters) throws WTException
WTException
public Collection objects()
public boolean isEmpty()
protected void add(Mastered master)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |