Package adql.db
Class DefaultDBColumn
java.lang.Object
adql.db.DefaultDBColumn
- All Implemented Interfaces:
DBColumn
Default implementation of
DBColumn
.- Version:
- 1.4 (08/2015)
- Author:
- Grégory Mantelet (CDS;ARI)
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefaultDBColumn
(String dbName, DBTable table) Builds a defaultDBColumn
with the given DB name and DB table.DefaultDBColumn
(String dbName, DBType type, DBTable table) Builds a defaultDBColumn
with the given DB name and DB table.DefaultDBColumn
(String dbName, String adqlName, DBTable table) Builds a defaultDBColumn
with the given DB name, DB table and ADQL name.DefaultDBColumn
(String dbName, String adqlName, DBType type, DBTable table) Builds a defaultDBColumn
with the given DB name, DB table and ADQL name. -
Method Summary
Modifier and TypeMethodDescriptionMakes a copy of this instance ofDBColumn
.final String
Gets the name of this column (without any prefix and double-quotes).final DBType
Get the type of this column (as closed as possible from the "database" type).final String
Gets the name of this column in the "database".final DBTable
getTable()
Gets the table which contains thisDBColumn
.final void
setADQLName
(String adqlName) final void
setDatatype
(DBType type) Set the type of this column.final void
-
Field Details
-
dbName
Name of the column in the "database". -
type
Type of the column in the "database". Note: This should be one of the types listed by the IVOA in the TAP description.- Since:
- 1.3
-
table
Table in which this column exists. -
adqlName
Name that this column must have in ADQL queries.
-
-
Constructor Details
-
DefaultDBColumn
Builds a defaultDBColumn
with the given DB name and DB table.- Parameters:
dbName
- Database column name (it will be also used for the ADQL name). Only the column name is expected. Contrary toDefaultDBTable
, if a whole column reference is given, no split will be done.table
- DB table which contains this column.- See Also:
-
DefaultDBColumn
Builds a defaultDBColumn
with the given DB name and DB table.- Parameters:
dbName
- Database column name (it will be also used for the ADQL name). Only the column name is expected. Contrary toDefaultDBTable
, if a whole column reference is given, no split will be done.type
- Type of the column. Note: there is no default value. Consequently if this parameter is NULL, the type should be considered as unknown. It means that any comparison with any type will always return 'true'.table
- DB table which contains this column.- Since:
- 1.3
- See Also:
-
DefaultDBColumn
Builds a defaultDBColumn
with the given DB name, DB table and ADQL name.- Parameters:
dbName
- Database column name. Only the column name is expected. Contrary toDefaultDBTable
, if a whole column reference is given, no split will be done.adqlName
- Column name used in ADQL queries. Only the column name is expected. Contrary toDefaultDBTable
, if a whole column reference is given, no split will be done.table
- DB table which contains this column.- See Also:
-
DefaultDBColumn
Builds a defaultDBColumn
with the given DB name, DB table and ADQL name.- Parameters:
dbName
- Database column name. Only the column name is expected. Contrary toDefaultDBTable
, if a whole column reference is given, no split will be done. REQUIRED parameter: it must be not NULL.adqlName
- Column name used in ADQL queries. Only the column name is expected. Contrary toDefaultDBTable
, if a whole column reference is given, no split will be done. If NULL, it will be set to dbName.type
- Type of the column. Note: there is no default value. Consequently if this parameter is NULL, the type should be considered as unknown. It means that any comparison with any type will always return 'true'.table
- DB table which contains this column.- Since:
- 1.3
-
-
Method Details
-
getADQLName
Description copied from interface:DBColumn
Gets the name of this column (without any prefix and double-quotes).- Specified by:
getADQLName
in interfaceDBColumn
- Returns:
- Its ADQL name.
-
setADQLName
-
getDatatype
Description copied from interface:DBColumn
Get the type of this column (as closed as possible from the "database" type).
Note: The returned type should be as closed as possible from a type listed by the IVOA in the TAP protocol description into the section UPLOAD.
- Specified by:
getDatatype
in interfaceDBColumn
- Returns:
- Its type.
-
setDatatype
Set the type of this column.
Note 1: The given type should be as closed as possible from a type listed by the IVOA in the TAP protocol description into the section UPLOAD.
Note 2: there is no default value. Consequently if this parameter is NULL, the type should be considered as unknown. It means that any comparison with any type will always return 'true'.
- Parameters:
type
- New type of this column.- Since:
- 1.3
-
getDBName
Description copied from interface:DBColumn
Gets the name of this column in the "database". -
getTable
Description copied from interface:DBColumn
Gets the table which contains thisDBColumn
. -
setTable
-
copy
Description copied from interface:DBColumn
Makes a copy of this instance ofDBColumn
.
-