public interface IDatabaseConnection
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close this connection.
|
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 tableName,
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 tableName,
java.sql.PreparedStatement preparedStatement)
Creates a table using the given PreparedStatement to retrieve a ResultSet.
|
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.
|
IStatementFactory |
getStatementFactory()
Deprecated.
Use
getConfig() |
java.sql.Connection getConnection()
throws java.sql.SQLException
java.sql.SQLExceptionjava.lang.String getSchema()
void close()
throws java.sql.SQLException
java.sql.SQLExceptionIDataSet createDataSet() throws java.sql.SQLException
java.sql.SQLExceptionIDataSet createDataSet(java.lang.String[] tableNames) throws java.sql.SQLException, DataSetException
tableNames - The tables for which a dataset shall be createdjava.sql.SQLExceptionDataSetExceptionITable createQueryTable(java.lang.String tableName, java.lang.String sql) throws DataSetException, java.sql.SQLException
tableName - The name to be returned by ITableMetaData.getTableName().sql - The SQL SELECT statementDataSetExceptionjava.sql.SQLExceptionITable createTable(java.lang.String tableName, java.sql.PreparedStatement preparedStatement) throws DataSetException, java.sql.SQLException
tableName - The name to be returned by ITableMetaData.getTableName().preparedStatement - The statement to be executed as queryDataSetExceptionjava.sql.SQLExceptionITable createTable(java.lang.String tableName) throws DataSetException, java.sql.SQLException
select * from tableName SQL statement.tableName - The name of the database table to be queried which is also returned by
ITableMetaData.getTableName().DataSetExceptionjava.sql.SQLExceptionint getRowCount(java.lang.String tableName)
throws java.sql.SQLException
tableName - the table namejava.sql.SQLExceptionint getRowCount(java.lang.String tableName,
java.lang.String whereClause)
throws java.sql.SQLException
tableName - the table namewhereClause - the where clausejava.sql.SQLExceptionDatabaseConfig getConfig()
IStatementFactory getStatementFactory()
getConfig()Copyright © 2002-2018. All Rights Reserved.