@Test public void testInclude() { TreeSet<IncludeTableFilter> includes = new TreeSet<>(); includes.add(new IncludeTableFilter("aaa")); includes.add(new IncludeTableFilter("bb")); TableFilter filter = new TableFilter(includes, new TreeSet<>(PatternFilter.PATTERN_COMPARATOR)); assertTrue(filter.isIncludeTable("aaa")); assertFalse(filter.isIncludeTable("aa")); assertFalse(filter.isIncludeTable("aaaa")); assertTrue(filter.isIncludeTable("bb")); assertFalse(filter.isIncludeTable("")); assertFalse(filter.isIncludeTable("bbbb")); }
public static TableFilter include(String tablePattern) { TreeSet<IncludeTableFilter> includes = new TreeSet<>(); includes.add(new IncludeTableFilter(tablePattern == null ? null : tablePattern.replaceAll("%", ".*"))); return new TableFilter(includes, new TreeSet<>()); }
TableFilter { public static TableFilter include(String tablePattern) { TreeSet<IncludeTableFilter> includes = new TreeSet<>(); includes.add(new IncludeTableFilter(tablePattern == null ? null : tablePattern.replaceAll("%", ".*"))); return new TableFilter(includes, new TreeSet<>()); } }
TableFilter { public static TableFilter include(String tablePattern) { TreeSet<IncludeTableFilter> includes = new TreeSet<>(); includes.add(new IncludeTableFilter(tablePattern == null ? null : tablePattern.replaceAll("%", ".*"))); return new TableFilter(includes, new TreeSet<>()); } TableFilter(SortedSet<IncludeTableFilter> includes, SortedSet<Pattern> excludes); }
TableFilter { public static TableFilter include(String tablePattern) { TreeSet<IncludeTableFilter> includes = new TreeSet<>(); includes.add(new IncludeTableFilter(tablePattern == null ? null : tablePattern.replaceAll("%", ".*"))); return new TableFilter(includes, new TreeSet<>()); } 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 static TableFilter include(String tablePattern) { TreeSet<IncludeTableFilter> includes = new TreeSet<>(); includes.add(new IncludeTableFilter(tablePattern == null ? null : tablePattern.replaceAll("%", ".*"))); return new TableFilter(includes, new TreeSet<>()); } 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();  }