Package org.dbunit.dataset.filter
Class AbstractTableFilter
java.lang.Object
org.dbunit.dataset.filter.AbstractTableFilter
- All Implemented Interfaces:
ITableFilter,ITableFilterSimple
- Direct Known Subclasses:
DefaultTableFilter,ExcludeTableFilter,IncludeTableFilter,PrimaryKeyFilter
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$ $Date$
- Author:
- Manuel Laflamme, Last changed by: $Author$
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturnstrueif specified table is allowed by this filter.String[]getTableNames(IDataSet dataSet) Returns the table names allowed by this filter from the specified dataset.abstract booleanisValidName(String tableName) Returnstrueif specified table is allowed by this filter.Returns iterator of tables allowed by this filter from the specified dataset.
-
Constructor Details
-
AbstractTableFilter
public AbstractTableFilter()
-
-
Method Details
-
isValidName
Returnstrueif specified table is allowed by this filter. This legacy method, now replaced by accept, still exist for compatibily with older environment- Parameters:
tableName- the name of the table to check.- Returns:
trueif specified table is allowed by this filter.- Throws:
DataSetException- if the check fails.
-
accept
Description copied from interface:ITableFilterSimpleReturnstrueif specified table is allowed by this filter.- Specified by:
acceptin interfaceITableFilterSimple- Parameters:
tableName- the name of the table to check.- Returns:
trueif specified table is allowed by this filter.- Throws:
DataSetException- if the check fails.
-
getTableNames
Description copied from interface:ITableFilterReturns the table names allowed by this filter from the specified dataset.- Specified by:
getTableNamesin interfaceITableFilter- Parameters:
dataSet- the filtered dataset- Returns:
- the table names allowed by this filter.
- Throws:
DataSetException- if retrieving the table names fails.
-
iterator
Description copied from interface:ITableFilterReturns iterator of tables allowed by this filter from the specified dataset.- Specified by:
iteratorin interfaceITableFilter- Parameters:
dataSet- the filtered datasetreversed-trueto iterate in reverse order.- Returns:
- the iterator of tables allowed by this filter.
- Throws:
DataSetException- if creating the iterator fails.
-