1 21 package org.dbunit.dataset.filter; 22 23 import org.dbunit.dataset.DataSetException; 24 25 26 35 public class ExcludeTableFilter extends AbstractTableFilter implements ITableFilter 36 { 37 private final PatternMatcher _patternMatcher = new PatternMatcher(); 38 39 43 public ExcludeTableFilter() 44 { 45 } 46 47 50 public ExcludeTableFilter(String [] tableNames) 51 { 52 for (int i = 0; i < tableNames.length; i++) 53 { 54 String tableName = tableNames[i]; 55 excludeTable(tableName); 56 } 57 } 58 59 65 public void excludeTable(String patternName) 66 { 67 _patternMatcher.addPattern(patternName); 68 } 69 70 public boolean isEmpty() 71 { 72 return _patternMatcher.isEmpty(); 73 } 74 75 78 public boolean isValidName(String tableName) throws DataSetException 79 { 80 return !_patternMatcher.accept(tableName); 81 } 82 } 83 | Popular Tags |