Package adql.query

Class ClauseADQL<T extends ADQLObject>

  • All Implemented Interfaces:
    ADQLObject, java.lang.Iterable<T>
    Direct Known Subclasses:
    ClauseConstraints, ClauseSelect

    public class ClauseADQL<T extends ADQLObject>
    extends ADQLList<T>
    Represents an ADQL clause (i.e. SELECT, FROM, WHERE, ...).
    Version:
    1.2 (12/2013)
    Author:
    Grégory Mantelet (CDS;ARI)
    • Constructor Detail

      • ClauseADQL

        public ClauseADQL()
        Builds an anonymous ClauseADQL.
      • ClauseADQL

        public ClauseADQL​(java.lang.String name)
        Builds a ClauseADQL considering its name.
        Parameters:
        name - List label.
      • ClauseADQL

        public ClauseADQL​(ADQLList<T> toCopy)
                   throws java.lang.Exception
        Builds a ClauseADQL by copying the given one. It copies also all the list items of the given ClauseADQL.
        Parameters:
        toCopy - The ClauseADQL to copy.
        Throws:
        java.lang.Exception - If there is an unexpected error during the copy.
    • Method Detail

      • getCopy

        public ADQLObject getCopy()
                           throws java.lang.Exception
        Description copied from interface: ADQLObject
        Gets a (deep) copy of this ADQL object.
        Specified by:
        getCopy in interface ADQLObject
        Specified by:
        getCopy in class ADQLList<T extends ADQLObject>
        Returns:
        The copy of this ADQL object.
        Throws:
        java.lang.Exception - If there is any error during the copy.
      • getSeparator

        public java.lang.String getSeparator​(int index)
                                      throws java.lang.ArrayIndexOutOfBoundsException
        Returns always ",", except if the index is incorrect (index <= 0 or index >= size()).
        Specified by:
        getSeparator in class ADQLList<T extends ADQLObject>
        Parameters:
        index - Index of the right list item.
        Returns:
        The corresponding separator.
        Throws:
        java.lang.ArrayIndexOutOfBoundsException - If the index is less or equal than 0, or is greater or equal than size().
        See Also:
        ADQLList.getSeparator(int)