Package org.dbunit.database

Examples of org.dbunit.database.DatabaseSequenceFilter$DependencyInfo


   private void fillDatabase() throws Exception
   {
      final DatabaseConnection connection = databaseConnection.get();
      IDataSet initialDataSet = DataSetUtils.mergeDataSets(dataSetRegister.get().getInitial());
      initialDataSet = new FilteredDataSet(new DatabaseSequenceFilter(connection), initialDataSet);
      getSelectedSeedingStrategy().execute(connection, initialDataSet);
   }
View Full Code Here


   {
      try
      {
         final IDataSet mergeDataSets = DataSetUtils.mergeDataSets(dataSetRegister.getInitial());
         IDataSet dataSet = DataSetUtils.excludeTables(mergeDataSets, tablesToExclude);
         dataSet = new FilteredDataSet(new DatabaseSequenceFilter(connection), dataSet);
         DatabaseOperation.DELETE_ALL.execute(connection, dataSet);
      }
      catch (Exception e)
      {
         throw new DBUnitDataSetHandlingException("Unable to clean database.", e);
View Full Code Here

   public void cleanupDatabase(String ... tablesToExclude)
   {
      try
      {
         IDataSet dataSet = DataSetUtils.excludeTables(connection.createDataSet(), tablesToExclude);
         dataSet = new FilteredDataSet(new DatabaseSequenceFilter(connection), dataSet);
         DatabaseOperation.DELETE_ALL.execute(connection, dataSet);
      }
      catch (Exception e)
      {
         throw new DBUnitDataSetHandlingException("Unable to clean database.", e);
View Full Code Here

   {
      try
      {
         final IDataSet mergeDataSets = DataSetUtils.mergeDataSets(dataSetRegister.getInitial());
         IDataSet dataSet = DataSetUtils.excludeTables(mergeDataSets, tablesToExclude);
         dataSet = new FilteredDataSet(new DatabaseSequenceFilter(connection), dataSet);
         DatabaseOperation.DELETE.execute(connection, dataSet);
      }
      catch (Exception e)
      {
         throw new DBUnitDataSetHandlingException("Unable to clean database.", e);
View Full Code Here

   */
  public void exportData(final String dir, final String fileName) {
    new DbUnitTemplate(dataSource).execute(new DbUnitCallback() {
      @Override
      public void doInDbUnit(IDatabaseConnection connection) throws Exception {
        IDataSet dataSet = new FilteredDataSet(new DatabaseSequenceFilter(connection),
            connection.createDataSet());
        File parent = new File(dir);
        if (!parent.exists()) {
          parent.mkdirs();
        }
View Full Code Here

   */
  public void exportDtd(final String dir, final String fileName) {
    new DbUnitTemplate(dataSource).execute(new DbUnitCallback() {
      @Override
      public void doInDbUnit(IDatabaseConnection connection) throws Exception {
        IDataSet dataSet = new FilteredDataSet(new DatabaseSequenceFilter(connection),
            connection.createDataSet());
        File parent = new File(dir);
        if (!parent.exists()) {
          parent.mkdirs();
        }
View Full Code Here

    {
        IDataSet dataset = getDatabaseDataSet(connection, this._tables, false);
        if (isOrdered())
        {
          // Use topologically sorted database
          ITableFilter filter = new DatabaseSequenceFilter(connection)
          dataset = new FilteredDataSet(filter, dataset);
        }
        return dataset;
  }
View Full Code Here

                dataset = new ReplacementDataSet(dataset);
                ((ReplacementDataSet)dataset).addReplacementObject(_nullToken, null);
            }
            if(isOrdered())
            {
                DatabaseSequenceFilter databaseSequenceFilter = new DatabaseSequenceFilter(connection);
                dataset = new FilteredDataSet(databaseSequenceFilter, dataset);
            }
            operation.execute(connection, dataset);
        }
        catch (SQLException e)
View Full Code Here

TOP

Related Classes of org.dbunit.database.DatabaseSequenceFilter$DependencyInfo

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.