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 booleanFlag indicating whether the table name is case sensitive or not.protected DBTableDatabase description of the resulting (temporary) table.static final LanguageFeatureDescription of this ADQL Feature.protected StringName of the resulting table.protected TextPositionPosition of this WITH item in the original ADQL query.protected ADQLSetADQL 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 DBTableDatabase description of this CTE.final LanguageFeatureGet the description of this ADQL's Language Feature.final StringgetLabel()Get the name of the resulting table.final StringgetName()Gets the name of this object in ADQL.final TextPositionGets the position of this object/token in the ADQL query.final ADQLSetgetQuery()Get the query corresponding to this CTE.DBColumn[]Get the description of all output columns.final booleanTell whether the resulting table name is case sensitive or not.final voidSet the database description of this CTE.final voidSet the name of the resulting table.final voidsetLabelCaseSensitive(boolean caseSensitive) Specify whether the resulting table name should be case sensitive or not.final voidsetPosition(TextPosition newPosition) final voidSet 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:ADQLObjectGets the name of this object in ADQL.- Specified by:
getNamein interfaceADQLObject- Returns:
- The name of this ADQL object.
-
getFeatureDescription
Description copied from interface:ADQLObjectGet 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:
getFeatureDescriptionin 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:
trueif the CTE's name is case sensitive,falseotherwise.
-
setLabelCaseSensitive
public final void setLabelCaseSensitive(boolean caseSensitive) Specify whether the resulting table name should be case sensitive or not.- Parameters:
caseSensitive-trueto make the CTE's name case sensitive,falseotherwise.
-
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:ADQLObjectGets the position of this object/token in the ADQL query.By default, no position should be set.
- Specified by:
getPositionin 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:ADQLObjectGets a (deep) copy of this ADQL object.- Specified by:
getCopyin interfaceADQLObject- Returns:
- The copy of this ADQL object.
- Throws:
Exception- If there is any error during the copy.
-
adqlIterator
Description copied from interface:ADQLObjectGets an iterator on the intern ADQL objects.Note: The returned iterator is particularly used by a
ISearchHandlerextension to browse a whole ADQL tree.- Specified by:
adqlIteratorin interfaceADQLObject- Returns:
- An ADQL objects iterator.
- See Also:
-
toADQL
Description copied from interface:ADQLObjectGets the ADQL expression of this object.- Specified by:
toADQLin interfaceADQLObject- Returns:
- The corresponding ADQL expression.
-
getResultingColumns
Get the description of all output columns.- Returns:
- List and description of all output columns.
-