Package org.dbunit.dataset.filter
Class DefaultColumnFilter
java.lang.Object
org.dbunit.dataset.filter.DefaultColumnFilter
- All Implemented Interfaces:
IColumnFilter
Implementation of the IColumnFilter interface that exposes columns matching
include patterns and not matching exclude patterns.
- Since:
- Apr 17, 2004
- Version:
- $Revision$
- Author:
- Manuel Laflamme
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanTests whether or not the specified column of the specified tableName should be included by this filter.voidexcludeColumn(String columnPattern) Add a new refused column name pattern for all tables.voidexcludeColumns(Column[] columns) Add specified columns to excluded column name list.static ITableexcludedColumnsTable(ITable table, String[] columnNames) Returns a table backed by the specified table but with specified columns excluded.static ITableexcludedColumnsTable(ITable table, Column[] columns) Returns a table backed by the specified table but with specified columns excluded.voidincludeColumn(String columnPattern) Add a new accepted column name pattern for all tables.voidincludeColumns(Column[] columns) Add specified columns to accepted column name list.static ITableincludedColumnsTable(ITable table, String[] columnNames) Returns a table backed by the specified table that only exposes specified columns.static ITableincludedColumnsTable(ITable table, Column[] columns) Returns a table backed by the specified table that only exposes specified columns.toString()
-
Constructor Details
-
DefaultColumnFilter
public DefaultColumnFilter()
-
-
Method Details
-
includeColumn
Add a new accepted column name pattern for all tables. The following wildcard characters are supported: '*' matches zero or more characters, '?' matches one character.- Parameters:
columnPattern- The column pattern to be supported
-
includeColumns
Add specified columns to accepted column name list. -
excludeColumn
Add a new refused column name pattern for all tables. The following wildcard characters are supported: '*' matches zero or more characters, '?' matches one character. -
excludeColumns
Add specified columns to excluded column name list. -
includedColumnsTable
public static ITable includedColumnsTable(ITable table, String[] columnNames) throws DataSetException Returns a table backed by the specified table that only exposes specified columns.- Throws:
DataSetException
-
includedColumnsTable
Returns a table backed by the specified table that only exposes specified columns.- Throws:
DataSetException
-
excludedColumnsTable
public static ITable excludedColumnsTable(ITable table, String[] columnNames) throws DataSetException Returns a table backed by the specified table but with specified columns excluded.- Throws:
DataSetException
-
excludedColumnsTable
Returns a table backed by the specified table but with specified columns excluded.- Throws:
DataSetException
-
accept
Description copied from interface:IColumnFilterTests whether or not the specified column of the specified tableName should be included by this filter.- Specified by:
acceptin interfaceIColumnFilter- Parameters:
tableName- The tableName to be testedcolumn- The column to be tested- Returns:
trueif and only if the given parameter set should be included
-
toString
-