public class DBTableAlias extends DefaultDBTable
DBTable
wraps another DBTable
with a different ADQL and
DB name.
This wrapper aims to represent in the metadata the aliasing of a table. This table should not be part of any schema, in ADQL but also in SQL...it is just an alias of an existing table.
All columns of the origin table are completely copied into this
DBTable
thanks to DBColumn.copy(String, String, DBTable)
,
with the same ADQL and DB name but a different parent table (this one is
used of the original one).
Note:
The origin table is still available thanks to the function
getOriginTable()
.
Modifier and Type | Field and Description |
---|---|
protected DBTable |
originTable
Wrapped table.
|
adqlCatalogName, adqlName, adqlSchemaName, columns, dbCatalogName, dbName, dbSchemaName
Constructor and Description |
---|
DBTableAlias(DBTable originTable,
java.lang.String tableAlias)
Wrap the given table under the given ADQL/DB name.
|
Modifier and Type | Method and Description |
---|---|
DBTable |
getOriginTable()
Get the aliased/wrapped table.
|
addAllColumns, addColumn, copy, getADQLCatalogName, getADQLName, getADQLSchemaName, getColumn, getDBCatalogName, getDBName, getDBSchemaName, hasColumn, iterator, joinTableName, setADQLCatalogName, setADQLName, setADQLSchemaName, splitTableName
protected final DBTable originTable
public DBTableAlias(DBTable originTable, java.lang.String tableAlias)
originTable
- The table to wrap/alias.tableAlias
- The alias name.public DBTable getOriginTable()