|
||||||||||
| 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.ExternalAxionDBTable
public class ExternalAxionDBTable
Axion external table implementation of ExternalTable interface.
DatabaseLink,
ExternalDatabaseTable| Field Summary |
|---|
| Fields inherited from interface org.axiondb.ExternalTable |
|---|
COLUMNS_ARE_CASE_SENSITIVE, DELIMITED_TABLE_TYPE, EXTERNAL_DB_TABLE_TYPE, FW_TABLE_TYPE, PROP_CATALOG, PROP_CREATE_IF_NOT_EXIST, PROP_DB, PROP_LOADTYPE, PROP_ORDERBY, PROP_REMOTETABLE, PROP_SCHEMA, PROP_VENDOR, PROP_WHERE, TAGGED_EBCDIC_TABLE_TYPE |
| Fields inherited from interface org.axiondb.Table |
|---|
REGULAR_TABLE_TYPE, SYSTEM_TABLE_TYPE |
| Constructor Summary | |
|---|---|
ExternalAxionDBTable(java.lang.String name,
Database db)
|
|
| 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 |
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()
Return an readonly Listover the ColumnIdentifiersfor
my Columns. |
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()
|
java.lang.String |
getDBLinkName()
|
RowIterator |
getIndexedRows(RowSource source,
Selectable node,
boolean readOnly)
|
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. |
java.util.Iterator |
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. |
Row |
getRow(int id)
|
int |
getRowCount()
Return the number of Rows I contain. |
RowIterator |
getRowIterator(boolean readOnly)
Obtain an iteratorover my Rows. |
Sequence |
getSequence()
|
java.util.Properties |
getTableProperties()
Gets Organization Property. |
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)
Check to see if an Indexexists for the given 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 |
boolean |
loadExternalTable(java.util.Properties props)
Loads external data using the given properties table - should be called only once by the table factory. |
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()
|
void |
remount(java.io.File dir,
boolean datafilesonly)
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 |
rename(java.lang.String oldName,
java.lang.String newName)
|
void |
setSequence(Sequence seq)
|
void |
shutdown()
The database is shutting down, shutdown this table also. |
java.lang.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.event.BaseTableModificationPublisher |
|---|
addTableModificationListener, getTableModificationListeners, publishEvent, removeTableModificationListener, setDeferAllConstraints |
| 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, getTableModificationListeners, removeTableModificationListener, setDeferAllConstraints |
| Constructor Detail |
|---|
public ExternalAxionDBTable(java.lang.String name,
Database db)
| Method Detail |
|---|
public void addColumn(Column col)
throws AxionException
TableColumnto this table.
addColumn in interface TableAxionException
public void addConstraint(Constraint constraint)
throws AxionException
addConstraint in interface TableAxionException
public void addIndex(Index index)
throws AxionException
TableColumn, and adding it as a
org.axiondb.TableModificationListenerto the table.
addIndex in interface TableAxionExceptionTable.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 addRow(Row row)
throws AxionException
TableRow.
addRow in interface TableAxionException
public void applyDeletes(org.apache.commons.collections.primitives.IntCollection rowIds)
throws AxionException
Table
applyDeletes in interface TableAxionException
public void applyInserts(RowCollection rows)
throws AxionException
Table
applyInserts in interface Tablerows - a collection of Rows
AxionException
public void applyUpdates(RowCollection rows)
throws AxionException
Table
applyUpdates in interface TableAxionException
public void checkpoint()
throws AxionException
checkpoint in interface TableAxionException
public void deleteRow(Row row)
throws AxionException
TableRow.
deleteRow in interface TableAxionException
public void drop()
throws AxionException
Table
drop in interface TableAxionExceptionpublic void freeRowId(int id)
Table
freeRowId in interface Tablepublic Column getColumn(int index)
TableColumncorresponding to the given zero-based index .
getColumn in interface Tablepublic Column getColumn(java.lang.String name)
TableColumnfor the given name .
getColumn in interface Tablepublic int getColumnCount()
TableColumns I contain.
getColumnCount in interface RowSourcegetColumnCount in interface Tablepublic java.util.List getColumnIdentifiers()
TableListover the ColumnIdentifiersfor
my Columns.
getColumnIdentifiers in interface Table
public int getColumnIndex(java.lang.String name)
throws AxionException
TableColumnwith the given name .
getColumnIndex in interface RowSourcegetColumnIndex in interface TableAxionExceptionpublic java.util.Iterator getConstraints()
getConstraints in interface Tablepublic java.lang.String getDBLinkName()
public RowIterator getIndexedRows(RowSource source,
Selectable node,
boolean readOnly)
throws AxionException
getIndexedRows 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.
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 java.util.Iterator getIndices()
TableIteratorover my indices.
getIndices in interface Table
public RowIterator getMatchingRows(java.util.List selectables,
java.util.List values,
boolean readOnly)
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 TableAxionExceptionpublic java.lang.String getName()
Table
getName in interface Tablepublic int getNextRowId()
Table
getNextRowId in interface Table
public Row getRow(int id)
throws AxionException
getRow in interface RowSourceAxionExceptionpublic int getRowCount()
TableRows I contain.
getRowCount in interface Table
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.
AxionExceptionpublic Sequence getSequence()
getSequence in interface Tablepublic java.util.Properties getTableProperties()
ExternalTable
getTableProperties in interface ExternalTablepublic java.lang.String getType()
Table
getType in interface Tablepublic boolean hasColumn(ColumnIdentifier id)
TableColumnIdentifierreferences a column in this table
hasColumn in interface Table
public boolean hasIndex(java.lang.String name)
throws AxionException
hasIndex in interface TableAxionExceptionpublic boolean isColumnIndexed(Column column)
TableIndexexists for the given Column
isColumnIndexed in interface Tablecolumn - Columnto check
Indexfor the given Columnpublic boolean isPrimaryKeyConstraintExists(java.lang.String columnName)
Table
isPrimaryKeyConstraintExists in interface Tablepublic boolean isUniqueConstraintExists(java.lang.String columnName)
Table
isUniqueConstraintExists in interface TablecolumnName - name of the columm
public boolean loadExternalTable(java.util.Properties props)
throws AxionException
ExternalTable
loadExternalTable in interface ExternalTableprops - configuration properties for this external table
AxionExceptionpublic RowDecorator makeRowDecorator()
makeRowDecorator in interface RowSourcemakeRowDecorator in interface Tablepublic TransactableTable makeTransactableTable()
TableTransactableTablefor this table.
makeTransactableTable in interface Table
public void migrate()
throws AxionException
Table
migrate in interface TableAxionException
public void populateIndex(Index index)
throws AxionException
TableIndex, adding my current rows to it. Does not
addthe index.
populateIndex in interface TableAxionExceptionTable.addIndex(org.axiondb.Index)
public void remount()
throws AxionException
remount in interface ExternalTableAxionException
public void remount(java.io.File dir,
boolean datafilesonly)
throws AxionException
Table
remount in interface TableAxionExceptionpublic Constraint removeConstraint(java.lang.String name)
removeConstraint in interface Tablepublic Constraint getConstraint(java.lang.String name)
getConstraint in interface Table
public void removeIndex(Index index)
throws AxionException
Table
removeIndex in interface TableAxionException
public void rename(java.lang.String oldName,
java.lang.String newName)
throws AxionException
rename in interface TableAxionException
public void setSequence(Sequence seq)
throws AxionException
setSequence in interface TableAxionException
public void shutdown()
throws AxionException
Table
shutdown in interface TableAxionExceptionpublic java.lang.String toString()
toString in class java.lang.Object
public void truncate()
throws AxionException
Table
truncate in interface TableAxionException
public void updateRow(Row oldrow,
Row newrow)
throws AxionException
TableRow.
updateRow in interface TableAxionException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||