|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ashridgetech.prevdb.client.NonUniqueIndex
An map from values of one PersistentField
to List
s
of objects that contain that value.
Objects with a null value for the PersistentField
are not included
in any list, so a call to get(java.lang.Object)
with a null value
always
returns an empty list.
Constructor Summary | |
NonUniqueIndex(PersistentField indexedField)
Creates new NonUniqueIndex . |
Method Summary | |
void |
add(Persistent obj)
Add a new Persistent object to this index. |
List |
get(Object value)
Get the list of objects with a given value in the indexed field. |
PersistentField |
getIndexedField()
Get the PersistentField that is indexed |
void |
remove(Persistent obj)
Remove a Persistent object from this index when its value
for the field indexed by this index has changed. |
String |
toString()
|
void |
update(Persistent obj,
Object oldValue,
Object newValue)
Update a Persistent object's place in this index when its value
for the field indexed by this index has changed. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public NonUniqueIndex(PersistentField indexedField)
NonUniqueIndex
.
indexedField
- the PersistentField
that is indexedMethod Detail |
public PersistentField getIndexedField()
PersistentField
that is indexed
PersistentField
public List get(Object value)
value
- the indexed field value
List
. The contents of this list
may change internally, even though the caller cannot modify it.
If there are no objects with the value
, an empty List
is returned.public void add(Persistent obj)
Persistent
object to this index.
obj
- the object to addpublic void update(Persistent obj, Object oldValue, Object newValue)
Persistent
object's place in this index when its value
for the field indexed by this index has changed.
obj
- the object whose field value has changedoldValue
- the value of the field before the changenewValue
- the value of the field after the changepublic void remove(Persistent obj)
Persistent
object from this index when its value
for the field indexed by this index has changed.
obj
- the object whose field value has changedpublic String toString()
toString
in class Object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |