org.dbunit.dataset.filter
Class SequenceTableFilter

java.lang.Object
  extended by org.dbunit.dataset.filter.SequenceTableFilter
All Implemented Interfaces:
ITableFilter
Direct Known Subclasses:
DatabaseSequenceFilter

public class SequenceTableFilter
extends java.lang.Object
implements ITableFilter

This filter expose a specified table sequence and can be used to reorder tables in a dataset. This implementation do not support duplicate table names. Thus you cannot specify the same table name more than once in this filter and the filtered dataset must not contains duplicate table names. This is the default filter used by the FilteredDataSet.

Since:
Mar 7, 2003
Version:
$Revision: 629 $
Author:
Manuel Laflamme

Constructor Summary
SequenceTableFilter(java.lang.String[] tableNames)
          Creates a new SequenceTableFilter with specified table names sequence.
 
Method Summary
 boolean accept(java.lang.String tableName)
          Returns true if specified table is allowed by this filter.
 java.lang.String[] getTableNames(IDataSet dataSet)
          Returns the table names allowed by this filter from the specified dataset.
 ITableIterator iterator(IDataSet dataSet, boolean reversed)
          Returns iterator of tables allowed by this filter from the specified dataset.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SequenceTableFilter

public SequenceTableFilter(java.lang.String[] tableNames)
Creates a new SequenceTableFilter with specified table names sequence.

Method Detail

accept

public boolean accept(java.lang.String tableName)
               throws DataSetException
Description copied from interface: ITableFilter
Returns true if specified table is allowed by this filter.

Specified by:
accept in interface ITableFilter
Throws:
DataSetException

getTableNames

public java.lang.String[] getTableNames(IDataSet dataSet)
                                 throws DataSetException
Description copied from interface: ITableFilter
Returns the table names allowed by this filter from the specified dataset.

Specified by:
getTableNames in interface ITableFilter
Parameters:
dataSet - the filtered dataset
Throws:
DataSetException

iterator

public ITableIterator iterator(IDataSet dataSet,
                               boolean reversed)
                        throws DataSetException
Description copied from interface: ITableFilter
Returns iterator of tables allowed by this filter from the specified dataset.

Specified by:
iterator in interface ITableFilter
Parameters:
dataSet - the filtered dataset
Throws:
DataSetException


Copyright © 2002-2008. All Rights Reserved.