public interface Table extends RowSource
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
REGULAR_TABLE_TYPE |
static java.lang.String |
SYSTEM_TABLE_TYPE |
| Modifier and Type | Method and Description |
|---|---|
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(org.apache.commons.collections.primitives.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(java.lang.String name)
Return the
Columnfor the given name . |
int |
getColumnCount()
Return the number of
Columns I contain. |
java.util.List |
getColumnIdentifiers()
|
int |
getColumnIndex(java.lang.String name)
Return the zero-based index of the
Columnwith the given name . |
Constraint |
getConstraint(java.lang.String name) |
java.util.Iterator |
getConstraints() |
RowIterator |
getIndexedRows(RowSource source,
Selectable where,
boolean readOnly) |
RowIterator |
getIndexedRows(Selectable where,
boolean readOnly) |
Index |
getIndexForColumn(Column column)
|
java.util.Iterator<Index> |
getIndices()
Obtain an
Iteratorover my indices. |
RowIterator |
getMatchingRows(java.util.List selectables,
java.util.List values,
boolean readOnly)
Obtain an
iteratorover my Rows where each
Selectablein the selectable list
evaluatesto the corresponding value in the value
list. |
java.lang.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() |
java.util.Iterator<TableModificationListener> |
getTableModificationListeners() |
java.lang.String |
getType()
Get the type of this table.
|
boolean |
hasColumn(ColumnIdentifier id)
Indicate whether the
ColumnIdentifierreferences a column in this table |
boolean |
hasIndex(java.lang.String name) |
boolean |
isColumnIndexed(Column column)
|
boolean |
isPrimaryKeyConstraintExists(java.lang.String columnName)
check if primary constraint exists on a column
|
boolean |
isUniqueConstraintExists(java.lang.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(java.io.File dir,
boolean dataOnly)
Notify this table that its disk-location has moved.
|
Constraint |
removeConstraint(java.lang.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(java.lang.String oldName,
java.lang.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. |
static final java.lang.String REGULAR_TABLE_TYPE
static final java.lang.String SYSTEM_TABLE_TYPE
void addColumn(Column col) throws AxionException
Columnto this table.AxionExceptionvoid addConstraint(Constraint constraint) throws AxionException
AxionExceptionvoid addIndex(Index index) throws AxionException
Column, and adding it as a
org.axiondb.TableModificationListenerto the table.void addRow(Row row) throws AxionException
Row.AxionExceptionvoid addTableModificationListener(TableModificationListener listener)
java.util.Iterator<TableModificationListener> getTableModificationListeners()
void applyDeletes(org.apache.commons.collections.primitives.IntCollection rowids)
throws AxionException
AxionExceptionvoid applyInserts(RowCollection rows) throws AxionException
rows - a collection of RowsAxionExceptionvoid applyUpdates(RowCollection rows) throws AxionException
AxionExceptionvoid drop() throws AxionException
AxionExceptionvoid freeRowId(int id)
Column getColumn(int index)
Columncorresponding to the given zero-based index .int getColumnCount()
Columns I contain.getColumnCount in interface RowSourcejava.util.List getColumnIdentifiers()
int getColumnIndex(java.lang.String name)
throws AxionException
Columnwith the given name .getColumnIndex in interface RowSourceAxionExceptionjava.util.Iterator getConstraints()
RowIterator getIndexedRows(Selectable where, boolean readOnly) throws AxionException
readOnly - 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.AxionExceptionRowIterator getIndexedRows(RowSource source, Selectable where, boolean readOnly) throws AxionException
AxionExceptionjava.util.Iterator<Index> getIndices()
Iteratorover my indices.RowIterator getMatchingRows(java.util.List selectables, java.util.List values, boolean readOnly) throws AxionException
iteratorover 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.
AxionExceptionjava.lang.String getName()
int getNextRowId()
int getRowCount()
Rows I contain.RowIterator getRowIterator(boolean readOnly) throws AxionException
readOnly - 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.AxionExceptionjava.lang.String getType()
boolean hasColumn(ColumnIdentifier id)
ColumnIdentifierreferences a column in this tableboolean hasIndex(java.lang.String name)
throws AxionException
AxionExceptionboolean isColumnIndexed(Column column)
boolean isPrimaryKeyConstraintExists(java.lang.String columnName)
ColumnName - name of the columnboolean isUniqueConstraintExists(java.lang.String columnName)
columnName - name of the colummRowDecorator makeRowDecorator()
makeRowDecorator in interface RowSourceTransactableTable makeTransactableTable()
TransactableTablefor this table.void migrate()
throws AxionException
AxionExceptionvoid populateIndex(Index index) throws AxionException
index - AxionExceptionaddIndex(org.axiondb.Index)void remount(java.io.File dir,
boolean dataOnly)
throws AxionException
AxionExceptionConstraint removeConstraint(java.lang.String name)
Constraint getConstraint(java.lang.String name)
void removeIndex(Index index) throws AxionException
index - AxionExceptionvoid removeTableModificationListener(TableModificationListener listener)
void rename(java.lang.String oldName,
java.lang.String newName)
throws AxionException
AxionExceptionvoid shutdown()
throws AxionException
AxionExceptionvoid truncate()
throws AxionException
AxionExceptionvoid updateRow(Row oldrow, Row newrow) throws AxionException
Row.AxionExceptionvoid deleteRow(Row row) throws AxionException
Row.AxionExceptionvoid checkpoint()
throws AxionException
AxionExceptionvoid setSequence(Sequence seq) throws AxionException
AxionExceptionSequence getSequence()
void setDeferAllConstraints(boolean deferAll)