1 21 package org.dbunit.dataset.filter; 22 23 import org.dbunit.dataset.DataSetException; 24 25 34 public class DefaultTableFilter extends AbstractTableFilter implements ITableFilter 35 { 36 private final IncludeTableFilter _includeFilter = new IncludeTableFilter(); 37 private final ExcludeTableFilter _excludeFilter = new ExcludeTableFilter(); 38 39 45 public void includeTable(String patternName) 46 { 47 _includeFilter.includeTable(patternName); 48 } 49 50 56 public void excludeTable(String patternName) 57 { 58 _excludeFilter.excludeTable(patternName); 59 } 60 61 64 public boolean isValidName(String tableName) throws DataSetException 65 { 66 if (_includeFilter.isEmpty() || _includeFilter.accept(tableName)) 67 { 68 return _excludeFilter.accept(tableName); 69 } 70 return false; 71 } 72 } 73 | Popular Tags |