Package adql.query

Class SetOperation

java.lang.Object
adql.query.ADQLSet
adql.query.SetOperation
All Implemented Interfaces:
ADQLObject

public class SetOperation extends ADQLSet
It represents an operation between two rows sets (UNION, EXCEPT, INTERSECT).
Since:
2.0
See Also:
  • Constructor Details

  • Method Details

    • getName

      public String getName()
      Description copied from interface: ADQLObject
      Gets the name of this object in ADQL.
      Returns:
      The name of this ADQL object.
    • getLeftSet

      public ADQLSet getLeftSet()
      Gets the left set.
      Returns:
      The left set.
    • setLeftSet

      public void setLeftSet(ADQLSet newLeftSet) throws NullPointerException, UnsupportedOperationException
      Changes the left set of this set operation.
      Parameters:
      newLeftSet - The new left set of this set operation.
      Throws:
      NullPointerException - If the given set is NULL.
      UnsupportedOperationException
    • getOperation

      public SetOperationType getOperation()
      Gets the set operation type.
      Returns:
      The set operation type.
      See Also:
    • setOperation

      public void setOperation(SetOperationType newOperation)
      Changes the type of this set operation (UNION, EXCEPT, INTERSECT).
      Parameters:
      newOperation - The new type of this set operation.
      See Also:
    • isWithDuplicates

      public final boolean isWithDuplicates()
      Tell whether duplicate rows must be kept.
      Returns:
      true if duplicates must be preserved, false otherwise.
    • setWithDuplicates

      public final void setWithDuplicates(boolean withDuplicates)
      Parameters:
      withDuplicates - the withDuplicates to set
    • getRightSet

      public ADQLSet getRightSet()
      Gets the right set.
      Returns:
      The right set.
    • setRightSet

      public void setRightSet(ADQLSet newRightSet) throws NullPointerException, UnsupportedOperationException
      Changes the right set of this set operation.
      Parameters:
      newRightSet - The new right set of this set operation.
      Throws:
      NullPointerException - If the given set is NULL.
      UnsupportedOperationException
    • hasLimit

      public boolean hasLimit()
      Description copied from class: ADQLSet
      Indicates whether this rows set imposes a maximum number of rows.
      Specified by:
      hasLimit in class ADQLSet
      Returns:
      true this clause has a limited number of rows, false otherwise.
    • getLimit

      public int getLimit()
      Description copied from class: ADQLSet
      Gets the maximum number of rows imposed in this rows set.
      Specified by:
      getLimit in class ADQLSet
      Returns:
      Maximum number of rows the query must return.
    • setNoLimit

      public void setNoLimit()
      Description copied from class: ADQLSet
      Sets no maximum number of rows returned in this rows set.
      Specified by:
      setNoLimit in class ADQLSet
    • setLimit

      public void setLimit(int limit)
      Description copied from class: ADQLSet
      Changes the maximum number of rows returned in this rows set.
      Specified by:
      setLimit in class ADQLSet
      Parameters:
      limit - The maximum number of returned rows.
    • getResultingColumns

      public DBColumn[] getResultingColumns()
      Gets the list of columns (database metadata) selected by this set operation.
      Specified by:
      getResultingColumns in class ADQLSet
      Returns:
      Selected columns metadata.
    • getFeatureDescription

      public LanguageFeature 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.

      Returns:
      Description of this ADQL object as an ADQL's feature.
    • getCopy

      public ADQLObject getCopy() throws Exception
      Description copied from interface: ADQLObject
      Gets a (deep) copy of this ADQL object.
      Returns:
      The copy of this ADQL object.
      Throws:
      Exception - If there is any error during the copy.
    • adqlIterator

      public ADQLIterator 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.

      Returns:
      An ADQL objects iterator.
      See Also:
    • toADQL

      public String toADQL()
      Description copied from interface: ADQLObject
      Gets the ADQL expression of this object.
      Returns:
      The corresponding ADQL expression.