org.openmobileis.database.fastobjectdb.db.index.FODBIndex Class Reference

Inheritance diagram for org.openmobileis.database.fastobjectdb.db.index.FODBIndex:

org.openmobileis.database.fastobjectdb.db.index.FODBIntIndex org.openmobileis.database.fastobjectdb.db.index.FODBLongIndex

List of all members.


Detailed Description

FODBIndex is an abstract Class on which each type of index will be based.

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.
 FODBIndex (FODBIndexDescriptor descriptor, FODBCollectionIndexFile cFile, AccessibleObject accObj) throws FODBException
 Constructor of FODBIndex, using an index descriptor.
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.
boolean delObjectWithKey (Object obj, long pos) throws FODBException
 Remove a pointer from our index.
String toString ()
 Helps us debugging.

Constructor & Destructor Documentation

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.FODBIndexHeader.descriptor, org.openmobileis.database.fastobjectdb.db.index.FODBIndexHeader.getName(), and org.openmobileis.database.fastobjectdb.FODBIndexDescriptor.getOrder().

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.store.FODBCollectionIndexFile.addIndexPointerToTable(), org.openmobileis.database.fastobjectdb.db.index.FODBIndexHeader.descriptor, org.openmobileis.database.fastobjectdb.db.index.node.Node.filePtr, org.openmobileis.database.fastobjectdb.FODBIndexDescriptor.getOrder(), 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().


Member Function Documentation

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.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.

Parameters:
obj - helps us getting the key.
pos - position of the element in the collection file.
Exceptions:
FODBDataFileException 
FODBIndexException 
BTreeException 

Definition at line 173 of file FODBIndex.java.

References org.openmobileis.common.util.collection.Array.get(), and org.openmobileis.common.util.collection.Array.size.

boolean org.openmobileis.database.fastobjectdb.db.index.FODBIndex.delObjectWithKey ( Object  obj,
long  pos 
) throws FODBException

Remove a pointer from our index.

Parameters:
obj - helps us getting the key.
pos - position of the element in the collection file.
Returns:
true if the operation succeed, false otherwise.
Exceptions:
FODBIndexException 

Definition at line 211 of file FODBIndex.java.

References org.openmobileis.common.util.collection.Array.get(), and org.openmobileis.common.util.collection.Array.size.

Referenced by org.openmobileis.database.fastobjectdb.db.FODBCollection.deleteObjectWithId().


The documentation for this class was generated from the following file:
Generated on Mon Jan 11 21:19:20 2010 for OpenMobileIS by  doxygen 1.5.4