Package adql.db

Class DBTableAlias

All Implemented Interfaces:
DBTable, Iterable<DBColumn>

public class DBTableAlias extends DefaultDBTable
This 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().

Since:
1.4
Version:
1.4 (11/2017)
Author:
Grégory Mantelet (ARI)
  • Field Details

    • originTable

      protected final DBTable originTable
      Wrapped table.
  • Constructor Details

    • DBTableAlias

      public DBTableAlias(DBTable originTable, String tableAlias)
      Wrap the given table under the given ADQL/DB name.
      Parameters:
      originTable - The table to wrap/alias.
      tableAlias - The alias name.
  • Method Details

    • getOriginTable

      public DBTable getOriginTable()
      Get the aliased/wrapped table.
      Returns:
      The aliased table.