Package adql.query.constraint
Class IsNull
java.lang.Object
adql.query.constraint.IsNull
- All Implemented Interfaces:
ADQLObject
,ADQLConstraint
Represents a comparison between a column to the NULL value.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBuilds a IsNull constraint by copying the given one.IsNull
(ADQLColumn column) Builds a comparison between the given column and NULL.IsNull
(ADQLColumn column, boolean isNot) Builds a comparison between the column and NULL. -
Method Summary
Modifier and TypeMethodDescriptionGets an iterator on the intern ADQL objects.final ADQLColumn
Gets the column whose the value is compared to NULL.getCopy()
Gets a (deep) copy of this ADQL object.final LanguageFeature
Get the description of this ADQL's Language Feature.getName()
Gets the name of this object in ADQL.final TextPosition
Gets the position of this object/token in the ADQL query.final boolean
Tells whether the predicate is IS NULL or IS NOT NULL.final void
setColumn
(ADQLColumn column) Lets changing the column whose the value must be compared to NULL.final void
setNotNull
(boolean notNull) Lets indicating which predicate must be used (IS NULL or IS NOT NULL).final void
setPosition
(TextPosition position) Set the position of thisIsNull
in the given ADQL query string.toADQL()
Gets the ADQL expression of this object.
-
Field Details
-
FEATURE
Description of this ADQL Feature.- Since:
- 2.0
-
-
Constructor Details
-
IsNull
Builds a comparison between the given column and NULL.- Parameters:
column
- The column whose the value must be compared to NULL.- Throws:
NullPointerException
- If the given column is NULL.
-
IsNull
Builds a comparison between the column and NULL.- Parameters:
column
- The column whose the value must be compared to NULL.isNot
-true
means IS NOT NULL,false
means IS NULL.- Throws:
NullPointerException
- If the given column is NULL.
-
IsNull
Builds a IsNull constraint by copying the given one.- Parameters:
toCopy
- The IsNull to copy.- Throws:
Exception
- If there is an error during the copy.
-
-
Method Details
-
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.
-
getColumn
Gets the column whose the value is compared to NULL.- Returns:
- The column compared to NULL.
-
setColumn
Lets changing the column whose the value must be compared to NULL.- Parameters:
column
- The new column to compare to NULL.- Throws:
NullPointerException
- If the given column is NULL.
-
isNotNull
public final boolean isNotNull()Tells whether the predicate is IS NULL or IS NOT NULL.- Returns:
true
for IS NOT NULL,false
for IS NULL.
-
setNotNull
public final void setNotNull(boolean notNull) Lets indicating which predicate must be used (IS NULL or IS NOT NULL).- Parameters:
notNull
-true
for IS NOT NULL,false
for IS NULL.
-
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
Set the position of thisIsNull
in the given ADQL query string.- Parameters:
position
- New position of thisIsNull
.- Since:
- 1.4
-
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.
-
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.
-
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.
-