|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dbunit.database.AbstractDatabaseConnection
public abstract class AbstractDatabaseConnection
| Constructor Summary | |
|---|---|
AbstractDatabaseConnection()
|
|
| Method Summary | |
|---|---|
IDataSet |
createDataSet()
Creates a dataset corresponding to the entire database. |
IDataSet |
createDataSet(java.lang.String[] tableNames)
Creates a dataset containing only the specified tables from the database. |
ITable |
createQueryTable(java.lang.String resultName,
java.lang.String sql)
Creates a table with the result of the specified SQL statement. |
ITable |
createTable(java.lang.String tableName)
Creates a table with the result of a select * from tableName SQL statement. |
ITable |
createTable(java.lang.String resultName,
java.sql.PreparedStatement preparedStatement)
Creates a table using the given PreparedStatement to retrieve a ResultSet. |
DatabaseConfig |
getConfig()
Returns this connection database configuration |
int |
getRowCount(java.lang.String tableName)
Returns the specified table row count. |
int |
getRowCount(java.lang.String tableName,
java.lang.String whereClause)
Returns the specified table row count according specified where clause. |
IStatementFactory |
getStatementFactory()
Deprecated. Use getConfig() |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.dbunit.database.IDatabaseConnection |
|---|
close, getConnection, getSchema |
| Constructor Detail |
|---|
public AbstractDatabaseConnection()
| Method Detail |
|---|
public IDataSet createDataSet()
throws java.sql.SQLException
IDatabaseConnection
createDataSet in interface IDatabaseConnectionjava.sql.SQLException
public IDataSet createDataSet(java.lang.String[] tableNames)
throws DataSetException,
java.sql.SQLException
IDatabaseConnection
createDataSet in interface IDatabaseConnectiontableNames - The tables for which a dataset shall be created
DataSetException
java.sql.SQLException
public ITable createQueryTable(java.lang.String resultName,
java.lang.String sql)
throws DataSetException,
java.sql.SQLException
IDatabaseConnection
createQueryTable in interface IDatabaseConnectionresultName - The name to be returned by ITableMetaData.getTableName().sql - The SQL SELECT statement
DataSetException
java.sql.SQLException
public ITable createTable(java.lang.String resultName,
java.sql.PreparedStatement preparedStatement)
throws DataSetException,
java.sql.SQLException
IDatabaseConnection
createTable in interface IDatabaseConnectionresultName - The name to be returned by ITableMetaData.getTableName().preparedStatement - The statement to be executed as query
DataSetException
java.sql.SQLException
public ITable createTable(java.lang.String tableName)
throws DataSetException,
java.sql.SQLException
IDatabaseConnectionselect * from tableName SQL statement.
createTable in interface IDatabaseConnectiontableName - The name of the database table to be queried which is also returned by
ITableMetaData.getTableName().
DataSetException
java.sql.SQLException
public int getRowCount(java.lang.String tableName)
throws java.sql.SQLException
IDatabaseConnection
getRowCount in interface IDatabaseConnectiontableName - the table name
java.sql.SQLException
public int getRowCount(java.lang.String tableName,
java.lang.String whereClause)
throws java.sql.SQLException
IDatabaseConnection
getRowCount in interface IDatabaseConnectiontableName - the table namewhereClause - the where clause
java.sql.SQLExceptionpublic DatabaseConfig getConfig()
IDatabaseConnection
getConfig in interface IDatabaseConnectionpublic IStatementFactory getStatementFactory()
getConfig()
getStatementFactory in interface IDatabaseConnectionpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||