|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hydrateframework.ObjectIndex
org.hydrateframework.UniqueIndex
public class UniqueIndex
| Field Summary | |
|---|---|
protected static org.apache.commons.logging.Log |
m_log
|
| Fields inherited from class org.hydrateframework.ObjectIndex |
|---|
m_cls, m_ctx, m_keyCls |
| Constructor Summary | |
|---|---|
UniqueIndex(java.lang.Class cls)
Construct a unique index that will index objects of the given class using the primary key for that class as a key. |
|
UniqueIndex(java.lang.Class cls,
java.lang.Class keyCls)
|
|
| Method Summary | |
|---|---|
void |
addObject(java.lang.Object obj,
ObjectKey key)
Add an object to the index with the given key. |
void |
clear()
Clear the index. |
java.io.PrintStream |
dump(java.io.PrintStream out)
Output details of the index to a PrintStream. |
java.lang.Object |
findObject(ObjectKey key)
This abstract method should be implemented to find an object given a key. |
ObjectCollection |
findObjects(ObjectKey key)
This method should be implemented to find a collection of business objects given a key. |
java.util.Iterator |
keys()
Calls that use the iterator returned by this method must be synchronised on the index object if there is any chance that more than one thread may be accessing the index while the iterator is in use. |
java.lang.Object |
removeKey(ObjectKey key)
Remove the entire contents of a particular key in this index. |
void |
removeObject(java.lang.Object obj,
ObjectKey key)
Remove an object from the index using the given key. |
int |
size()
|
| Methods inherited from class org.hydrateframework.ObjectIndex |
|---|
addObject, equals, getClassToIndex, getKeyClass, keyFromObject, removeObject, setObjectContext |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final org.apache.commons.logging.Log m_log
| Constructor Detail |
|---|
public UniqueIndex(java.lang.Class cls)
cls - the class that is to be indexed.
public UniqueIndex(java.lang.Class cls,
java.lang.Class keyCls)
| Method Detail |
|---|
public void clear()
ObjectIndex
clear in class ObjectIndexpublic java.util.Iterator keys()
keys in class ObjectIndexpublic java.lang.Object findObject(ObjectKey key)
ObjectIndex
findObject in class ObjectIndexkey - the key to use on the index
public ObjectCollection findObjects(ObjectKey key)
ObjectIndex
findObjects in class ObjectIndexkey - the key to use on the index
public void addObject(java.lang.Object obj,
ObjectKey key)
ObjectIndex
addObject in class ObjectIndexobj - the object to add to the indexkey - the key to use in adding the object
public void removeObject(java.lang.Object obj,
ObjectKey key)
ObjectIndex
removeObject in class ObjectIndexobj - the object to be removedkey - the key to be used to find the objectpublic java.lang.Object removeKey(ObjectKey key)
ObjectIndex
removeKey in class ObjectIndexkey - the key to be removed
public java.io.PrintStream dump(java.io.PrintStream out)
ObjectIndexPrintStream.
dump in class ObjectIndexout - where to send the output
public int size()
size in class ObjectIndex
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||