Class PostgresTabularDataSetCollectionConnector

All Implemented Interfaces:
SecureConnectorExtension, ReadableTabularDataCollection, ReadableTabularDataSource, TabularDataCollection, WritableTabularDataSource, VirtualConnectorExtension

public class PostgresTabularDataSetCollectionConnector extends PostgresTabularDataSetConnector implements ReadableTabularDataCollection
PostgresTabularDataSetCollectionConnector presents the tables of one PostgreSQL schema as a collection of simple tables of data. One table is in focus at a time - it is chosen with setTableName(java.lang.String, java.lang.String) - and is read and written exactly as PostgresTabularDataSetConnector reads and writes its single table. As a source, the collection lists its tables with getTableNames() so that each can be brought into focus and read in turn; as a destination, a table is created in the schema the first time data is written to it.
  • Constructor Details

    • PostgresTabularDataSetCollectionConnector

      public PostgresTabularDataSetCollectionConnector()
  • Method Details

    • setTableName

      public void setTableName(String tableName, String tableDescription)
      Set up the table name for the tabular data set to focus on. This is in canonical word format where each word in the name should be capitalized, with spaces between the words. This format allows easy translation between different naming conventions.
      Specified by:
      setTableName in interface TabularDataCollection
      Parameters:
      tableName - name of the table
      tableDescription - optional description for the table - useful if the connector needs to set up a definition of the table.
    • getTableNames

      public List<String> getTableNames() throws ConnectorCheckedException
      Return the names of the tables in the schema, in canonical form so that they can be passed back to setTableName(java.lang.String, java.lang.String) and translated by a destination into its own naming convention.
      Specified by:
      getTableNames in interface ReadableTabularDataCollection
      Returns:
      list of table names (may be empty)
      Throws:
      ConnectorCheckedException - problem accessing the database