|
||||||||||
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.AbstractBaseTable
org.axiondb.engine.TransactableTableImpl
public final class TransactableTableImpl
An implemenation of TransactableTable
.
Field Summary |
---|
Fields inherited from interface org.axiondb.Table |
---|
REGULAR_TABLE_TYPE, SYSTEM_TABLE_TYPE |
Constructor Summary | |
---|---|
TransactableTableImpl(Table table)
|
Method Summary | |
---|---|
void |
addColumn(Column col)
Add the given Column to 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.TableModificationListener to the table. |
void |
addRow(Row row)
Insert the given Row . |
void |
apply()
Apply this committed transaction.. |
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 |
commit()
This transaction has been committed. |
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 Column corresponding to the given zero-based index . |
Column |
getColumn(String name)
Return the Column for the given name . |
int |
getColumnCount()
Return the number of Column s I contain. |
List |
getColumnIdentifiers()
Return an readonly List over the ColumnIdentifiers for
my Column s. |
int |
getColumnIndex(String name)
Return the zero-based index of the Column with the given name . |
Constraint |
getConstraint(String name)
|
Iterator |
getConstraints()
|
RowIterator |
getIndexedRows(RowSource source,
Selectable node,
boolean readOnly)
|
RowIterator |
getIndexedRows(Selectable node,
boolean readOnly)
|
Index |
getIndexForColumn(Column column)
Return the first Index that pertains to the given Column , or
null if no such Index exists. |
Iterator |
getIndices()
Obtain an Iterator over my indices. |
String |
getName()
Get the name of this table. |
int |
getNextRowId()
Reserve a row id. |
Row |
getRow(int id)
|
int |
getRowCount()
Return the number of Row s I contain. |
RowIterator |
getRowIterator(boolean readOnly)
Obtain an iterator over my Row s. |
Sequence |
getSequence()
|
Table |
getTable()
|
String |
getType()
Get the type of this table. |
boolean |
hasColumn(ColumnIdentifier id)
Indicate whether the ColumnIdentifier references a column in this table |
boolean |
hasIndex(String name)
|
boolean |
isColumnIndexed(Column column)
Check to see if an Index exists for the given Column |
protected boolean |
isDeferAll()
|
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 TransactableTable 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 |
rename(String oldName,
String newName)
|
void |
rollback()
This transaction has been aborted. |
void |
setDeferAllConstraints(boolean deferAll)
|
void |
setSequence(Sequence seq)
|
void |
shutdown()
The database is shutting down, shutdown this table also. |
String |
toString()
|
void |
truncate()
Unconditionally delete all rows in this table. |
void |
updateRow(Row oldrow,
Row newrow)
Update the given Row . |
Methods inherited from class org.axiondb.engine.tables.AbstractBaseTable |
---|
checkConstraints, checkConstraints, checkConstraints, getMatchingRows, hasDeferredConstraint, migrate |
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, getMatchingRows, getTableModificationListeners, migrate, removeTableModificationListener |
Constructor Detail |
---|
public TransactableTableImpl(Table table)
Method Detail |
---|
public final String getName()
Table
getName
in interface Table
public final Table getTable()
public final String getType()
Table
getType
in interface Table
public final RowDecorator makeRowDecorator()
makeRowDecorator
in interface RowSource
makeRowDecorator
in interface Table
public void addConstraint(Constraint constraint) throws AxionException
addConstraint
in interface Table
AxionException
public Constraint removeConstraint(String name)
removeConstraint
in interface Table
public final Constraint getConstraint(String name)
getConstraint
in interface Table
public final Iterator getConstraints()
getConstraints
in interface Table
public boolean isUniqueConstraintExists(String columnName)
isUniqueConstraintExists
in interface Table
columnName
- name of the columm
public boolean isPrimaryKeyConstraintExists(String columnName)
isPrimaryKeyConstraintExists
in interface Table
ColumnName
- name of the column
public void addIndex(Index index) throws AxionException
Table
Column
, and adding it as a
org.axiondb.TableModificationListener
to the table.
addIndex
in interface Table
AxionException
Table.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 Table
AxionException
public final boolean hasIndex(String name) throws AxionException
hasIndex
in interface Table
AxionException
public final void populateIndex(Index index) throws AxionException
Table
Index
, adding my current rows to it. Does not
add
the index.
populateIndex
in interface Table
AxionException
Table.addIndex(org.axiondb.Index)
public final Index getIndexForColumn(Column column)
Table
Index
that pertains to the given Column
, or
null
if no such Index
exists.
getIndexForColumn
in interface Table
Column
, or null
if no such
Index
existspublic final boolean isColumnIndexed(Column column)
Table
Index
exists for the given Column
isColumnIndexed
in interface Table
column
- Column
to check
Index
for the given Column
public void addColumn(Column col) throws AxionException
Table
Column
to this table.
addColumn
in interface Table
AxionException
public final Column getColumn(int index)
Table
Column
corresponding to the given zero-based index .
getColumn
in interface Table
public final Column getColumn(String name)
Table
Column
for the given name .
getColumn
in interface Table
public final boolean hasColumn(ColumnIdentifier id)
Table
ColumnIdentifier
references a column in this table
hasColumn
in interface Table
public final int getColumnIndex(String name) throws AxionException
Table
Column
with the given name .
getColumnIndex
in interface RowSource
getColumnIndex
in interface Table
AxionException
public final List getColumnIdentifiers()
Table
List
over the ColumnIdentifiers
for
my Column
s.
getColumnIdentifiers
in interface Table
public final int getColumnCount()
Table
Column
s I contain.
getColumnCount
in interface RowSource
getColumnCount
in interface Table
public final Iterator getIndices()
Table
Iterator
over my indices.
getIndices
in interface Table
public void addRow(Row row) throws AxionException
Table
Row
.
addRow
in interface Table
AxionException
public RowIterator getRowIterator(boolean readOnly) throws AxionException
Table
iterator
over my Row
s.
getRowIterator
in interface Table
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.
AxionException
public RowIterator getIndexedRows(Selectable node, boolean readOnly) throws AxionException
getIndexedRows
in interface Table
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.
AxionException
public RowIterator getIndexedRows(RowSource source, Selectable node, boolean readOnly) throws AxionException
getIndexedRows
in interface Table
AxionException
public final int getRowCount()
Table
Row
s I contain.
getRowCount
in interface Table
public final int getNextRowId()
Table
getNextRowId
in interface Table
public final void freeRowId(int id)
Table
freeRowId
in interface Table
public void drop() throws AxionException
Table
drop
in interface Table
AxionException
public void checkpoint() throws AxionException
checkpoint
in interface Table
AxionException
public void shutdown() throws AxionException
Table
shutdown
in interface Table
AxionException
public void setDeferAllConstraints(boolean deferAll)
setDeferAllConstraints
in interface Table
setDeferAllConstraints
in class BaseTableModificationPublisher
public void setSequence(Sequence seq) throws AxionException
setSequence
in interface Table
AxionException
public final Sequence getSequence()
getSequence
in interface Table
public void remount(File dir, boolean dataOnly) throws AxionException
Table
remount
in interface Table
AxionException
public void rename(String oldName, String newName) throws AxionException
rename
in interface Table
AxionException
public Row getRow(int id) throws AxionException
getRow
in interface RowSource
AxionException
public final void applyInserts(RowCollection rows) throws AxionException
Table
applyInserts
in interface Table
rows
- a collection of Rows
AxionException
public final void applyDeletes(org.apache.commons.collections.primitives.IntCollection rowids) throws AxionException
Table
applyDeletes
in interface Table
AxionException
public final void applyUpdates(RowCollection rows) throws AxionException
Table
applyUpdates
in interface Table
AxionException
public void commit() throws AxionException
Transactable
commit
in interface Transactable
AxionException
public void rollback() throws AxionException
Transactable
rollback
in interface Transactable
AxionException
public void apply() throws AxionException
Transactable
committed
transaction..
apply
in interface Transactable
AxionException
public final TransactableTable makeTransactableTable()
Table
TransactableTable
for this table.
makeTransactableTable
in interface Table
public void deleteRow(Row row) throws AxionException
Table
Row
.
deleteRow
in interface Table
AxionException
public void updateRow(Row oldrow, Row newrow) throws AxionException
Table
Row
.
updateRow
in interface Table
AxionException
protected final boolean isDeferAll()
isDeferAll
in class AbstractBaseTable
public void truncate() throws AxionException
Table
truncate
in interface Table
AxionException
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |