Package adql.db
Class DBTableAlias
- java.lang.Object
-
- adql.db.DefaultDBTable
-
- adql.db.DBTableAlias
-
public class DBTableAlias extends DefaultDBTable
ThisDBTable
wraps anotherDBTable
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 toDBColumn.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()
.- Since:
- 1.4
- Version:
- 1.4 (11/2017)
- Author:
- Grégory Mantelet (ARI)
-
-
Field Summary
Fields Modifier and Type Field Description protected DBTable
originTable
Wrapped table.-
Fields inherited from class adql.db.DefaultDBTable
adqlCatalogName, adqlName, adqlSchemaName, columns, dbCatalogName, dbName, dbSchemaName
-
-
Constructor Summary
Constructors Constructor Description DBTableAlias(DBTable originTable, java.lang.String tableAlias)
Wrap the given table under the given ADQL/DB name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DBTable
getOriginTable()
Get the aliased/wrapped table.-
Methods inherited from class adql.db.DefaultDBTable
addAllColumns, addColumn, copy, getADQLCatalogName, getADQLName, getADQLSchemaName, getColumn, getDBCatalogName, getDBName, getDBSchemaName, hasColumn, iterator, joinTableName, setADQLCatalogName, setADQLName, setADQLSchemaName, splitTableName
-
-
-
-
Field Detail
-
originTable
protected final DBTable originTable
Wrapped table.
-
-
Constructor Detail
-
DBTableAlias
public DBTableAlias(DBTable originTable, java.lang.String tableAlias)
Wrap the given table under the given ADQL/DB name.- Parameters:
originTable
- The table to wrap/alias.tableAlias
- The alias name.
-
-
Method Detail
-
getOriginTable
public DBTable getOriginTable()
Get the aliased/wrapped table.- Returns:
- The aliased table.
-
-