org.axiondb.engine.indexes
Class ObjectBTreeIndex
java.lang.Object
org.axiondb.event.BaseTableModificationListener
org.axiondb.engine.indexes.BaseIndex
org.axiondb.engine.indexes.BaseBTreeIndex
org.axiondb.engine.indexes.ObjectBTreeIndex
- All Implemented Interfaces:
- TableModificationListener, Index
- Direct Known Subclasses:
- StringBTreeIndex
public class ObjectBTreeIndex
- extends BaseBTreeIndex
- implements TableModificationListener
A B-Tree index
over Object
keys.
- Version:
- $Revision: 1.8 $ $Date: 2005/12/20 18:32:39 $
Method Summary |
void |
changeRowId(Table table,
Row row,
int oldId,
int newId)
|
protected ObjectBTree |
createTree(File dataDirectory,
String name,
int minimizationFactor,
DataType dataType)
|
ObjectBTree |
getBTree()
|
IndexLoader |
getIndexLoader()
|
RowIterator |
getInorderRowIterator(RowSource source)
Returns a RowIterator which is inorder traversal of keys, |
protected Object |
getNullKey()
|
RowIterator |
getRowIterator(RowSource source,
Function function,
Object value)
Returns a RowIterator over the indexed rows, limited by the given
ComparisonOperator /value pair, using the default sort order. |
void |
rowDeleted(RowEvent event)
|
void |
rowInserted(RowEvent event)
|
void |
rowUpdated(RowEvent event)
|
void |
truncate()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_minimizationFactor
protected int _minimizationFactor
ObjectBTreeIndex
public ObjectBTreeIndex(String name,
Column column,
boolean unique)
throws AxionException
- Throws:
AxionException
ObjectBTreeIndex
public ObjectBTreeIndex(String name,
Column column,
boolean unique,
File dataDirectory)
throws AxionException
- Throws:
AxionException
changeRowId
public final void changeRowId(Table table,
Row row,
int oldId,
int newId)
throws AxionException
- Specified by:
changeRowId
in interface Index
- Throws:
AxionException
getBTree
public final ObjectBTree getBTree()
getIndexLoader
public IndexLoader getIndexLoader()
- Specified by:
getIndexLoader
in interface Index
- Specified by:
getIndexLoader
in class BaseIndex
getInorderRowIterator
public final RowIterator getInorderRowIterator(RowSource source)
throws AxionException
- Description copied from interface:
Index
- Returns a
RowIterator
which is inorder traversal of keys,
- Specified by:
getInorderRowIterator
in interface Index
- Specified by:
getInorderRowIterator
in class BaseIndex
- Parameters:
source
- table/view for which we need to get inorder traversal
- Returns:
-
- Throws:
AxionException
getRowIterator
public final RowIterator getRowIterator(RowSource source,
Function function,
Object value)
throws AxionException
- Description copied from interface:
Index
- Returns a
RowIterator
over the indexed rows, limited by the given
ComparisonOperator
/value pair, using the default sort order.
- Specified by:
getRowIterator
in interface Index
- Specified by:
getRowIterator
in class BaseIndex
value
- the value to compare the indexed column to
- Throws:
AxionException
rowDeleted
public final void rowDeleted(RowEvent event)
throws AxionException
- Specified by:
rowDeleted
in interface TableModificationListener
- Overrides:
rowDeleted
in class BaseTableModificationListener
- Throws:
AxionException
rowInserted
public final void rowInserted(RowEvent event)
throws AxionException
- Specified by:
rowInserted
in interface TableModificationListener
- Overrides:
rowInserted
in class BaseTableModificationListener
- Throws:
AxionException
rowUpdated
public final void rowUpdated(RowEvent event)
throws AxionException
- Specified by:
rowUpdated
in interface TableModificationListener
- Overrides:
rowUpdated
in class BaseTableModificationListener
- Throws:
AxionException
truncate
public void truncate()
throws AxionException
- Specified by:
truncate
in interface Index
- Specified by:
truncate
in class BaseIndex
- Throws:
AxionException
createTree
protected ObjectBTree createTree(File dataDirectory,
String name,
int minimizationFactor,
DataType dataType)
throws IOException,
ClassNotFoundException
- Throws:
IOException
ClassNotFoundException
getNullKey
protected Object getNullKey()