public abstract class BaseIndex extends BaseTableModificationListener implements Index, TableModificationListener
Index
.Constructor and Description |
---|
BaseIndex(java.lang.String name,
Column column,
boolean unique) |
Modifier and Type | Method and Description |
---|---|
protected java.util.Comparator |
getComparator() |
protected DataType |
getDataType() |
Column |
getIndexedColumn()
Returns the column I index.
|
abstract IndexLoader |
getIndexLoader() |
abstract RowIterator |
getInorderRowIterator(RowSource source)
Returns a
RowIterator which is inorder traversal of keys, |
java.lang.String |
getName()
Returns my name.
|
abstract RowIterator |
getRowIterator(RowSource source,
Function fn,
java.lang.Object value)
Returns a
RowIterator over the indexed rows, limited by the given
ComparisonOperator /value pair, using the default sort order. |
boolean |
isUnique()
Whether or not I allow duplicate values.
|
abstract void |
save(java.io.File dataDirectory) |
abstract void |
saveAfterTruncate(java.io.File dataDirectory) |
abstract boolean |
supportsFunction(Function fn)
Returns true iff
#getRowIterator(org.axiondb.RowSource,org.axiondb.ComparisonOperator,java.lang.Object)
can support the given operator, false otherwise. |
abstract void |
truncate() |
columnAdded, constraintAdded, constraintRemoved, rowDeleted, rowInserted, rowUpdated
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
changeRowId, getType
columnAdded, constraintAdded, constraintRemoved, rowDeleted, rowInserted, rowUpdated
public BaseIndex(java.lang.String name, Column column, boolean unique)
public Column getIndexedColumn()
Index
getIndexedColumn
in interface Index
public abstract IndexLoader getIndexLoader()
getIndexLoader
in interface Index
public abstract RowIterator getInorderRowIterator(RowSource source) throws AxionException
Index
RowIterator
which is inorder traversal of keys,getInorderRowIterator
in interface Index
source
- table/view for which we need to get inorder traversalAxionException
public java.lang.String getName()
Index
public abstract RowIterator getRowIterator(RowSource source, Function fn, java.lang.Object value) throws AxionException
Index
RowIterator
over the indexed rows, limited by the given
ComparisonOperator
/value pair, using the default sort order.getRowIterator
in interface Index
value
- the value to compare the indexed column toAxionException
public boolean isUnique()
Index
public abstract void save(java.io.File dataDirectory) throws AxionException
save
in interface Index
AxionException
public abstract void saveAfterTruncate(java.io.File dataDirectory) throws AxionException
saveAfterTruncate
in interface Index
AxionException
public abstract boolean supportsFunction(Function fn)
Index
#getRowIterator(org.axiondb.RowSource,org.axiondb.ComparisonOperator,java.lang.Object)
can support the given operator, false otherwise.supportsFunction
in interface Index
public abstract void truncate() throws AxionException
truncate
in interface Index
AxionException
protected java.util.Comparator getComparator()
protected DataType getDataType()