Package org.dbunit.dataset.filter

Examples of org.dbunit.dataset.filter.ExcludeTableFilter


      return names;
   }

   public static IDataSet excludeTables(IDataSet dataSet, String ... tablesToExclude)
   {
      return new FilteredDataSet(new ExcludeTableFilter(tablesToExclude), dataSet);
   }
View Full Code Here


      {
         IDataSet currentDataSet = databaseConnection.get().createDataSet();
         final String[] excludeTables = dbunitConfigurationInstance.get().getExcludeTablesFromComparisonWhenEmptyExpected();
         if (excludeTables.length != 0)
         {
            currentDataSet = new FilteredDataSet(new ExcludeTableFilter(excludeTables), currentDataSet);
         }
         final IDataSet expectedDataSet = mergeDataSets(dataSetRegister.get().getExpected());
         final DataSetComparator dataSetComparator = new DataSetComparator(compareDataEvent.getSortByColumns(),
               compareDataEvent.getColumnsToExclude(), compareDataEvent.getCustomColumnFilters());
         dataSetComparator.compare(currentDataSet, expectedDataSet, assertionErrorCollector.get());
View Full Code Here

      {
         IDataSet currentDataSet = databaseConnection.get().createDataSet();
         final String[] excludeTablesFromComparisonWhenEmptyExpected = dbunitConfigurationInstance.get().getExcludeTablesFromComparisonWhenEmptyExpected();
         if (excludeTablesFromComparisonWhenEmptyExpected.length != 0)
         {
            currentDataSet = new FilteredDataSet(new ExcludeTableFilter(excludeTablesFromComparisonWhenEmptyExpected), currentDataSet);
         }
         final IDataSet expectedDataSet = DataSetUtils.mergeDataSets(dataSetRegister.get().getExpected());
         new DataSetComparator(compareDataEvent.getSortByColumns(), compareDataEvent.getColumnsToExclude()).compare(currentDataSet, expectedDataSet,
               assertionErrorCollector.get());
      }
View Full Code Here

    }

    private void clearDataBase() throws Exception {
        LOGGER.info("Clean Database except SEQUENCE table");
        IDataSet dataset = new DatabaseDataSet(connection, false, new ExcludeTableFilter(new String[]{"SEQUENCE"}));
        disableReferentialIntegrity(connection);
        DatabaseOperation.DELETE_ALL.execute(connection, dataset);
        enableReferentialIntegrity(connection);
        connection.getConnection().commit();
    }
View Full Code Here

    private void clearDataBase() throws Exception {
        LOGGER.info("Clean Database except SEQUENCE table");
        userTransaction.begin();
        try {
            IDataSet dataset = new DatabaseDataSet(connection, false, new ExcludeTableFilter(new String[]{"SEQUENCE"}));
            disableReferentialIntegrity(connection);
            DatabaseOperation.DELETE_ALL.execute(connection, dataset);
            enableReferentialIntegrity(connection);
            em.flush();
            em.clear();
View Full Code Here

      return names;
   }

   public static IDataSet excludeTables(IDataSet dataSet, String ... tablesToExclude)
   {
      return new FilteredDataSet(new ExcludeTableFilter(tablesToExclude), dataSet);
   }
View Full Code Here

    }

    private void clearDataBase() throws Exception {
        LOGGER.info("Clean Database except SEQUENCE table");
        IDataSet dataset = new DatabaseDataSet(connection, false, new ExcludeTableFilter(new String[]{"SEQUENCE"}));
        disableReferentialIntegrity(connection);
        DatabaseOperation.DELETE_ALL.execute(connection, dataset);
        enableReferentialIntegrity(connection);
        connection.getConnection().commit();
    }
View Full Code Here

TOP

Related Classes of org.dbunit.dataset.filter.ExcludeTableFilter

Copyright © 2018 www.massapicom. 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.