org.axiondb.engine.tables
Class ExternalDatabaseTable
public
class
ExternalDatabaseTable
extends Object
implements ExternalTable, TransactableTable
Base implementation of ExternalTable interface.
Example:
create external table emp (lname varchar(80), sid integer(6),
fname varchar(80), id integer(6) not null, dob timestamp(6))
organization (loadtype='remote' SERVER='myserver'
REMOTETABLE='mytablename' SCHEMA='myschema' WHERE='id > 1000');
Note : We have tested this for Oracle 8i/9i/10g , SQL Server, Sybase and DB2.
Version: $Revision: 1.27 $ $Date: 2006/01/10 21:02:36 $
Author: Jonathan Giron Rahul Dwivedi Ahimanikya Satapathy
See Also: DatabaseLink
Method Summary |
void | addColumn(Column col)
Add the given Columnto this table. |
void | addConstraint(Constraint constraint) |
void | addConstraint(Constraint constraint, boolean checkExistingRows) |
void | addIndex(Index index) |
void | addRow(Row row) |
void | addTableModificationListener(TableModificationListener listener) |
void | apply() |
void | applyDeletes(IntCollection rowIds) |
void | applyInserts(RowCollection rows) |
void | applyUpdates(RowCollection rows) |
protected void | checkConstraints(RowEvent event) |
void | checkpoint() |
void | commit() |
void | deleteRow(Row row) |
void | drop() |
void | freeRowId(int id) |
Column | getColumn(int index) |
Column | getColumn(String name) |
int | getColumnCount() |
List | getColumnIdentifiers() |
int | getColumnIndex(String name) |
Constraint | getConstraint(String name) |
Iterator | getConstraints() |
String | getDBLinkName() |
protected String | getDeleteSQL() |
RowIterator | getIndexedRows(RowSource source, Selectable node, boolean readOnly) |
RowIterator | getIndexedRows(Selectable node, boolean readOnly) |
Index | getIndexForColumn(Column column) |
Iterator | getIndices() |
protected String | getInsertSQL() |
RowIterator | getMatchingRows(List selectables, List values, boolean readOnly) |
String | getName() |
int | getNextRowId() |
Row | getRow(int id) |
int | getRowCount() |
RowIterator | getRowIterator(boolean readOnly) |
protected RowIterator | getRowIterator() |
protected String | getSchemaWildcardForRemoteDB()
Gets appropriate string for use in indicating wildcard search for schemas.
|
protected String | getSelectSQL(String where) |
Sequence | getSequence() |
Iterator | getTableModificationListeners() |
Properties | getTableProperties() |
String | getType() |
protected String | getUpdateSQL() |
boolean | hasColumn(ColumnIdentifier id) |
boolean | hasIndex(String name) |
boolean | isColumnIndexed(Column column) |
boolean | isPrimaryKeyConstraintExists(String columnName) |
boolean | isUniqueConstraintExists(String columnName)
check if unique constraint exists on a column
|
boolean | loadExternalTable(Properties props) |
RowDecorator | makeRowDecorator() |
TransactableTable | makeTransactableTable() |
void | migrate() |
void | populateIndex(Index index) |
void | remount() |
void | remount(File dir, boolean datafilesonly) |
Constraint | removeConstraint(String name) |
void | removeIndex(Index index) |
void | removeTableModificationListener(TableModificationListener listener) |
void | rename(String oldName, String newName) |
void | rollback() |
void | setDeferAllConstraints(boolean deferAll) |
void | setSequence(Sequence seq) |
protected void | setUp(DatabaseLink server) |
void | shutdown() |
String | toString() |
void | truncate() |
void | updateRow(Row oldrow, Row newrow) |
void | updateRow(Row oldrow, Row newrow, List cols) |
public ExternalDatabaseTable(String name,
Database db)
public void addColumn(
Column col)
Add the given
Columnto this table. This implementation throws an
AxionExceptionif rows have already been added to the table.
public void addConstraint(
Constraint constraint, boolean checkExistingRows)
public void addIndex(
Index index)
public void addRow(
Row row)
public void apply()
public void applyDeletes(IntCollection rowIds)
protected void checkConstraints(
RowEvent event)
public void checkpoint()
public void commit()
public void deleteRow(
Row row)
public void drop()
public void freeRowId(int id)
public final
Column getColumn(int index)
public
Column getColumn(String name)
public final int getColumnCount()
public List getColumnIdentifiers()
public int getColumnIndex(String name)
public final
Constraint getConstraint(String name)
public Iterator getConstraints()
public String getDBLinkName()
protected String getDeleteSQL()
public Iterator getIndices()
protected String getInsertSQL()
public
RowIterator getMatchingRows(List selectables, List values, boolean readOnly)
public final String getName()
public int getNextRowId()
public
Row getRow(int id)
public int getRowCount()
protected String getSchemaWildcardForRemoteDB()
Gets appropriate string for use in indicating wildcard search for schemas.
Returns: wildcard string.
protected String getSelectSQL(String where)
public Iterator getTableModificationListeners()
public Properties getTableProperties()
public final String getType()
protected String getUpdateSQL()
public boolean hasIndex(String name)
public boolean isColumnIndexed(
Column column)
public boolean isPrimaryKeyConstraintExists(String columnName)
public boolean isUniqueConstraintExists(String columnName)
check if unique constraint exists on a column
Parameters: columnName name of the column
Returns: true if uniqueConstraint exists on the column
public boolean loadExternalTable(Properties props)
public void migrate()
public void populateIndex(
Index index)
public void remount()
public void remount(File dir, boolean datafilesonly)
public void removeIndex(
Index index)
public void rename(String oldName, String newName)
public void rollback()
public void setDeferAllConstraints(boolean deferAll)
public void shutdown()
public String toString()
public void truncate()
public void updateRow(
Row oldrow,
Row newrow)
public void updateRow(
Row oldrow,
Row newrow, List cols)