org.axiondb
public interface Table extends RowSource
Version: $Revision: 1.61 $ $Date: 2007/11/13 19:04:02 $
Field Summary | |
---|---|
static String | REGULAR_TABLE_TYPE |
static String | SYSTEM_TABLE_TYPE |
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. |
void | addTableModificationListener(TableModificationListener listener)
Adds a listener to receive events on this table |
void | applyDeletes(IntCollection rowids)
Remove the specified rows from this table and any associated indices. |
void | applyInserts(RowCollection rows)
Insert the given rows into this table and any associated indices. |
void | applyUpdates(RowCollection rows)
Update the given rows in this table and any associated indices. |
void | checkpoint() |
void | deleteRow(Row row)
Delete the given Row. |
void | drop() Drop this table from the database. |
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. |
List | getColumnIdentifiers()
Return an readonly Listover the ColumnIdentifiers for
my Columns. |
int | getColumnIndex(String name)
Return the zero-based index of the Columnwith the given name . |
Constraint | getConstraint(String name) |
Iterator | getConstraints() |
RowIterator | getIndexedRows(Selectable where, boolean readOnly) |
RowIterator | getIndexedRows(RowSource source, Selectable where, boolean readOnly) |
Index | getIndexForColumn(Column column) |
Iterator<Index> | getIndices() Obtain an Iteratorover my indices. |
RowIterator | getMatchingRows(List selectables, List values, boolean readOnly)
Obtain an iterator over my Rows where each
Selectable in the selectable List list
evaluates to the corresponding value in the value
List list .
|
String | getName() Get the name of this table. |
int | getNextRowId() Reserve a row id. |
int | getRowCount()
Return the number of Rows I contain. |
RowIterator | getRowIterator(boolean readOnly) |
Sequence | getSequence() |
Iterator<TableModificationListener> | getTableModificationListeners() |
String | getType() Get the type of this table. |
boolean | hasColumn(ColumnIdentifier id)
Indicate whether the ColumnIdentifierreferences a column in this table |
boolean | hasIndex(String name) |
boolean | isColumnIndexed(Column 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. |
void | migrate() Migrate from older version to newer version for this table |
void | populateIndex(Index index)
Populate an Index, adding my current rows to it. |
void | remount(File dir, boolean dataOnly) Notify this table that its disk-location has moved. |
Constraint | removeConstraint(String name) |
void | removeIndex(Index index)
Remove an index, both from the indices and as a TableModificationListener
|
void | removeTableModificationListener(TableModificationListener listener)
Removes a listener so that it stops receiving events on this table |
void | rename(String oldName, String newName) |
void | setDeferAllConstraints(boolean deferAll) |
void | setSequence(Sequence seq) |
void | shutdown() The database is shutting down, shutdown this table also. |
void | truncate()
Unconditionally delete all rows in this table.
|
void | updateRow(Row oldrow, Row newrow)
Update the given Row. |
Parameters: index
Throws: AxionException
Parameters: rows a collection of Rows
Throws: AxionException
ColumnIdentifiers
for
my Columns.Parameters: readOnly when true
, the caller does not expect to be able to
modify (i.e., call RowIteratoror RowIteratoron)
the returned RowIterator, the returned iterator may be
unmodifiable.
null
if no such Indexexists.
Returns: the pertinent Column, or null
if no such
Indexexists
iterator
over my Rows where each
Selectable
in the selectable List list
evaluates
to the corresponding value in the value
List 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.
iterator
over my Rows.
Parameters: readOnly when true
, the caller does not expect to be able to
modify (i.e., call RowIteratoror RowIteratoron)
the returned RowIterator, the returned iterator may be
unmodifiable.
Parameters: column Columnto check
Returns: true iff there is an existing Indexfor the given Column
Parameters: ColumnName name of the column
Returns: if PrimaryKeyConstraint exists on the column
Parameters: columnName name of the columm
Returns: true if uniqueConstraint exists on the column
add
the index.
Parameters: index
Throws: AxionException
See Also: Table
Parameters: index
Throws: AxionException
Returns: true if truncation succeeded; false otherwise