Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.dbunit.database
Interface IDatabaseConnection  view IDatabaseConnection download IDatabaseConnection.java

All Known Implementing Classes:
AbstractDatabaseConnection, DatabaseConnection, DatabaseDataSourceConnection, MockDatabaseConnection

public interface IDatabaseConnection

This interface represents a connection to a specific database.

Since:
Mar 6, 2002
Version:
$Revision: 1.15 $

Method Summary
 void close()
          Close this connection.
 org.dbunit.dataset.IDataSet createDataSet()
          Creates a dataset corresponding to the entire database.
 org.dbunit.dataset.IDataSet createDataSet(java.lang.String[] tableNames)
          Creates a dataset containing only the specified tables from the database.
 org.dbunit.dataset.ITable createQueryTable(java.lang.String resultName, java.lang.String sql)
          Creates a table with the result of the specified SQL statement.
 DatabaseConfig getConfig()
          Returns this connection database configuration
 java.sql.Connection getConnection()
          Returns a JDBC database connection.
 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.
 java.lang.String getSchema()
          Returns the database schema name.
 org.dbunit.database.statement.IStatementFactory getStatementFactory()
          Deprecated. Use getConfig() 55
 

Method Detail

getConnection

public java.sql.Connection getConnection()
                                  throws java.sql.SQLException
Returns a JDBC database connection.


getSchema

public java.lang.String getSchema()
Returns the database schema name.


close

public void close()
           throws java.sql.SQLException
Close this connection.


createDataSet

public org.dbunit.dataset.IDataSet createDataSet()
                                          throws java.sql.SQLException
Creates a dataset corresponding to the entire database.


createDataSet

public org.dbunit.dataset.IDataSet createDataSet(java.lang.String[] tableNames)
                                          throws java.sql.SQLException
Creates a dataset containing only the specified tables from the database.


createQueryTable

public org.dbunit.dataset.ITable createQueryTable(java.lang.String resultName,
                                                  java.lang.String sql)
                                           throws org.dbunit.dataset.DataSetException,
                                                  java.sql.SQLException
Creates a table with the result of the specified SQL statement. The table can be the result of a join statement.


getRowCount

public int getRowCount(java.lang.String tableName)
                throws java.sql.SQLException
Returns the specified table row count.


getRowCount

public int getRowCount(java.lang.String tableName,
                       java.lang.String whereClause)
                throws java.sql.SQLException
Returns the specified table row count according specified where clause.


getConfig

public DatabaseConfig getConfig()
Returns this connection database configuration


getStatementFactory

public org.dbunit.database.statement.IStatementFactory getStatementFactory()
Deprecated. Use getConfig() 55