Package org.dbunit.database
Class ForwardOnlyResultSetTable
java.lang.Object
org.dbunit.dataset.AbstractTable
org.dbunit.database.AbstractResultSetTable
org.dbunit.database.ForwardOnlyResultSetTable
- All Implemented Interfaces:
IResultSetTable,ITable
IResultSetTable implementation backed by a forward-only, non-cached ResultSet.- Since:
- Apr 10, 2003
- Version:
- $Revision$
- Author:
- Manuel Laflamme
-
Field Summary
Fields inherited from class org.dbunit.database.AbstractResultSetTable
_metaData, _resultSet -
Constructor Summary
ConstructorsConstructorDescriptionForwardOnlyResultSetTable(String tableName, String selectStatement, IDatabaseConnection connection) Creates a table from a table name, SQL statement, and connection.ForwardOnlyResultSetTable(ITableMetaData metaData, ResultSet resultSet) Creates a table wrapping the given already-executed result set.ForwardOnlyResultSetTable(ITableMetaData metaData, IDatabaseConnection connection) Creates a table from a metadata descriptor and a connection, using a forward-only result set. -
Method Summary
Methods inherited from class org.dbunit.database.AbstractResultSetTable
close, createStatement, getTableMetaDataMethods inherited from class org.dbunit.dataset.AbstractTable
assertValidColumn, assertValidRowIndex, assertValidRowIndex, getColumnIndex
-
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:ITableReturns this table row count.- Returns:
- this table row count.
-
getValue
Description copied from interface:ITableReturns this table value for the specified row and column.- Parameters:
row- The row index, starting with 0columnName- The name of the column- Returns:
- The value
- Throws:
DataSetException
-
toString
- Overrides:
toStringin classAbstractResultSetTable
-