Package org.dbunit.util.search

Examples of org.dbunit.util.search.DepthFirstSearch.search()


  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;
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.