org.dbunit.dataset.filter
Class DefaultColumnFilter

java.lang.Object
  extended by org.dbunit.dataset.filter.DefaultColumnFilter
All Implemented Interfaces:
IColumnFilter

public class DefaultColumnFilter
extends java.lang.Object
implements IColumnFilter

Implementation of the IColumnFilter interface that exposes columns matching include patterns and not matching exclude patterns.

Since:
Apr 17, 2004
Version:
$Revision: 554 $
Author:
Manuel Laflamme

Constructor Summary
DefaultColumnFilter()
           
 
Method Summary
 boolean accept(java.lang.String tableName, Column column)
           
 void excludeColumn(java.lang.String columnPattern)
          Add a new refused column name pattern for all tables.
 void excludeColumns(Column[] columns)
          Add specified columns to excluded column name list.
static ITable excludedColumnsTable(ITable table, Column[] columns)
          Returns a table backed by the specified table but with specified columns excluded.
static ITable excludedColumnsTable(ITable table, java.lang.String[] columnNames)
          Returns a table backed by the specified table but with specified columns excluded.
 void includeColumn(java.lang.String columnPattern)
          Add a new accepted column name pattern for all tables.
 void includeColumns(Column[] columns)
          Add specified columns to accepted column name list.
static ITable includedColumnsTable(ITable table, Column[] columns)
          Returns a table backed by the specified table that only exposes specified columns.
static ITable includedColumnsTable(ITable table, java.lang.String[] columnNames)
          Returns a table backed by the specified table that only exposes specified columns.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultColumnFilter

public DefaultColumnFilter()
Method Detail

includeColumn

public void includeColumn(java.lang.String columnPattern)
Add a new accepted column name pattern for all tables. The following wildcard characters are supported: '*' matches zero or more characters, '?' matches one character.


includeColumns

public void includeColumns(Column[] columns)
Add specified columns to accepted column name list.


excludeColumn

public void excludeColumn(java.lang.String columnPattern)
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

public void excludeColumns(Column[] columns)
Add specified columns to excluded column name list.


includedColumnsTable

public static ITable includedColumnsTable(ITable table,
                                          java.lang.String[] columnNames)
                                   throws DataSetException
Returns a table backed by the specified table that only exposes specified columns.

Throws:
DataSetException

includedColumnsTable

public static ITable includedColumnsTable(ITable table,
                                          Column[] columns)
                                   throws DataSetException
Returns a table backed by the specified table that only exposes specified columns.

Throws:
DataSetException

excludedColumnsTable

public static ITable excludedColumnsTable(ITable table,
                                          java.lang.String[] columnNames)
                                   throws DataSetException
Returns a table backed by the specified table but with specified columns excluded.

Throws:
DataSetException

excludedColumnsTable

public static ITable excludedColumnsTable(ITable table,
                                          Column[] columns)
                                   throws DataSetException
Returns a table backed by the specified table but with specified columns excluded.

Throws:
DataSetException

accept

public boolean accept(java.lang.String tableName,
                      Column column)
Specified by:
accept in interface IColumnFilter


Copyright © 2002-2008. All Rights Reserved.