public abstract class AbstractDatabaseConnection extends Object implements IDatabaseConnection
| Constructor and Description |
|---|
AbstractDatabaseConnection() |
| Modifier and Type | Method and Description |
|---|---|
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 resultName,
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 resultName,
PreparedStatement preparedStatement)
Creates a table using the given PreparedStatement to retrieve a ResultSet.
|
DatabaseConfig |
getConfig()
Returns this connection database configuration
|
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.
|
IStatementFactory |
getStatementFactory()
Deprecated.
Use
getConfig() |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitclose, getConnection, getSchemapublic IDataSet createDataSet() throws SQLException
IDatabaseConnectioncreateDataSet in interface IDatabaseConnectionSQLExceptionpublic IDataSet createDataSet(String[] tableNames) throws DataSetException, SQLException
IDatabaseConnectioncreateDataSet in interface IDatabaseConnectiontableNames - The tables for which a dataset shall be createdDataSetExceptionSQLExceptionpublic ITable createQueryTable(String resultName, String sql) throws DataSetException, SQLException
IDatabaseConnectioncreateQueryTable in interface IDatabaseConnectionresultName - The name to be returned by ITableMetaData.getTableName().sql - The SQL SELECT statementDataSetExceptionSQLExceptionpublic ITable createTable(String resultName, PreparedStatement preparedStatement) throws DataSetException, SQLException
IDatabaseConnectioncreateTable in interface IDatabaseConnectionresultName - The name to be returned by ITableMetaData.getTableName().preparedStatement - The statement to be executed as queryDataSetExceptionSQLExceptionpublic ITable createTable(String tableName) throws DataSetException, 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().DataSetExceptionSQLExceptionpublic int getRowCount(String tableName) throws SQLException
IDatabaseConnectiongetRowCount in interface IDatabaseConnectiontableName - the table nameSQLExceptionpublic int getRowCount(String tableName, String whereClause) throws SQLException
IDatabaseConnectiongetRowCount in interface IDatabaseConnectiontableName - the table namewhereClause - the where clauseSQLExceptionpublic DatabaseConfig getConfig()
IDatabaseConnectiongetConfig in interface IDatabaseConnection@Deprecated public IStatementFactory getStatementFactory()
getConfig()getStatementFactory in interface IDatabaseConnectionCopyright © 2002-2017. All Rights Reserved.