org.axiondb.engine.tables

Class BaseTable

public abstract class BaseTable extends AbstractBaseTable implements Table

An abstract base implementation of Table.

Version: $Revision: 1.28 $ $Date: 2005/12/22 09:02:31 $

Author: Chuck Burdick Rodney Waldhoff Ahimanikya Satapathy Jonathan Giron

Constructor Summary
BaseTable(String name)
Method Summary
voidaddColumn(Column col)
Add the given Columnto this table.
voidaddConstraint(Constraint constraint)
voidaddIndex(Index index)
voidaddRow(Row row)
abstract voidapplyDeletes(IntCollection rowids)
protected voidapplyDeletesToIndices(IntCollection rowIds)
abstract voidapplyInserts(RowCollection rows)
protected voidapplyInsertsToIndices(RowCollection rows)
abstract voidapplyUpdates(RowCollection rows)
protected voidapplyUpdatesToIndices(RowCollection rows)
voidcheckpoint()
protected voidclearCache()
voiddeleteRow(Row row)
voiddrop()
abstract voidfreeRowId(int id)
ColumngetColumn(int index)
ColumngetColumn(String name)
intgetColumnCount()
ListgetColumnIdentifiers()
intgetColumnIndex(String name)
ConstraintgetConstraint(String name)
IteratorgetConstraints()
RowIteratorgetIndexedRows(Selectable node, boolean readOnly)
RowIteratorgetIndexedRows(RowSource source, Selectable node, boolean readOnly)
IndexgetIndexForColumn(Column column)
IteratorgetIndices()
StringgetName()
abstract intgetNextRowId()
abstract RowgetRow(int id)
abstract intgetRowCount()
protected abstract RowIteratorgetRowIterator()
RowIteratorgetRowIterator(boolean readOnly)
SequencegetSequence()
StringgetType()
booleanhasColumn(ColumnIdentifier id)
booleanhasIndex(String name)
booleanisColumnIndexed(Column column)
booleanisPrimaryKeyConstraintExists(String columnName)
check if primary constraint exists on a column
booleanisUniqueConstraintExists(String columnName)
check if unique constraint exists on a column
RowDecoratormakeRowDecorator()
TransactableTablemakeTransactableTable()
protected voidnotifyColumnsOfNewLobDir(File directory)
abstract voidpopulateIndex(Index index)
protected voidreadColumns(ObjectInputStream in)
protected voidreadConstraints(ObjectInputStream in, Database db)
protected voidrecreateIndices()
voidremount(File dir, boolean datafilesonly)
ConstraintremoveConstraint(String name)
voidremoveIndex(Index index)
voidrename(String oldName, String newName)
protected voidsetName(String name)
voidsetSequence(Sequence seq)
protected voidsetType(String type)
voidshutdown()
StringtoString()
protected voidtruncateIndices()
voidupdateRow(Row oldrow, Row newrow)
protected voidwriteColumns(ObjectOutputStream out)
protected voidwriteConstraints(ObjectOutputStream out)

Constructor Detail

BaseTable

public BaseTable(String name)

Method Detail

addColumn

public void addColumn(Column col)
Add the given Columnto this table. This implementation throws an AxionExceptionif rows have already been added to the table.

addConstraint

public void addConstraint(Constraint constraint)

addIndex

public void addIndex(Index index)

addRow

public void addRow(Row row)

applyDeletes

public abstract void applyDeletes(IntCollection rowids)

applyDeletesToIndices

protected void applyDeletesToIndices(IntCollection rowIds)

applyInserts

public abstract void applyInserts(RowCollection rows)

applyInsertsToIndices

protected void applyInsertsToIndices(RowCollection rows)

applyUpdates

public abstract void applyUpdates(RowCollection rows)

applyUpdatesToIndices

protected void applyUpdatesToIndices(RowCollection rows)

checkpoint

public void checkpoint()

clearCache

protected final void clearCache()

deleteRow

public void deleteRow(Row row)

drop

public void drop()

freeRowId

public abstract void freeRowId(int id)

getColumn

public final Column getColumn(int index)

getColumn

public Column getColumn(String name)

getColumnCount

public final int getColumnCount()

getColumnIdentifiers

public List getColumnIdentifiers()

getColumnIndex

public int getColumnIndex(String name)

getConstraint

public final Constraint getConstraint(String name)

getConstraints

public Iterator getConstraints()

getIndexedRows

public RowIterator getIndexedRows(Selectable node, boolean readOnly)

getIndexedRows

public RowIterator getIndexedRows(RowSource source, Selectable node, boolean readOnly)

getIndexForColumn

public Index getIndexForColumn(Column column)

getIndices

public Iterator getIndices()

getName

public final String getName()

getNextRowId

public abstract int getNextRowId()

getRow

public abstract Row getRow(int id)

getRowCount

public abstract int getRowCount()

getRowIterator

protected abstract RowIterator getRowIterator()

getRowIterator

public RowIterator getRowIterator(boolean readOnly)

getSequence

public final Sequence getSequence()

getType

public final String getType()

hasColumn

public boolean hasColumn(ColumnIdentifier id)

hasIndex

public boolean hasIndex(String name)

isColumnIndexed

public boolean isColumnIndexed(Column column)

isPrimaryKeyConstraintExists

public boolean isPrimaryKeyConstraintExists(String columnName)
check if primary constraint exists on a column

Parameters: ColumnName name of the column

Returns: if PrimaryKeyConstraint exists on the column

isUniqueConstraintExists

public boolean isUniqueConstraintExists(String columnName)
check if unique constraint exists on a column

Parameters: columnName name of the columm

Returns: true if uniqueConstraint exists on the column

makeRowDecorator

public RowDecorator makeRowDecorator()

makeTransactableTable

public TransactableTable makeTransactableTable()

notifyColumnsOfNewLobDir

protected void notifyColumnsOfNewLobDir(File directory)

populateIndex

public abstract void populateIndex(Index index)

readColumns

protected void readColumns(ObjectInputStream in)

readConstraints

protected void readConstraints(ObjectInputStream in, Database db)

recreateIndices

protected void recreateIndices()

remount

public void remount(File dir, boolean datafilesonly)

removeConstraint

public Constraint removeConstraint(String name)

removeIndex

public void removeIndex(Index index)

rename

public void rename(String oldName, String newName)

setName

protected void setName(String name)

setSequence

public void setSequence(Sequence seq)

setType

protected void setType(String type)

shutdown

public void shutdown()

toString

public String toString()

truncateIndices

protected void truncateIndices()

updateRow

public void updateRow(Row oldrow, Row newrow)

writeColumns

protected void writeColumns(ObjectOutputStream out)

writeConstraints

protected void writeConstraints(ObjectOutputStream out)