|
||||||||
| 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,
IPersistent obj)
Put new object in the index. |
boolean |
put(java.lang.String key,
IPersistent obj)
Put new object in the string index. |
IPersistent |
remove(Key key)
Remove key from the unique index. |
void |
remove(Key key,
IPersistent obj)
Remove object with specified key from the index |
IPersistent |
remove(java.lang.String key)
Remove key from the unique string index. |
void |
remove(java.lang.String key,
IPersistent obj)
Remove object with specified string key from the index |
IPersistent |
set(Key key,
IPersistent obj)
Associate new value with the key. |
IPersistent |
set(java.lang.String key,
IPersistent obj)
Associate new value with string key. |
| Methods inherited from interface org.garret.perst.GenericIndex |
clear, entryIterator, entryIterator, get, get, get, getKeyType, getKeyTypes, getPrefix, iterator, iterator, prefixIterator, prefixSearch, size, toPersistentArray, 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 org.garret.perst.ITable |
select |
| Method Detail |
public boolean put(Key key,
IPersistent 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.
public boolean put(java.lang.String key,
IPersistent obj)
key - string 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.public IPersistent 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.
public void remove(Key key,
IPersistent 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 indexpublic IPersistent remove(java.lang.String 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.
public void remove(java.lang.String key,
IPersistent 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
public IPersistent set(Key key,
IPersistent 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
public IPersistent set(java.lang.String key,
IPersistent obj)
key - string 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 | |||||||