wt.occurrence
Class OccurrenceCountCache
java.lang.Object
wt.occurrence.OccurrenceCountCache
- public class OccurrenceCountCache
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
contexts
private HashSet contexts
counts
private HashMap counts
occurrenceClass
private Class occurrenceClass
OccurrenceCountCache
public OccurrenceCountCache(Class occurrenceClass)
getCountCache
public static OccurrenceCountCache getCountCache(String cacheName,
Class _class)
- Given the name of an occurrence cache, retrieves it from the method context.
If a cache by that name does not exist, this method will create it and add it
to the method context.
getCount
public int getCount(OccurrenceableLink link)
throws WTException
- Throws:
WTException
incrementCount
public void incrementCount(OccurrenceableLink link,
int increment)
throws WTException
- Throws:
WTException
decrementCount
public void decrementCount(OccurrenceableLink link,
int decrement)
throws WTException
- Throws:
WTException
decrementCount
public void decrementCount(ObjectIdentifier contextID,
ObjectIdentifier linkID,
int decrement)
throws WTException
- Throws:
WTException
updateCounts
protected void updateCounts(ObjectIdentifier contextID)
throws WTException
- Throws:
WTException
getUsesOccurrences
protected QueryResult getUsesOccurrences(ObjectIdentifier contextID)
throws WTException
- Throws:
WTException
getContextID
protected ObjectIdentifier getContextID(OccurrenceableLink link)
getLinkID
protected ObjectIdentifier getLinkID(UsesOccurrence occurrence)