Uses of Interface
org.dbunit.database.IDatabaseConnection
Packages that use IDatabaseConnection
Package
Description
-
Uses of IDatabaseConnection in org.dbunit
Methods in org.dbunit that return IDatabaseConnectionModifier and TypeMethodDescriptionprotected abstract IDatabaseConnectionDatabaseTestCase.getConnection()Returns the test database connection.DataSourceDatabaseTester.getConnection()protected final IDatabaseConnectionDBTestCase.getConnection()DefaultDatabaseTester.getConnection()IDatabaseTester.getConnection()Returns the test database connection.JdbcDatabaseTester.getConnection()JndiDatabaseTester.getConnection()Methods in org.dbunit with parameters of type IDatabaseConnectionModifier and TypeMethodDescriptionstatic voidAssertion.assertEqualsByQuery(IDataSet expectedDataset, IDatabaseConnection connection, String sqlQuery, String tableName, String[] ignoreCols) Asserts that the specified dataset table matches the given query's result, ignoring the given columns.static voidAssertion.assertEqualsByQuery(ITable expectedTable, IDatabaseConnection connection, String tableName, String sqlQuery, String[] ignoreCols) Asserts that the specified table matches the given query's result, ignoring the given columns.voidAbstractDatabaseTester.closeConnection(IDatabaseConnection connection) protected voidDatabaseTestCase.closeConnection(IDatabaseConnection connection) Deprecated.voidIDatabaseTester.closeConnection(IDatabaseConnection connection) Deprecated.since 2.4.4 define a user definedIDatabaseTester.setOperationListener(IOperationListener)in advancevoidDefaultOperationListener.connectionRetrieved(IDatabaseConnection connection) voidIOperationListener.connectionRetrieved(IDatabaseConnection connection) Is invoked immediately after a connection was newly created or an existing connection is retrieved to do some work on it.DefaultPrepAndExpectedTestCase.loadTableDataFromDatabase(String tableName, IDatabaseConnection connection) Loads the given table's actual data from the database.voidDefaultOperationListener.operationSetUpFinished(IDatabaseConnection connection) voidIOperationListener.operationSetUpFinished(IDatabaseConnection connection) Notification of the completion of theIDatabaseTester.onSetup()method.voidDefaultOperationListener.operationTearDownFinished(IDatabaseConnection connection) voidIOperationListener.operationTearDownFinished(IDatabaseConnection connection) Notification of the completion of theIDatabaseTester.onTearDown()method Should close the given connection if desired.protected voidDefaultPrepAndExpectedTestCase.verifyData(IDatabaseConnection connection, VerifyTableDefinition verifyTableDefinition) Verifies a single table's actual data against its expected data.Constructors in org.dbunit with parameters of type IDatabaseConnectionModifierConstructorDescriptionDefaultDatabaseTester(IDatabaseConnection connection) Creates a new DefaultDatabaseTester with the supplied connection.
The same connection instance is returned by everyDefaultDatabaseTester.getConnection()call, with no liveness check.Constructor parameters in org.dbunit with type arguments of type IDatabaseConnectionModifierConstructorDescriptionDefaultDatabaseTester(CachingConnectionProvider connectionProvider, Callable<IDatabaseConnection> connectionFactory) Creates a new DefaultDatabaseTester that reuses one connection - created with the given factory - across calls via the givenCachingConnectionProvider, transparently replacing it if it is no longer alive.
Share the sameconnectionProviderinstance across the testers created for each test to get reuse across test methods; pair it withIOperationListener.NO_OP_OPERATION_LISTENER(or an equivalent non-closing listener) so the cached connection is not closed after everyAbstractDatabaseTester.onSetup()/AbstractDatabaseTester.onTearDown()call. -
Uses of IDatabaseConnection in org.dbunit.ant
Methods in org.dbunit.ant that return IDatabaseConnectionModifier and TypeMethodDescriptionprotected IDatabaseConnectionDbUnitTask.createConnection()Loads the JDBC driver and opens the configured database connection.protected IDatabaseConnectionDbUnitTask.createDatabaseConnection(Connection jdbcConnection, String dbSchema) Creates the dbunit connection using the two given arguments.Methods in org.dbunit.ant with parameters of type IDatabaseConnectionModifier and TypeMethodDescriptionvoidCompare.execute(IDatabaseConnection connection) voidDbUnitTaskStep.execute(IDatabaseConnection connection) Executes this step using the given database connection.voidExport.execute(IDatabaseConnection connection) voidOperation.execute(IDatabaseConnection connection) protected IDataSetAbstractStep.getDatabaseDataSet(IDatabaseConnection connection, List tables) Builds a dataset from the given connection, restricted to the given tables and queries.protected IDataSetExport.getExportDataSet(IDatabaseConnection connection) Creates the dataset that is finally used for the exportQuerySet.getQueryDataSet(IDatabaseConnection connection) Builds aQueryDataSetfrom this queryset's queries, resolving a referenced queryset first ifQuerySet.getRefid()is set. -
Uses of IDatabaseConnection in org.dbunit.assertion
Methods in org.dbunit.assertion with parameters of type IDatabaseConnectionModifier and TypeMethodDescriptionvoidDbUnitAssert.assertEqualsByQuery(IDataSet expectedDataset, IDatabaseConnection connection, String sqlQuery, String tableName, String[] ignoreCols) Compare a table from a dataset with a table generated from an sql query.voidDbUnitAssert.assertEqualsByQuery(ITable expectedTable, IDatabaseConnection connection, String tableName, String sqlQuery, String[] ignoreCols) Compare a table with a table generated from an sql query. -
Uses of IDatabaseConnection in org.dbunit.database
Classes in org.dbunit.database that implement IDatabaseConnectionModifier and TypeClassDescriptionclassBase implementation ofIDatabaseConnectionthat lazily creates and caches the connection's whole-databaseIDataSetand owns itsDatabaseConfig.classThis class adapts a JDBCConnectionto aIDatabaseConnection.classThis class adapts a JDBCDataSourceto aIDatabaseConnection.Methods in org.dbunit.database that return IDatabaseConnectionModifier and TypeMethodDescriptionCachingConnectionProvider.getConnection(Callable<IDatabaseConnection> connectionFactory) Returns the cached connection, creating it with the given factory on the first call and again whenever the previously cached connection is no longer alive.Methods in org.dbunit.database with parameters of type IDatabaseConnectionModifier and TypeMethodDescriptionstatic ITableMetaDataDatabaseTableMetaData.createMetaData(String tableName, ResultSet resultSet, IDatabaseConnection connection) Deprecated.protected StatementAbstractResultSetTable.createStatement(IDatabaseConnection connection, int resultSetType) Creates aStatementwith the specified ResultSet type.CachedResultSetTableFactory.createTable(String tableName, String selectStatement, IDatabaseConnection connection) CachedResultSetTableFactory.createTable(String tableName, PreparedStatement preparedStatement, IDatabaseConnection connection) CachedResultSetTableFactory.createTable(ITableMetaData metaData, IDatabaseConnection connection) ForwardOnlyResultSetTableFactory.createTable(String tableName, String selectStatement, IDatabaseConnection connection) ForwardOnlyResultSetTableFactory.createTable(String tableName, PreparedStatement preparedStatement, IDatabaseConnection connection) ForwardOnlyResultSetTableFactory.createTable(ITableMetaData metaData, IDatabaseConnection connection) IResultSetTableFactory.createTable(String tableName, String selectStatement, IDatabaseConnection connection) Creates a table from a table name and a SQL select statement.IResultSetTableFactory.createTable(String tableName, PreparedStatement preparedStatement, IDatabaseConnection connection) Creates a table from a preparedStatementIResultSetTableFactory.createTable(ITableMetaData metaData, IDatabaseConnection connection) Creates a table from a metadata descriptor and a connection.Method parameters in org.dbunit.database with type arguments of type IDatabaseConnectionModifier and TypeMethodDescriptionCachingConnectionProvider.getConnection(Callable<IDatabaseConnection> connectionFactory) Returns the cached connection, creating it with the given factory on the first call and again whenever the previously cached connection is no longer alive.Constructors in org.dbunit.database with parameters of type IDatabaseConnectionModifierConstructorDescriptionAbstractResultSetTable(String tableName, String selectStatement, IDatabaseConnection connection) Creates a table from a table name, SQL statement, and connection.AbstractResultSetTable(String tableName, String selectStatement, IDatabaseConnection connection, boolean caseSensitiveTableNames) Creates a table from a table name, SQL statement, and connection.protectedAbstractResultSetTable(String tableName, String selectStatement, IDatabaseConnection connection, boolean caseSensitiveTableNames, int resultSetType) Creates a table from a table name, SQL, and connection using the given ResultSet type.AbstractResultSetTable(ITableMetaData metaData, IDatabaseConnection connection) Creates a table from a metadata descriptor and a connection, using a forward-only result set.protectedAbstractResultSetTable(ITableMetaData metaData, IDatabaseConnection connection, int resultSetType) Creates a table from a metadata descriptor and a connection using the given ResultSet type.CachedResultSetTable(ITableMetaData metaData, IDatabaseConnection connection) Deprecated.since 2.4.4 prefer direct usage ofForwardOnlyResultSetTable(ITableMetaData, IDatabaseConnection)and then invokeCachedResultSetTable(IResultSetTable)DatabaseDataSet(IDatabaseConnection connection, boolean caseSensitiveTableNames) Creates a new database data setDatabaseDataSet(IDatabaseConnection connection, boolean caseSensitiveTableNames, ITableFilterSimple tableFilter) Creates a new database data setDatabaseSequenceFilter(IDatabaseConnection connection) Create a DatabaseSequenceFilter that exposes all the database tables.DatabaseSequenceFilter(IDatabaseConnection connection, String[] tableNames) Create a DatabaseSequenceFilter that only exposes specified table names.ForwardOnlyResultSetTable(String tableName, String selectStatement, IDatabaseConnection connection) Creates a table from a table name, SQL statement, and connection.ForwardOnlyResultSetTable(ITableMetaData metaData, IDatabaseConnection connection) Creates a table from a metadata descriptor and a connection, using a forward-only result set.PrimaryKeyFilter(IDatabaseConnection connection, PrimaryKeyFilter.PkTableMap allowedPKs, boolean reverseDependency) Default constructor, it takes as input a map with desired rows in a final dataset; the filter will ensure that the rows necessary by these initial rows are also allowed (and so on...).QueryDataSet(IDatabaseConnection connection) Create a QueryDataSet by passing in the connection to the database to use.QueryDataSet(IDatabaseConnection connection, boolean caseSensitiveTableNames) Create a QueryDataSet by passing in the connection to the database to use.QueryTableIterator(List tableEntries, IDatabaseConnection connection) Constructs an iterator over the given table entries.ResultSetTableMetaData(String tableName, ResultSet resultSet, IDatabaseConnection connection, boolean caseSensitiveMetaData) Creates the metadata for a result set, resolving column data types via the given connection.ScrollableResultSetTable(String tableName, String selectStatement, IDatabaseConnection connection) Creates a table that runs the given select statement.ScrollableResultSetTable(ITableMetaData metaData, IDatabaseConnection connection) Creates a table that runs the default query for the given metadata and connection. -
Uses of IDatabaseConnection in org.dbunit.database.search
Methods in org.dbunit.database.search that return IDatabaseConnectionModifier and TypeMethodDescriptionAbstractMetaDataBasedSearchCallback.getConnection()Get the connection where the edges will be calculated from.Methods in org.dbunit.database.search with parameters of type IDatabaseConnectionModifier and TypeMethodDescriptionstatic IDataSetTablesDependencyHelper.getAllDataset(IDatabaseConnection connection, String rootTable, Set allowedPKs) Returns a dataset with the given root table plus every table that directly or transitively depends on or is depended on by it, filtered to the given allowed primary keys.static IDataSetTablesDependencyHelper.getAllDataset(IDatabaseConnection connection, PrimaryKeyFilter.PkTableMap rootTables) Returns a dataset with the given root tables plus every table that directly or transitively depends on or is depended on by them, filtered to the given allowed primary keys.static String[]TablesDependencyHelper.getAllDependentTables(IDatabaseConnection connection, String rootTable) Get the name of all tables that depend on a root table ( i.e, all tables whose PK is a FK for the root table) and also the tables the root table depends on (i.e., all tables which have a FK for the root table's PK).static String[]TablesDependencyHelper.getAllDependentTables(IDatabaseConnection connection, String[] rootTables) Get the name of all tables that depend on the root tables ( i.e, all tables whose PK is a FK for any of the root tables) and also the tables the root tables depends on (i.e., all tables which have a FK for any of the root table's PK).static IDataSetTablesDependencyHelper.getDataset(IDatabaseConnection connection, String rootTable, Set allowedIds) Returns a dataset containing the given root table and all tables that depend on it, filtered to the given allowed primary key values of the root table.static IDataSetTablesDependencyHelper.getDataset(IDatabaseConnection connection, PrimaryKeyFilter.PkTableMap rootTables) Returns a dataset containing the given root tables and all tables that depend on them, filtered to the given allowed primary key values.static String[]TablesDependencyHelper.getDependentTables(IDatabaseConnection connection, String rootTable) Get the name of all tables that depend on the root tables (i.e, all tables that have FKs pointing to the PK of the root table).static String[]TablesDependencyHelper.getDependentTables(IDatabaseConnection connection, String[] rootTables) Get the name of all tables that depend on the root tables (i.e, all tables that have FKs pointing to the PK of one of the root tables).static String[]TablesDependencyHelper.getDependsOnTables(IDatabaseConnection connection, String rootTable) Get the name of all tables that the given rootTable depends on (i.e, all tables whose PK is a FK for the root table).static SetTablesDependencyHelper.getDirectDependentTables(IDatabaseConnection connection, String tableName) Returns a set of tables which directly depend on the given table.static SetTablesDependencyHelper.getDirectDependsOnTables(IDatabaseConnection connection, String tableName) Returns a set of tables on which the given table directly depends on.Constructors in org.dbunit.database.search with parameters of type IDatabaseConnectionModifierConstructorDescriptionDefault constructor.ExportedKeysSearchCallback(IDatabaseConnection connection) Creates a callback that gets the nodes reachable via exported (reverse) foreign keys.Creates a callback that gets the nodes reachable via both imported and exported foreign keys.ImportedAndExportedKeysSearchCallbackFilteredByPKs(IDatabaseConnection connection, PrimaryKeyFilter.PkTableMap allowedPKs) Default constructor.ImportedKeysSearchCallback(IDatabaseConnection connection) Creates a callback that gets the nodes reachable via imported (direct) foreign keys.ImportedKeysSearchCallbackFilteredByPKs(IDatabaseConnection connection, PrimaryKeyFilter.PkTableMap allowedPKs) Default constructor. -
Uses of IDatabaseConnection in org.dbunit.database.statement
Methods in org.dbunit.database.statement with parameters of type IDatabaseConnectionModifier and TypeMethodDescriptionIStatementFactory.createBatchStatement(IDatabaseConnection connection) Creates a batch statement for the given connection.PreparedStatementFactory.createBatchStatement(IDatabaseConnection connection) StatementFactory.createBatchStatement(IDatabaseConnection connection) IStatementFactory.createPreparedBatchStatement(String sql, IDatabaseConnection connection) Creates a prepared batch statement for the given SQL and connection.PreparedStatementFactory.createPreparedBatchStatement(String sql, IDatabaseConnection connection) StatementFactory.createPreparedBatchStatement(String sql, IDatabaseConnection connection) protected booleanAbstractStatementFactory.supportBatchStatement(IDatabaseConnection connection) Returnstrueif target database supports batch statement. -
Uses of IDatabaseConnection in org.dbunit.dataset
Methods in org.dbunit.dataset with parameters of type IDatabaseConnectionModifier and TypeMethodDescriptionAbstractTableMetaData.getDataTypeFactory(IDatabaseConnection connection) Validates and returns the datatype factory of the given connection -
Uses of IDatabaseConnection in org.dbunit.ext.db2
Classes in org.dbunit.ext.db2 that implement IDatabaseConnectionModifier and TypeClassDescriptionclassDatabase connection for DB2 that pre-configures all properties required to successfully use dbunit with DB2. -
Uses of IDatabaseConnection in org.dbunit.ext.h2
Classes in org.dbunit.ext.h2 that implement IDatabaseConnectionModifier and TypeClassDescriptionclassDatabaseConnectionspecialization that configures H2-specific connection behavior. -
Uses of IDatabaseConnection in org.dbunit.ext.hsqldb
Classes in org.dbunit.ext.hsqldb that implement IDatabaseConnectionModifier and TypeClassDescriptionclassDatabaseConnectionspecialization that configures HSQLDB-specific connection behavior. -
Uses of IDatabaseConnection in org.dbunit.ext.mckoi
Classes in org.dbunit.ext.mckoi that implement IDatabaseConnectionModifier and TypeClassDescriptionclassDatabase connection for Mckoi that pre-configures all properties required to successfully use dbunit with Mckoi. -
Uses of IDatabaseConnection in org.dbunit.ext.mssql
Classes in org.dbunit.ext.mssql that implement IDatabaseConnectionModifier and TypeClassDescriptionclassDatabaseConnectionspecialization that configures Microsoft SQL Server-specific connection behavior.Methods in org.dbunit.ext.mssql with parameters of type IDatabaseConnectionModifier and TypeMethodDescriptionvoidInsertIdentityOperation.execute(IDatabaseConnection connection, IDataSet dataSet) -
Uses of IDatabaseConnection in org.dbunit.ext.mysql
Classes in org.dbunit.ext.mysql that implement IDatabaseConnectionModifier and TypeClassDescriptionclassDatabaseConnectionspecialization that configures MySQL-specific connection behavior. -
Uses of IDatabaseConnection in org.dbunit.ext.oracle
Classes in org.dbunit.ext.oracle that implement IDatabaseConnectionModifier and TypeClassDescriptionclassDatabaseConnectionspecialization that configures Oracle-specific connection behavior. -
Uses of IDatabaseConnection in org.dbunit.operation
Methods in org.dbunit.operation with parameters of type IDatabaseConnectionModifier and TypeMethodDescriptionvoidAbstractBatchOperation.execute(IDatabaseConnection connection, IDataSet dataSet) voidCloseConnectionOperation.execute(IDatabaseConnection connection, IDataSet dataSet) voidCompositeOperation.execute(IDatabaseConnection connection, IDataSet dataSet) abstract voidDatabaseOperation.execute(IDatabaseConnection connection, IDataSet dataSet) Executes this operation on the specified database using the specified dataset contents.voidDeleteAllOperation.execute(IDatabaseConnection connection, IDataSet dataSet) voidRefreshOperation.execute(IDatabaseConnection connection, IDataSet dataSet) voidTransactionOperation.execute(IDatabaseConnection connection, IDataSet dataSet) voidTruncateTableOperation.execute(IDatabaseConnection connection, IDataSet dataSet) protected StringDeleteAllOperation.getDeleteAllCommandSuffix(IDatabaseConnection connection) Returns a suffix appended to the delete-all SQL statement for the given connection.protected StringTruncateTableOperation.getDeleteAllCommandSuffix(IDatabaseConnection connection) DeleteOperation.getOperationData(ITableMetaData metaData, BitSet ignoreMapping, IDatabaseConnection connection) InsertOperation.getOperationData(ITableMetaData metaData, BitSet ignoreMapping, IDatabaseConnection connection) UpdateOperation.getOperationData(ITableMetaData metaData, BitSet ignoreMapping, IDatabaseConnection connection) protected StringAbstractOperation.getQualifiedName(String prefix, String name, IDatabaseConnection connection) Qualifies the given table or column name with the given schema/catalog prefix, applying the connection's configured escape pattern.
DatabaseTestCase.getOperationListener()in advance