Class ScrollableResultSetTable

All Implemented Interfaces:
IResultSetTable, ITable

public class ScrollableResultSetTable extends AbstractResultSetTable
IResultSetTable implementation backed by a scrollable ResultSet cursor.
Since:
Feb 17, 2002
Version:
$Revision$
Author:
Manuel Laflamme
  • Constructor Details

    • ScrollableResultSetTable

      public ScrollableResultSetTable(ITableMetaData metaData, ResultSet resultSet) throws SQLException, DataSetException
      Creates a table wrapping the given, already-scrolled result set.
      Parameters:
      metaData - the table's metadata.
      resultSet - the scrollable result set to wrap.
      Throws:
      SQLException - if the result set is forward-only or a database access error occurs.
      DataSetException - if the row count cannot be determined.
    • ScrollableResultSetTable

      public ScrollableResultSetTable(ITableMetaData metaData, IDatabaseConnection connection) throws DataSetException, SQLException
      Creates a table that runs the default query for the given metadata and connection.
      Parameters:
      metaData - the table's metadata.
      connection - the database connection to query.
      Throws:
      DataSetException - if the row count cannot be determined.
      SQLException - if the result set is forward-only or a database access error occurs.
    • ScrollableResultSetTable

      public ScrollableResultSetTable(String tableName, String selectStatement, IDatabaseConnection connection) throws DataSetException, SQLException
      Creates a table that runs the given select statement.
      Parameters:
      tableName - the table's name.
      selectStatement - the SQL select statement to run.
      connection - the database connection to query.
      Throws:
      DataSetException - if the row count cannot be determined.
      SQLException - if the result set is forward-only or a database access error occurs.
  • Method Details

    • getRowCount

      public int getRowCount()
      Description copied from interface: ITable
      Returns this table row count.
      Returns:
      this table row count.
    • getValue

      public Object getValue(int row, String columnName) throws DataSetException
      Description copied from interface: ITable
      Returns this table value for the specified row and column.
      Parameters:
      row - The row index, starting with 0
      columnName - The name of the column
      Returns:
      The value
      Throws:
      DataSetException
    • toString

      public String toString()
      Overrides:
      toString in class AbstractResultSetTable