@Test @DisplayName("keep multiple filters for single column") void keepManyFiltersForColumn() throws ParseException { String columnName = "time"; Column column = column(); Timestamp startTime = Timestamps.parse("2000-01-01T10:00:00.000-05:00"); Timestamp deadline = Timestamps.parse("2017-01-01T10:00:00.000-05:00"); Filter startTimeFilter = gt(columnName, startTime); Filter deadlineFilter = le(columnName, deadline); Multimap<Column, Filter> filterMap = ImmutableMultimap.<Column, Filter>builder() .put(column, startTimeFilter) .put(column, deadlineFilter) .build(); CompositeQueryParameter parameter = CompositeQueryParameter.from(filterMap, ALL); QueryParameters parameters = newBuilder().add(parameter) .build(); List<CompositeQueryParameter> aggregatingParameters = newArrayList(parameters); assertThat(aggregatingParameters).hasSize(1); Multimap<Column, Filter> actualFilters = aggregatingParameters.get(0) .filters(); Collection<Filter> timeFilters = actualFilters.get(column); IterableSubject assertTimeFilters = assertThat(timeFilters); assertTimeFilters.hasSize(2); assertTimeFilters.containsExactly(startTimeFilter, deadlineFilter); }
public static Builder newBuilder() { return new Builder(); }
QueryParameters implements Iterable<CompositeQueryParameter> { public static Builder newBuilder() { return new Builder(); } }
QueryParameters implements Iterable<CompositeQueryParameter> { public static Builder newBuilder() { return new Builder(); } private  QueryParameters(Builder builder); }
QueryParameters implements Iterable<CompositeQueryParameter> { public static Builder newBuilder() { return new Builder(); } private  QueryParameters(Builder builder); static Builder newBuilder(); static Builder newBuilder(QueryParameters parameters); static QueryParameters activeEntityQueryParams(RecordStorage<?> storage); @Override Iterator<CompositeQueryParameter> iterator(); boolean isLifecycleAttributesSet(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
QueryParameters implements Iterable<CompositeQueryParameter> { public static Builder newBuilder() { return new Builder(); } private  QueryParameters(Builder builder); static Builder newBuilder(); static Builder newBuilder(QueryParameters parameters); static QueryParameters activeEntityQueryParams(RecordStorage<?> storage); @Override Iterator<CompositeQueryParameter> iterator(); boolean isLifecycleAttributesSet(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }