Class ForwardOnlyResultSetTable

All Implemented Interfaces:
IResultSetTable, ITable

public class ForwardOnlyResultSetTable extends AbstractResultSetTable
IResultSetTable implementation backed by a forward-only, non-cached ResultSet.
Since:
Apr 10, 2003
Version:
$Revision$
Author:
Manuel Laflamme
  • Constructor Details

    • ForwardOnlyResultSetTable

      public ForwardOnlyResultSetTable(ITableMetaData metaData, ResultSet resultSet) throws SQLException, DataSetException
      Creates a table wrapping the given already-executed result set.
      Parameters:
      metaData - the table metadata.
      resultSet - the result set backing this table's rows.
      Throws:
      SQLException - if statement creation or execution fails.
      DataSetException - if metadata retrieval fails.
    • ForwardOnlyResultSetTable

      public ForwardOnlyResultSetTable(ITableMetaData metaData, IDatabaseConnection connection) throws DataSetException, SQLException
      Creates a table from a metadata descriptor and a connection, using a forward-only result set.
      Parameters:
      metaData - the table metadata.
      connection - the database connection.
      Throws:
      DataSetException - if metadata retrieval fails.
      SQLException - if statement creation or execution fails.
    • ForwardOnlyResultSetTable

      public ForwardOnlyResultSetTable(String tableName, String selectStatement, IDatabaseConnection connection) throws DataSetException, SQLException
      Creates a table from a table name, SQL statement, and connection.
      Parameters:
      tableName - the table name.
      selectStatement - the SQL select statement.
      connection - the database connection.
      Throws:
      DataSetException - if metadata retrieval fails.
      SQLException - if statement creation or execution fails.
  • 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