public abstract class AbstractDatabaseConnection extends java.lang.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(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() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitclose, getConnection, getSchemapublic IDataSet createDataSet() throws java.sql.SQLException
IDatabaseConnectioncreateDataSet in interface IDatabaseConnectionjava.sql.SQLExceptionpublic IDataSet createDataSet(java.lang.String[] tableNames) throws DataSetException, java.sql.SQLException
IDatabaseConnectioncreateDataSet in interface IDatabaseConnectiontableNames - The tables for which a dataset shall be createdDataSetExceptionjava.sql.SQLExceptionpublic ITable createQueryTable(java.lang.String resultName, java.lang.String sql) throws DataSetException, java.sql.SQLException
IDatabaseConnectioncreateQueryTable in interface IDatabaseConnectionresultName - The name to be returned by ITableMetaData.getTableName().sql - The SQL SELECT statementDataSetExceptionjava.sql.SQLExceptionpublic ITable createTable(java.lang.String resultName, java.sql.PreparedStatement preparedStatement) throws DataSetException, java.sql.SQLException
IDatabaseConnectioncreateTable in interface IDatabaseConnectionresultName - The name to be returned by ITableMetaData.getTableName().preparedStatement - The statement to be executed as queryDataSetExceptionjava.sql.SQLExceptionpublic 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().DataSetExceptionjava.sql.SQLExceptionpublic int getRowCount(java.lang.String tableName)
throws java.sql.SQLException
IDatabaseConnectiongetRowCount in interface IDatabaseConnectiontableName - the table namejava.sql.SQLExceptionpublic int getRowCount(java.lang.String tableName,
java.lang.String whereClause)
throws java.sql.SQLException
IDatabaseConnectiongetRowCount in interface IDatabaseConnectiontableName - the table namewhereClause - the where clausejava.sql.SQLExceptionpublic DatabaseConfig getConfig()
IDatabaseConnectiongetConfig in interface IDatabaseConnection@Deprecated public IStatementFactory getStatementFactory()
getConfig()getStatementFactory in interface IDatabaseConnectionpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2002-2018. All Rights Reserved.