Inheritance diagram for org.openmobileis.database.fastobjectdb.db.index.FODBIndex:
Definition at line 50 of file FODBIndex.java.
Public Member Functions | |
FODBIndex (FODBIndexHeader newHeader, FODBCollectionIndexFile cFile, AccessibleObject accObj) | |
Constructor of FODBIndex, using an index header. | |
Node | readRoot () throws IOException, ClassNotFoundException |
FODBIndex (FODBIndexDescriptor descriptor, FODBCollectionIndexFile cFile, AccessibleObject accObj) throws FODBException | |
Constructor of FODBIndex, using an index descriptor. | |
String | getName () |
long | getPos () |
boolean | isEmpty () throws FODBException |
return true if the index is empty. | |
void | add (Object obj, long pos) throws FODBException |
Add a new pointer in our index. | |
Class | getAccessObjType () |
boolean | delObjectWithKey (Object obj, long pos) throws FODBException |
Remove a pointer from our index. | |
FODBIndexHeader | getIndexHeader () |
FODBIndexDescriptor | getIndexDescriptor () |
String | toString () |
Helps us debugging. | |
Static Public Attributes | |
static final int | UNIQUE = 1 |
static final int | MULTIPLE = 2 |
Protected Attributes | |
String | name |
final AccessibleObject | accessObj |
FODBCollectionIndexFile | colFile |
FODBIndexHeader | header |
int | minKey |
org.openmobileis.database.fastobjectdb.db.index.FODBIndex.FODBIndex | ( | FODBIndexHeader | newHeader, | |
FODBCollectionIndexFile | cFile, | |||
AccessibleObject | accObj | |||
) |
Constructor of FODBIndex, using an index header.
Using an index header, means that we're opening (and not creating) an index.
Definition at line 65 of file FODBIndex.java.
References org.openmobileis.database.fastobjectdb.db.index.FODBIndex.accessObj, org.openmobileis.database.fastobjectdb.db.index.FODBIndex.colFile, org.openmobileis.database.fastobjectdb.db.index.FODBIndexHeader.descriptor, org.openmobileis.database.fastobjectdb.db.index.FODBIndexHeader.getName(), org.openmobileis.database.fastobjectdb.FODBIndexDescriptor.getOrder(), org.openmobileis.database.fastobjectdb.db.index.FODBIndex.header, org.openmobileis.database.fastobjectdb.db.index.FODBIndex.minKey, and org.openmobileis.database.fastobjectdb.db.index.FODBIndex.name.
org.openmobileis.database.fastobjectdb.db.index.FODBIndex.FODBIndex | ( | FODBIndexDescriptor | descriptor, | |
FODBCollectionIndexFile | cFile, | |||
AccessibleObject | accObj | |||
) | throws FODBException |
Constructor of FODBIndex, using an index descriptor.
Using an index descriptor, means that we're creating (and not opening) an index. This is the reason why this constructor is little bit more complicated that the upper one.
Definition at line 84 of file FODBIndex.java.
References org.openmobileis.database.fastobjectdb.db.index.FODBIndex.accessObj, org.openmobileis.database.fastobjectdb.db.store.FODBCollectionIndexFile.addIndexPointerToTable(), org.openmobileis.database.fastobjectdb.db.index.FODBIndex.colFile, org.openmobileis.database.fastobjectdb.db.index.FODBIndexHeader.descriptor, org.openmobileis.database.fastobjectdb.db.index.node.Node.filePtr, org.openmobileis.database.fastobjectdb.db.index.FODBIndex.getName(), org.openmobileis.database.fastobjectdb.FODBIndexDescriptor.getOrder(), org.openmobileis.database.fastobjectdb.db.index.FODBIndex.header, org.openmobileis.database.fastobjectdb.db.index.FODBIndex.minKey, org.openmobileis.database.fastobjectdb.db.index.FODBIndex.name, org.openmobileis.database.fastobjectdb.db.index.FODBIndexHeader.pos, org.openmobileis.database.fastobjectdb.db.store.FODBCollectionIndexFile.rewriteHeader(), org.openmobileis.database.fastobjectdb.db.index.FODBIndexHeader.rootPtr, org.openmobileis.database.fastobjectdb.FODBIndexDescriptor.setType(), org.openmobileis.database.fastobjectdb.db.store.FODBCollectionIndexFile.writeHeader(), and org.openmobileis.database.fastobjectdb.db.store.FODBCollectionIndexFile.writeNode().
boolean org.openmobileis.database.fastobjectdb.db.index.FODBIndex.isEmpty | ( | ) | throws FODBException |
return true if the index is empty.
throws StoreBTreeException if the index is closed
Definition at line 151 of file FODBIndex.java.
References org.openmobileis.database.fastobjectdb.db.index.FODBIndex.colFile, org.openmobileis.database.fastobjectdb.db.index.FODBIndex.header, org.openmobileis.database.fastobjectdb.db.index.node.Node.nbKey, org.openmobileis.database.fastobjectdb.db.store.FODBCollectionIndexFile.readNode(), and org.openmobileis.database.fastobjectdb.db.index.FODBIndexHeader.rootPtr.
void org.openmobileis.database.fastobjectdb.db.index.FODBIndex.add | ( | Object | obj, | |
long | pos | |||
) | throws FODBException |
Add a new pointer in our index.
obj | - helps us getting the key. | |
pos | - position of the element in the collection file. |
FODBDataFileException | ||
FODBIndexException | ||
BTreeException |
Definition at line 173 of file FODBIndex.java.
References org.openmobileis.common.util.collection.Array.get(), and org.openmobileis.database.fastobjectdb.db.index.FODBIndex.getAccessObjType().
boolean org.openmobileis.database.fastobjectdb.db.index.FODBIndex.delObjectWithKey | ( | Object | obj, | |
long | pos | |||
) | throws FODBException |
Remove a pointer from our index.
obj | - helps us getting the key. | |
pos | - position of the element in the collection file. |
FODBIndexException |
Definition at line 211 of file FODBIndex.java.
References org.openmobileis.common.util.collection.Array.get(), and org.openmobileis.database.fastobjectdb.db.index.FODBIndex.getAccessObjType().
Referenced by org.openmobileis.database.fastobjectdb.db.FODBCollection.deleteObjectWithId().