Package adql.db

Class SearchTableList

java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<E>
cds.utils.TextualSearchList<DBTable>
adql.db.SearchTableList
All Implemented Interfaces:
SearchTableApi, Serializable, Cloneable, Iterable<DBTable>, Collection<DBTable>, List<DBTable>, RandomAccess

public class SearchTableList extends cds.utils.TextualSearchList<DBTable> implements SearchTableApi
A list of DBTable elements ordered by their ADQL name in an ascending manner.

In addition to an ADQL name, DBTable elements can be searched by specifying their schema and catalog. These last information will be used only if the ADQL table name is ambiguous, otherwise all matching elements are returned.

See Also:
  • Constructor Details

    • SearchTableList

      public SearchTableList()
      Void constructor.
    • SearchTableList

      public SearchTableList(Collection<? extends DBTable> collection)
      Constructor by copy: all the elements of the given collection of DBTable are copied ordered into this list.
      Parameters:
      collection - Collection of DBTable to copy.
    • SearchTableList

      public SearchTableList(int initialCapacity)
      Constructor with the initial capacity.
      Parameters:
      initialCapacity - Initial capacity of this list.
  • Method Details

    • isDistinct

      public final boolean isDistinct()
      Tells whether multiple occurrences are allowed.
      Returns:
      true means that multiple occurrences are allowed, false otherwise.
    • setDistinct

      public final void setDistinct(boolean distinct)
      Lets indicating that multiple occurrences are allowed.
      Parameters:
      distinct - true means that multiple occurrences are allowed, false otherwise.
    • getCopy

      public SearchTableApi getCopy()
      Specified by:
      getCopy in interface SearchTableApi
    • search

      public List<DBTable> search(String tableName)
      Searches all DBTable elements which has the given name (case insensitive).
      Parameters:
      tableName - ADQL name of DBTable to search for.
      Returns:
      The corresponding DBTable elements.
      See Also:
      • TextualSearchList.get(String)
    • search

      public final List<DBTable> search(String catalog, String schema, String table)
      Searches all DBTable elements which have the given catalog, schema, and table name (case insensitive).
      Parameters:
      catalog - Catalog name.
      schema - Schema name.
      table - Table name.
      Returns:
      The list of all matching DBTable elements.
      See Also:
    • search

      public List<DBTable> search(ADQLTable table)
      Description copied from interface: SearchTableApi
      Searches all DBTable elements corresponding to the given ADQLTable (case insensitive).
      Specified by:
      search in interface SearchTableApi
      Parameters:
      table - An ADQLTable.
      Returns:
      The list of all corresponding DBTable elements.
    • search

      public List<DBTable> search(String catalog, String schema, String table, byte caseSensitivity)
      Searches all DBTable elements which have the given catalog, schema, and table name, with the specified case sensitivity.
      Parameters:
      catalog - Catalog name.
      schema - Schema name.
      table - Table name.
      caseSensitivity - Case sensitivity for each table parts (one bit by part ; 0=sensitive,1=insensitive ; see IdentifierField for more details).
      Returns:
      The list of all matching DBTable elements.
      See Also:
    • add

      public boolean add(DBTable item)
      Description copied from interface: SearchTableApi
      Adds the given object at the end of this list.
      Specified by:
      add in interface Collection<DBTable>
      Specified by:
      add in interface List<DBTable>
      Specified by:
      add in interface SearchTableApi
      Overrides:
      add in class cds.utils.TextualSearchList<DBTable>
      See Also: