ITableIterator iterator = dataSet.reverseIterator(); while(iterator.next())
Stack tableNames = new Stack(); Set tablesSeen = new HashSet(); ITableIterator iterator = dataSet.iterator(); while (iterator.next())
    public void execute(IDatabaseConnection connection, IDataSet dataSet)            throws DatabaseUnitException, SQLException    {        IDataSet databaseDataSet = connection.createDataSet();        DatabaseConfig databaseConfig = connection.getConfig();        IStatementFactory statementFactory = (IStatementFactory)databaseConfig.getProperty(                DatabaseConfig.PROPERTY_STATEMENT_FACTORY);        IBatchStatement statement = statementFactory.createBatchStatement(connection);        try        {            int count = 0;            ITableIterator iterator = dataSet.reverseIterator();            while(iterator.next())            {                String tableName = iterator.getTableMetaData().getTableName();                // Use database table name. Required to support case sensitive database.                ITableMetaData databaseMetaData =                        databaseDataSet.getTableMetaData(tableName);                tableName = databaseMetaData.getTableName();                StringBuffer sqlBuffer = new StringBuffer(128);                sqlBuffer.append(getDeleteAllCommand());                sqlBuffer.append(getQualifiedName(connection.getSchema(), tableName, connection));                statement.addBatch(sqlBuffer.toString());                count++;            }            if (count > 0)            {                statement.executeBatch();                statement.clearBatch();            }        }        finally        {            statement.close();        }    }