Main Page | Packages | Class Hierarchy | Class List | Directories | File List | Class Members | Related Pages

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 org.openmobileis.database.fastobjectdb.db.index.FODBStringIndex org.openmobileis.database.fastobjectdb.db.index.FODBMultipleIntIndex org.openmobileis.database.fastobjectdb.db.index.FODBUniqueIntIndex org.openmobileis.database.fastobjectdb.db.index.FODBMultipleLongIndex org.openmobileis.database.fastobjectdb.db.index.FODBUniqueLongIndex org.openmobileis.database.fastobjectdb.db.index.FODBMultipleStringIndex org.openmobileis.database.fastobjectdb.db.index.FODBUniqueStringIndex 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.
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 ()
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


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.FODBIndex.accessObj, org.openmobileis.database.fastobjectdb.db.index.FODBIndex.colFile, org.openmobileis.database.fastobjectdb.db.index.FODBIndexHeader.getName(), org.openmobileis.database.fastobjectdb.db.index.FODBIndex.header, org.openmobileis.database.fastobjectdb.db.index.FODBIndex.minKey, org.openmobileis.database.fastobjectdb.db.index.FODBIndex.name, and org.openmobileis.database.fastobjectdb.db.index.FODBIndexHeader.order.

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.node.Node.filePtr, org.openmobileis.database.fastobjectdb.db.index.FODBIndex.getName(), 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.order, 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.db.index.FODBIndexHeader.type, org.openmobileis.database.fastobjectdb.db.store.FODBCollectionIndexFile.writeHeader(), and org.openmobileis.database.fastobjectdb.db.store.FODBCollectionIndexFile.writeNode().


Member Function Documentation

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(), org.openmobileis.database.fastobjectdb.db.index.FODBIndex.getAccessObjType(), 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(), org.openmobileis.database.fastobjectdb.db.index.FODBIndex.getAccessObjType(), and org.openmobileis.common.util.collection.Array.size.

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

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.


The documentation for this class was generated from the following file:
Generated on Wed Dec 14 21:05:38 2005 for OpenMobileIS by  doxygen 1.4.4