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.
- Version:
- 1.4 (06/2015)
- Author:
- Grégory Mantelet (CDS;ARI)
-
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 ADQLColumnGets the column whose the value is compared to NULL.getCopy()Gets a (deep) copy of this ADQL object.getName()Gets the name of this object in ADQL.final TextPositionGets the position of this object/token in the ADQL query.final booleanTells whether the predicate is IS NULL or IS NOT NULL.final voidsetColumn(ADQLColumn column) Lets changing the column whose the value must be compared to NULL.final voidsetNotNull(boolean notNull) Lets indicating which predicate must be used (IS NULL or IS NOT NULL).final voidsetPosition(TextPosition position) Set the position of thisIsNullin the given ADQL query string.toADQL()Gets the ADQL expression of this object.
-
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
-
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: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
Set the position of thisIsNullin the given ADQL query string.- Parameters:
position- New position of thisIsNull.- Since:
- 1.4
-
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.
-
getName
Description copied from interface:ADQLObjectGets the name of this object in ADQL.- Specified by:
getNamein interfaceADQLObject- Returns:
- The name of this ADQL object.
-
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.
-