|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
Interface of object index. Index is used to provide fast access to the object by key. Object in the index are stored ordered by key value. It is possible to select object using exact value of the key or select set of objects which key belongs to the specified interval (each boundary can be specified or unspecified and can be inclusive or exclusive) Key should be of scalar, String, java.util.Date or peristent object type.
| Field Summary |
|---|
| Fields inherited from interface org.garret.perst.GenericIndex |
|---|
ASCENT_ORDER, DESCENT_ORDER |
| Method Summary | |
|---|---|
boolean |
put(Key key,
T obj)
Put new object in the index. |
boolean |
put(java.lang.Object key,
T obj)
Put new object in the index. |
T |
remove(Key key)
Remove key from the unique index. |
void |
remove(Key key,
T obj)
Remove object with specified key from the index |
void |
remove(java.lang.Object key,
T obj)
Remove object with specified key from the index |
T |
remove(java.lang.String key)
Remove key from the unique string index. |
T |
removeKey(java.lang.Object key)
Remove key from the unique index. |
T |
set(Key key,
T obj)
Associate new value with the key. |
T |
set(java.lang.Object key,
T obj)
Associate new value with specified key. |
| Methods inherited from interface org.garret.perst.GenericIndex |
|---|
clear, entryIterator, entryIterator, entryIterator, get, get, get, get, getKeyType, getKeyTypes, getList, getList, getPrefix, getPrefixList, iterator, iterator, iterator, prefixIterator, prefixSearch, prefixSearchList, size, toPersistentArray |
| Methods inherited from interface org.garret.perst.IPersistent |
|---|
assignOid, deallocate, getOid, getStorage, invalidate, isDeleted, isModified, isPersistent, isRaw, load, loadAndModify, makePersistent, modify, onLoad, onStore, recursiveLoading, store |
| Methods inherited from interface java.io.Externalizable |
|---|
readExternal, writeExternal |
| Methods inherited from interface org.garret.perst.IResource |
|---|
exclusiveLock, exclusiveLock, reset, sharedLock, sharedLock, unlock |
| Methods inherited from interface java.util.Collection |
|---|
add, addAll, contains, containsAll, equals, hashCode, isEmpty, remove, removeAll, retainAll, toArray, toArray |
| Method Detail |
|---|
boolean put(Key key,
T obj)
key - object keyobj - object associated with this key. Object can be not yet peristent, in this case
its forced to become persistent by assigning OID to it.
true if object is successfully inserted in the index,
false if index was declared as unique and there is already object with such value
of the key in the index.
boolean put(java.lang.Object key,
T obj)
key - packed keyobj - object associated with this key. Object can be not yet peristent, in this case
its forced to become persistent by assigning OID to it.
true if object is successfully inserted in the index,
false if index was declared as unique and there is already object with such value
of the key in the index.T remove(Key key)
key - value of removed key
StorageError(StorageError.KEY_NOT_FOUND) - exception if there is no such key in the index,
or StorageError(StorageError.KEY_NOT_UNIQUE) if index is not unique.
void remove(Key key,
T obj)
key - value of the key of removed objectobj - object removed from the index
StorageError(StorageError.KEY_NOT_FOUND) - exception if there is no such key in the index
void remove(java.lang.Object key,
T obj)
key - value of the key of removed objectobj - object removed from the index
StorageError(StorageError.KEY_NOT_FOUND) - exception if there is no such key in the indexT remove(java.lang.String key)
key - packed value of removed key
StorageError(StorageError.KEY_NOT_FOUND) - exception if there is no such key in the index,
or StorageError(StorageError.KEY_NOT_UNIQUE) if index is not unique.T removeKey(java.lang.Object key)
key - packed value of removed key
StorageError(StorageError.KEY_NOT_FOUND) - exception if there is no such key in the index,
or StorageError(StorageError.KEY_NOT_UNIQUE) if index is not unique.
T set(Key key,
T obj)
key - object keyobj - object associated with this key. Object can be not yet peristent, in this case
its forced to become persistent by assigning OID to it.
null if there was no such object
T set(java.lang.Object key,
T obj)
key - packed keyobj - object associated with this key. Object can be not yet peristent, in this case
its forced to become persistent by assigning OID to it.
null if there was no such object
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||