Class WithItem
- All Implemented Interfaces:
ADQLObject
A such table is defined inside the ADQL clause WITH
. It must
be an ADQL query with a name for the resulting temporary table. Labels of
the resulting columns may be also provided.
- Since:
- 2.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
Flag indicating whether the table name is case sensitive or not.protected DBTable
Database description of the resulting (temporary) table.static final LanguageFeature
Description of this ADQL Feature.protected String
Name of the resulting table.protected TextPosition
Position of this WITH item in the original ADQL query.protected ADQLSet
ADQL query providing the CTE's content. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets an iterator on the intern ADQL objects.getCopy()
Gets a (deep) copy of this ADQL object.final DBTable
Database description of this CTE.final LanguageFeature
Get the description of this ADQL's Language Feature.final String
getLabel()
Get the name of the resulting table.final String
getName()
Gets the name of this object in ADQL.final TextPosition
Gets the position of this object/token in the ADQL query.final ADQLSet
getQuery()
Get the query corresponding to this CTE.DBColumn[]
Get the description of all output columns.final boolean
Tell whether the resulting table name is case sensitive or not.final void
Set the database description of this CTE.final void
Set the name of the resulting table.final void
setLabelCaseSensitive
(boolean caseSensitive) Specify whether the resulting table name should be case sensitive or not.final void
setPosition
(TextPosition newPosition) final void
Set the query returning the content of this CTE.toADQL()
Gets the ADQL expression of this object.
-
Field Details
-
FEATURE
Description of this ADQL Feature. -
label
Name of the resulting table. -
caseSensitive
protected boolean caseSensitiveFlag indicating whether the table name is case sensitive or not. -
query
ADQL query providing the CTE's content. -
position
Position of this WITH item in the original ADQL query. -
dbLink
Database description of the resulting (temporary) table.
-
-
Constructor Details
-
WithItem
Create a WITH item.- Parameters:
label
- Name of the resulting table/CTE.query
- ADQL query returning the content of this CTE.
-
WithItem
Create a deep copy of the given WITH item.- Parameters:
toCopy
- The WITH item to duplicate.
-
-
Method Details
-
getName
Description copied from interface:ADQLObject
Gets the name of this object in ADQL.- Specified by:
getName
in interfaceADQLObject
- Returns:
- The name of this ADQL object.
-
getFeatureDescription
Description copied from interface:ADQLObject
Get the description of this ADQL's Language Feature.Note: Getting this description is generally only useful when discovery optional features so that determining if they are allowed to be used in ADQL queries.
- Specified by:
getFeatureDescription
in interfaceADQLObject
- Returns:
- Description of this ADQL object as an ADQL's feature.
-
getLabel
Get the name of the resulting table.- Returns:
- CTE's name.
-
setLabel
Set the name of the resulting table.Note: The given name may be delimited (i.e. surrounded by double quotes). If so, it will be considered as case sensitive. Surrounding double quotes will be removed and inner escaped double quotes will be un-escaped.
- Parameters:
label
- New CTE's name.- Throws:
NullPointerException
- If the given name is NULL or empty.
-
isLabelCaseSensitive
public final boolean isLabelCaseSensitive()Tell whether the resulting table name is case sensitive or not.- Returns:
true
if the CTE's name is case sensitive,false
otherwise.
-
setLabelCaseSensitive
public final void setLabelCaseSensitive(boolean caseSensitive) Specify whether the resulting table name should be case sensitive or not.- Parameters:
caseSensitive
-true
to make the CTE's name case sensitive,false
otherwise.
-
getQuery
Get the query corresponding to this CTE.- Returns:
- CTE's query.
-
setQuery
Set the query returning the content of this CTE.- Parameters:
query
- New CTE's query.
-
getDBLink
Database description of this CTE.- Returns:
- CTE's metadata.
-
setDBLink
Set the database description of this CTE.- Parameters:
dbMeta
- The new CTE's metadata.
-
getPosition
Description copied from interface:ADQLObject
Gets the position of this object/token in the ADQL query.By default, no position should be set.
- Specified by:
getPosition
in interfaceADQLObject
- Returns:
- Position of this ADQL item in the ADQL query, or NULL if not written originally in the query (for example, if added afterwards).
-
setPosition
-
getCopy
Description copied from interface:ADQLObject
Gets a (deep) copy of this ADQL object.- Specified by:
getCopy
in interfaceADQLObject
- Returns:
- The copy of this ADQL object.
- Throws:
Exception
- If there is any error during the copy.
-
adqlIterator
Description copied from interface:ADQLObject
Gets an iterator on the intern ADQL objects.Note: The returned iterator is particularly used by a
ISearchHandler
extension to browse a whole ADQL tree.- Specified by:
adqlIterator
in interfaceADQLObject
- Returns:
- An ADQL objects iterator.
- See Also:
-
toADQL
Description copied from interface:ADQLObject
Gets the ADQL expression of this object.- Specified by:
toADQL
in interfaceADQLObject
- Returns:
- The corresponding ADQL expression.
-
getResultingColumns
Get the description of all output columns.- Returns:
- List and description of all output columns.
-