/** * Check if for a given set of request filters, adding in the filters for this `DataSourceFilter` there is a * corresponding row. * This method should never be called with a dimension that isn't a key in {@link #dimensionKeySelectFilters} * * @param dimension The dimension whose rows are being tested on. * @param constraintFilters The api filters from the constraint * * @return true if for this dimension there are rows matching the query filters AND the embedded filters. */ protected boolean anyRowsMatch(@NotNull Dimension dimension, @NotNull Set<ApiFilter> constraintFilters) { if (!dimensionKeySelectFilters.containsKey(dimension)) { throw new IllegalArgumentException( "Any rows match should only be called with dimensions defined on this filter." ); } Set<ApiFilter> combinedFilters = StreamUtils.append( constraintFilters, dimensionKeySelectFilters.get(dimension) ); return dimension.getSearchProvider().hasAnyRows(combinedFilters); }