Package org.dbunit.database
Class DatabaseDataSet
java.lang.Object
org.dbunit.dataset.AbstractDataSet
org.dbunit.database.DatabaseDataSet
- All Implemented Interfaces:
IDataSet
Provides access to a database instance as a
IDataSet.- Since:
- 1.0 (Feb 17, 2002)
- Version:
- $Revision$ $Date$
- Author:
- Manuel Laflamme, Last changed by: $Author$
-
Field Summary
Fields inherited from class org.dbunit.dataset.AbstractDataSet
_orderedTableNameMap -
Constructor Summary
ConstructorsConstructorDescriptionDatabaseDataSet(IDatabaseConnection connection, boolean caseSensitiveTableNames) Creates a new database data setDatabaseDataSet(IDatabaseConnection connection, boolean caseSensitiveTableNames, ITableFilterSimple tableFilter) Creates a new database data set -
Method Summary
Modifier and TypeMethodDescriptionprotected ITableIteratorcreateIterator(boolean reversed) Creates an iterator which provides access to all tables of this datasetReturns the specified table.getTableMetaData(String tableName) Returns the specified table metadata.String[]Returns names of tables in this dataset in proper sequence.Methods inherited from class org.dbunit.dataset.AbstractDataSet
createTableNameMap, getTables, initialize, isCaseSensitiveTableNames, iterator, reverseIterator, toString
-
Constructor Details
-
DatabaseDataSet
public DatabaseDataSet(IDatabaseConnection connection, boolean caseSensitiveTableNames) throws SQLException Creates a new database data set- Parameters:
connection- The database connectioncaseSensitiveTableNames- Whether or not this dataset should use case sensitive table names- Throws:
SQLException- if retrieving the database metadata fails.- Since:
- 2.4
-
DatabaseDataSet
public DatabaseDataSet(IDatabaseConnection connection, boolean caseSensitiveTableNames, ITableFilterSimple tableFilter) throws SQLException Creates a new database data set- Parameters:
connection- The database connectioncaseSensitiveTableNames- Whether or not this dataset should use case sensitive table namestableFilter- Table filter to specify tables to be omitted in this dataset. Can benull.- Throws:
SQLException- if retrieving the database metadata fails.- Since:
- 2.4.3
-
-
Method Details
-
createIterator
Description copied from class:AbstractDataSetCreates an iterator which provides access to all tables of this dataset- Specified by:
createIteratorin classAbstractDataSet- Parameters:
reversed- Whether the created iterator should be a reversed one or not- Returns:
- The created
ITableIterator - Throws:
DataSetException- if the iterator cannot be created.
-
getTableNames
Description copied from interface:IDataSetReturns names of tables in this dataset in proper sequence. Multiple occurrence of the same name may be returned if multiple tables having the same name are present in the dataset.- Specified by:
getTableNamesin interfaceIDataSet- Overrides:
getTableNamesin classAbstractDataSet- Returns:
- the table names, in proper sequence.
- Throws:
DataSetException- if the table names cannot be determined.
-
getTableMetaData
Description copied from interface:IDataSetReturns the specified table metadata.- Specified by:
getTableMetaDatain interfaceIDataSet- Overrides:
getTableMetaDatain classAbstractDataSet- Parameters:
tableName- the name of the table to look up.- Returns:
- the metadata of the specified table.
- Throws:
DataSetException
-
getTable
Description copied from interface:IDataSetReturns the specified table.- Specified by:
getTablein interfaceIDataSet- Overrides:
getTablein classAbstractDataSet- Parameters:
tableName- the name of the table to look up.- Returns:
- the specified table.
- Throws:
DataSetException
-