|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
Interface of bit index. Bit index allows to effiicently search object with specified set of properties. Each object has associated mask of 32 bites. Meaning of bits is application dependent. Usually each bit stands for some binary or boolean property, for example "sex", but it is possible to use group of bits to represent enumerations with more possible values.
| Method Summary | |
|---|---|
void |
clear()
Remove all objects from the index |
int |
get(T obj)
Get properties of specified object |
IterableIterator<T> |
iterator(int set,
int clear)
Get iterator for selecting objects with specified properties. |
void |
put(T obj,
int mask)
Put new object in the index. |
void |
remove(T obj)
Remove object from the index |
int |
size()
Get number of objects in the index |
| 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 |
| Methods inherited from interface java.util.Collection |
|---|
add, addAll, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, toArray, toArray |
| Method Detail |
|---|
void clear()
clear in interface java.util.Collectionint get(T obj)
obj - object which properties are requested
StorageError(StorageError.KEY_NOT_FOUND) - exception if there is no object in the index
IterableIterator<T> iterator(int set,
int clear)
set - bitmask specifying bits which should be set (1)clear - bitmask specifying bits which should be cleared (0)
void put(T obj,
int mask)
obj - object placed in the index. Object can be not yet peristent, in this case
its forced to become persistent by assigning OID to it.mask - bit mask associated with this objectsvoid remove(T obj)
obj - object removed from the index
StorageError(StorageError.KEY_NOT_FOUND) - exception if there is no such key in the indexint size()
size in interface java.util.Collection
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||