|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.axiondb.event.BaseTableModificationPublisher
org.axiondb.engine.tables.BaseTable
An abstract base implementation of Table.
| Field Summary |
| Fields inherited from interface org.axiondb.Table |
REGULAR_TABLE_TYPE, SYSTEM_TABLE_TYPE |
| Constructor Summary | |
BaseTable(String name)
|
|
| Method Summary | |
void |
addColumn(Column col)
Add the given Columnto this table. |
void |
addConstraint(Constraint constraint)
|
void |
addIndex(Index index)
Add an index, associating it with a Column, and adding it as a
org.axiondb.TableModificationListenerto the table. |
void |
addRow(Row row)
Insert the given Row. |
abstract void |
applyDeletes(org.apache.commons.collections.primitives.IntCollection rowids)
Remove the specified rows from this table and any associated indices. |
protected void |
applyDeletesToIndices(org.apache.commons.collections.primitives.IntCollection rowIds)
|
abstract void |
applyInserts(Collection rows)
Insert the given rows into this table and any associated indices. |
protected void |
applyInsertsToIndices(Collection rows)
|
abstract void |
applyUpdates(Collection rows)
Update the given rows in this table and any associated indices. |
protected void |
applyUpdatesToIndices(Collection rows)
|
protected void |
checkConstraints(RowEvent event)
|
protected void |
checkConstraints(RowEvent event,
boolean deferred)
|
protected void |
deleteRow(Row row)
|
void |
drop()
Drop this table from the database. |
abstract void |
freeRowId(int id)
Un-reserve a row id. |
Column |
getColumn(int index)
Return the Columncorresponding to the given zero-based index . |
Column |
getColumn(String name)
Return the Columnfor the given name . |
int |
getColumnCount()
Return the number of Columns I contain. |
Iterator |
getColumnIdentifiers()
Return an Iteratorover the ColumnIdentifiersfor
my Columns. |
int |
getColumnIndex(String name)
Return the zero-based index of the Columnwith the given name . |
Iterator |
getConstraints()
|
RowIterator |
getIndexedRows(Selectable node,
boolean readOnly)
|
Index |
getIndexForColumn(Column column)
Return the first Indexthat pertains to the given Column, or
null if no such Indexexists. |
Iterator |
getIndices()
Obtain an Iteratorover my indices. |
RowIterator |
getMatchingRows(List selectables,
List values)
Obtain an iteratorover my Rows where each
Selectablein the selectable list
evaluatesto the corresponding value in the value
list. |
String |
getName()
Get the name of this table. |
abstract int |
getNextRowId()
Reserve a row id. |
abstract Row |
getRow(int id)
|
abstract int |
getRowCount()
Return the number of Rows I contain. |
protected abstract RowIterator |
getRowIterator()
|
RowIterator |
getRowIterator(boolean readOnly)
Obtain an iteratorover my Rows. |
String |
getType()
Get the type of this table. |
boolean |
hasColumn(ColumnIdentifier id)
Indicate whether the ColumnIdentifierreferences a column in this table |
protected boolean |
hasDeferredConstraint()
|
boolean |
hasIndex(String name)
|
boolean |
isColumnIndexed(Column column)
Check to see if an Indexexists for the given Column |
boolean |
isPrimaryKeyConstraintExists(String columnName)
check if primary constraint exists on a column |
boolean |
isUniqueConstraintExists(String columnName)
check if unique constraint exists on a column |
RowDecorator |
makeRowDecorator()
|
TransactableTable |
makeTransactableTable()
Create a TransactableTablefor this table. |
protected void |
notifyColumnsOfNewLobDir(File directory)
|
abstract void |
populateIndex(Index index)
Populate an Index, adding my current rows to it. |
protected void |
readColumns(ObjectInputStream in)
|
protected void |
readConstraints(ObjectInputStream in)
|
void |
remount(File dir,
boolean datafilesonly)
Notify this table that its disk-location has moved. |
void |
removeConstraint(String name)
|
void |
removeIndex(Index index)
Remove an index, both from the indices and as a TableModificationListener |
void |
rename(String oldName,
String newName)
|
protected void |
setName(String name)
|
protected void |
setType(String type)
|
void |
shutdown()
The database is shutting down, shutdown this table also. |
String |
toString()
|
protected void |
truncateIndices()
|
void |
updateRow(Row oldrow,
Row newrow)
Update the given Row. |
protected void |
writeColumns(ObjectOutputStream out)
|
protected void |
writeConstraints(ObjectOutputStream out)
|
| Methods inherited from class org.axiondb.event.BaseTableModificationPublisher |
addTableModificationListener, getTableModificationListeners, publishEvent, removeTableModificationListener |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.axiondb.Table |
addTableModificationListener, removeTableModificationListener, truncate |
| Constructor Detail |
public BaseTable(String name)
| Method Detail |
public abstract void applyDeletes(org.apache.commons.collections.primitives.IntCollection rowids)
throws AxionException
Table
applyDeletes in interface TableAxionException
public abstract void applyInserts(Collection rows)
throws AxionException
Table
applyInserts in interface Tablerows - a collection of Rows
AxionException
public abstract void applyUpdates(Collection rows)
throws AxionException
Table
applyUpdates in interface TableAxionExceptionpublic abstract void freeRowId(int id)
Table
freeRowId in interface Tablepublic abstract int getNextRowId()
Table
getNextRowId in interface Tablepublic abstract int getRowCount()
TableRows I contain.
getRowCount in interface Table
public abstract void populateIndex(Index index)
throws AxionException
TableIndex, adding my current rows to it. Does not
addthe index.
populateIndex in interface Tableindex -
AxionExceptionTable.addIndex(org.axiondb.Index)
public abstract Row getRow(int id)
throws AxionException
getRow in interface RowSourceAxionException
protected abstract RowIterator getRowIterator()
throws AxionException
AxionException
public RowIterator getRowIterator(boolean readOnly)
throws AxionException
Tableiteratorover my Rows.
getRowIterator in interface TablereadOnly - when true, the caller does not expect to be able to
modify (i.e., call RowIterator.set(org.axiondb.Row)or RowIterator.remove()on)
the returned RowIterator, the returned iterator may be
unmodifiable.
AxionException
public void addRow(Row row)
throws AxionException
TableRow.
addRow in interface TableAxionException
protected void deleteRow(Row row)
throws AxionException
AxionException
public void updateRow(Row oldrow,
Row newrow)
throws AxionException
TableRow.
updateRow in interface TableAxionException
protected void truncateIndices()
throws AxionException
AxionExceptionpublic String toString()
public String getName()
Table
getName in interface Tablepublic String getType()
Table
getType in interface Tableprotected void setType(String type)
protected void setName(String name)
public void addConstraint(Constraint constraint)
throws AxionException
addConstraint in interface TableAxionExceptionpublic void removeConstraint(String name)
removeConstraint in interface Tablepublic boolean isUniqueConstraintExists(String columnName)
isUniqueConstraintExists in interface TablecolumnName - name of the columm
public boolean isPrimaryKeyConstraintExists(String columnName)
isPrimaryKeyConstraintExists in interface Tablepublic Iterator getConstraints()
getConstraints in interface Table
public void addIndex(Index index)
throws AxionException
TableColumn, and adding it as a
org.axiondb.TableModificationListenerto the table.
addIndex in interface Tableindex -
AxionExceptionTable.addIndex(org.axiondb.Index),
Table.addTableModificationListener(org.axiondb.event.TableModificationListener),
Table.getIndexForColumn(org.axiondb.Column),
Table.isColumnIndexed(org.axiondb.Column),
Table.populateIndex(org.axiondb.Index)
public void removeIndex(Index index)
throws AxionException
Table
removeIndex in interface Tableindex -
AxionExceptionpublic Index getIndexForColumn(Column column)
TableIndexthat pertains to the given Column, or
null if no such Indexexists.
getIndexForColumn in interface TableColumn, or null if no such
Indexexistspublic boolean isColumnIndexed(Column column)
TableIndexexists for the given Column
isColumnIndexed in interface Tablecolumn - Columnto check
Indexfor the given Column
public RowIterator getMatchingRows(List selectables,
List values)
throws AxionException
Tableiteratorover my Rows where each
Selectablein the selectable list
evaluatesto the corresponding value in the value
list.
This is functionally similiar to executing a SELECT over this table where selectable[i] = value[i] for each value of i . The return RowIterator is not modifiable.
getMatchingRows in interface TableAxionException
public RowIterator getIndexedRows(Selectable node,
boolean readOnly)
throws AxionException
getIndexedRows in interface TablereadOnly - when true, the caller does not expect to be able to
modify (i.e., call RowIterator.set(org.axiondb.Row)or RowIterator.remove()on)
the returned RowIterator, the returned iterator may be
unmodifiable.
AxionException
public void addColumn(Column col)
throws AxionException
Columnto this table. This implementation throws an
AxionExceptionif rows have already been added to the table.
addColumn in interface TableAxionExceptionpublic boolean hasColumn(ColumnIdentifier id)
TableColumnIdentifierreferences a column in this table
hasColumn in interface Tablepublic Column getColumn(int index)
TableColumncorresponding to the given zero-based index .
getColumn in interface Tablepublic Column getColumn(String name)
TableColumnfor the given name .
getColumn in interface Table
public int getColumnIndex(String name)
throws AxionException
TableColumnwith the given name .
getColumnIndex in interface TableAxionExceptionpublic Iterator getColumnIdentifiers()
TableIteratorover the ColumnIdentifiersfor
my Columns.
getColumnIdentifiers in interface Tablepublic int getColumnCount()
TableColumns I contain.
getColumnCount in interface Table
public void drop()
throws AxionException
Table
drop in interface TableAxionException
public void remount(File dir,
boolean datafilesonly)
throws AxionException
Table
remount in interface TableAxionException
public void rename(String oldName,
String newName)
throws AxionException
rename in interface TableAxionException
public void shutdown()
throws AxionException
Table
shutdown in interface TableAxionExceptionpublic RowDecorator makeRowDecorator()
makeRowDecorator in interface Tablepublic TransactableTable makeTransactableTable()
TableTransactableTablefor this table.
makeTransactableTable in interface Tablepublic Iterator getIndices()
TableIteratorover my indices.
getIndices in interface Tablepublic boolean hasIndex(String name)
hasIndex in interface Table
protected void checkConstraints(RowEvent event)
throws AxionException
AxionException
protected void checkConstraints(RowEvent event,
boolean deferred)
throws AxionException
AxionExceptionprotected boolean hasDeferredConstraint()
protected void notifyColumnsOfNewLobDir(File directory)
protected void writeColumns(ObjectOutputStream out)
throws IOException
IOException
protected void readColumns(ObjectInputStream in)
throws IOException,
ClassNotFoundException
IOException
ClassNotFoundException
protected void writeConstraints(ObjectOutputStream out)
throws IOException
IOException
protected void readConstraints(ObjectInputStream in)
throws IOException,
ClassNotFoundException
IOException
ClassNotFoundException
protected void applyDeletesToIndices(org.apache.commons.collections.primitives.IntCollection rowIds)
throws AxionException
AxionException
protected void applyUpdatesToIndices(Collection rows)
throws AxionException
AxionException
protected void applyInsertsToIndices(Collection rows)
throws AxionException
AxionException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||