|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IDatabaseConnection
This interface represents a connection to a specific database.
| Method Summary | |
|---|---|
void |
close()
Close this connection. |
IDataSet |
createDataSet()
Creates a dataset corresponding to the entire database. |
IDataSet |
createDataSet(String[] tableNames)
Creates a dataset containing only the specified tables from the database. |
ITable |
createQueryTable(String tableName,
String sql)
Creates a table with the result of the specified SQL statement. |
ITable |
createTable(String tableName)
Creates a table with the result of a select * from tableName SQL statement. |
ITable |
createTable(String tableName,
PreparedStatement preparedStatement)
Creates a table using the given PreparedStatement to retrieve a ResultSet. |
DatabaseConfig |
getConfig()
Returns this connection database configuration |
Connection |
getConnection()
Returns a JDBC database connection. |
int |
getRowCount(String tableName)
Returns the specified table row count. |
int |
getRowCount(String tableName,
String whereClause)
Returns the specified table row count according specified where clause. |
String |
getSchema()
Returns the database schema name. |
IStatementFactory |
getStatementFactory()
Deprecated. Use getConfig() |
| Method Detail |
|---|
Connection getConnection()
throws SQLException
SQLExceptionString getSchema()
void close()
throws SQLException
SQLException
IDataSet createDataSet()
throws SQLException
SQLException
IDataSet createDataSet(String[] tableNames)
throws SQLException,
DataSetException
tableNames - The tables for which a dataset shall be created
SQLException
DataSetException
ITable createQueryTable(String tableName,
String sql)
throws DataSetException,
SQLException
tableName - The name to be returned by ITableMetaData.getTableName().sql - The SQL SELECT statement
DataSetException
SQLException
ITable createTable(String tableName,
PreparedStatement preparedStatement)
throws DataSetException,
SQLException
tableName - The name to be returned by ITableMetaData.getTableName().preparedStatement - The statement to be executed as query
DataSetException
SQLException
ITable createTable(String tableName)
throws DataSetException,
SQLException
select * from tableName SQL statement.
tableName - The name of the database table to be queried which is also returned by
ITableMetaData.getTableName().
DataSetException
SQLException
int getRowCount(String tableName)
throws SQLException
tableName - the table name
SQLException
int getRowCount(String tableName,
String whereClause)
throws SQLException
tableName - the table namewhereClause - the where clause
SQLExceptionDatabaseConfig getConfig()
IStatementFactory getStatementFactory()
getConfig()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||