}
public static IDataSet getAllDataset( IDatabaseConnection connection, Map rootTables ) throws SearchException, SQLException {
ImportedAndExportedKeysSearchCallbackFilteredByPKs callback = new ImportedAndExportedKeysSearchCallbackFilteredByPKs(connection, rootTables);
ITableFilter filter = callback.getFilter();
DepthFirstSearch search = new DepthFirstSearch();
String[] tableNames = CollectionsHelper.setToStrings( rootTables.keySet() );
Set tmpTables = search.search( tableNames, callback );
String[] dependentTables = CollectionsHelper.setToStrings( tmpTables );
IDataSet tmpDataset = connection.createDataSet( dependentTables );
FilteredDataSet dataset = new FilteredDataSet(filter, tmpDataset);
return dataset;
}