Package org.dbunit.database
Interface IResultSetTableFactory
- All Known Implementing Classes:
CachedResultSetTableFactory,ForwardOnlyResultSetTableFactory
public interface IResultSetTableFactory
Factory that creates
IResultSetTable instances for a given query.- Since:
- Jul 17, 2003
- Version:
- $Revision$
- Author:
- manuel.laflamme
-
Method Summary
Modifier and TypeMethodDescriptioncreateTable(String tableName, String selectStatement, IDatabaseConnection connection) Creates a table from a table name and a SQL select statement.createTable(String tableName, PreparedStatement preparedStatement, IDatabaseConnection connection) Creates a table from a preparedStatementcreateTable(ITableMetaData metaData, IDatabaseConnection connection) Creates a table from a metadata descriptor and a connection.
-
Method Details
-
createTable
IResultSetTable createTable(String tableName, String selectStatement, IDatabaseConnection connection) throws SQLException, DataSetException Creates a table from a table name and a SQL select statement.- Parameters:
tableName- the table name.selectStatement- the SQL select statement.connection- the database connection.- Returns:
- The table based on the SQL result set.
- Throws:
SQLException- if executing the query fails.DataSetException- if metadata retrieval fails.
-
createTable
IResultSetTable createTable(ITableMetaData metaData, IDatabaseConnection connection) throws SQLException, DataSetException Creates a table from a metadata descriptor and a connection.- Parameters:
metaData- the table metadata.connection- the database connection.- Returns:
- The table based on the SQL result set.
- Throws:
SQLException- if executing the query fails.DataSetException- if metadata retrieval fails.
-
createTable
IResultSetTable createTable(String tableName, PreparedStatement preparedStatement, IDatabaseConnection connection) throws SQLException, DataSetException Creates a table from a preparedStatement- Parameters:
tableName- the table name.preparedStatement- the prepared statement to execute.connection- the database connection.- Returns:
- The table based on a SQL result set
- Throws:
SQLException- if executing the statement fails.DataSetException- if metadata retrieval fails.- Since:
- 2.4.4
-