@Test public void testGetTableFilter() { TreeSet<IncludeTableFilter> includes = new TreeSet<IncludeTableFilter>(); includes.add(new IncludeTableFilter("aaa")); includes.add(new IncludeTableFilter("bb")); TreeSet<Pattern> excludes = new TreeSet<>(); TableFilter filter = new TableFilter(includes, excludes); assertNotNull(filter.getIncludeTableColumnFilter("aaa")); assertNull(filter.getIncludeTableColumnFilter("aa")); assertNull(filter.getIncludeTableColumnFilter("aaaa")); assertNotNull(filter.getIncludeTableColumnFilter("bb")); assertNull(filter.getIncludeTableColumnFilter("")); assertNull(filter.getIncludeTableColumnFilter("bbbb")); }
public PatternFilter getIncludeTableColumnFilter(String tableName) { IncludeTableFilter include = getIncludeTableFilter(tableName); if (include == null) return null; return include.columnsFilter; }
TableFilter { public PatternFilter getIncludeTableColumnFilter(String tableName) { IncludeTableFilter include = getIncludeTableFilter(tableName); if (include == null) return null; return include.columnsFilter; } }
TableFilter { public PatternFilter getIncludeTableColumnFilter(String tableName) { IncludeTableFilter include = getIncludeTableFilter(tableName); if (include == null) return null; return include.columnsFilter; } TableFilter(SortedSet<IncludeTableFilter> includes, SortedSet<Pattern> excludes); }
TableFilter { public PatternFilter getIncludeTableColumnFilter(String tableName) { IncludeTableFilter include = getIncludeTableFilter(tableName); if (include == null) return null; return include.columnsFilter; } TableFilter(SortedSet<IncludeTableFilter> includes, SortedSet<Pattern> excludes); boolean isIncludeTable(String tableName); PatternFilter getIncludeTableColumnFilter(String tableName); PatternFilter getIncludeTableRelationshipFilter(String tableName); SortedSet<IncludeTableFilter> getIncludes(); static TableFilter include(String tablePattern); static TableFilter everything(); @Override boolean equals(Object o); @Override int hashCode(); }
TableFilter { public PatternFilter getIncludeTableColumnFilter(String tableName) { IncludeTableFilter include = getIncludeTableFilter(tableName); if (include == null) return null; return include.columnsFilter; } TableFilter(SortedSet<IncludeTableFilter> includes, SortedSet<Pattern> excludes); boolean isIncludeTable(String tableName); PatternFilter getIncludeTableColumnFilter(String tableName); PatternFilter getIncludeTableRelationshipFilter(String tableName); SortedSet<IncludeTableFilter> getIncludes(); static TableFilter include(String tablePattern); static TableFilter everything(); @Override boolean equals(Object o); @Override int hashCode();  }