org.dbunit.dataset.filter
Class AbstractTableFilter

java.lang.Object
  extended by org.dbunit.dataset.filter.AbstractTableFilter
All Implemented Interfaces:
ITableFilter
Direct Known Subclasses:
DefaultTableFilter, ExcludeTableFilter, IncludeTableFilter, PrimaryKeyFilter

public abstract class AbstractTableFilter
extends java.lang.Object
implements ITableFilter

This class provides a skeletal implementation of the ITableFilter interface to minimize the effort required to implement a filter. Subclasses are only required to implement the isValidName(java.lang.String) method.

Since:
2.2.0
Version:
$Revision: 767 $ $Date: 2008-08-01 14:26:47 +0200 (ven, 01 ago 2008) $
Author:
Manuel Laflamme, Last changed by: $Author: gommma $

Constructor Summary
AbstractTableFilter()
           
 
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.
abstract  boolean isValidName(java.lang.String tableName)
          Returns true if specified table is allowed by this filter.
 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

AbstractTableFilter

public AbstractTableFilter()
Method Detail

isValidName

public abstract boolean isValidName(java.lang.String tableName)
                             throws DataSetException
Returns true if specified table is allowed by this filter. This legacy method, now replaced by accept, still exist for compatibily with older environment

Throws:
DataSetException

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.