use of org.dbunit.database.DatabaseSequenceFilter in project cia by Hack23.
the class DataSetConnectionFactory method getDataSet.
/**
* Gets the data set.
*
* @param connection
* the connection
* @return the data set
* @throws DatasetFactoryException
* the dataset factory exception
*/
public IDataSet getDataSet(final Connection connection) throws DatasetFactoryException {
DatabaseConnection databaseConnection;
try {
databaseConnection = new DatabaseConnection(connection);
final ITableFilter filter = new DatabaseSequenceFilter(databaseConnection);
return new FilteredDataSet(filter, databaseConnection.createDataSet());
} catch (DatabaseUnitException | SQLException e) {
throw new DatasetFactoryException(e);
}
}
Aggregations