@Test public void testAddFacets() { final SelectMultiQuery select = new SelectMultiQuery(); assertTrue(select.facets.isEmpty()); try { select.addFacets(new TermsFacet("myFacet1", "myField1", 5, FacetOrder.ASC), new TermsFacet("myFacet2", "myField2", 10, FacetOrder.ASC)); select.addFacets(new TermsFacet("myFacet3", "myField3", 5, FacetOrder.ASC)); assertEquals(3, select.getFacets().size()); select.setFacet(new TermsFacet("myFacet1", "myField1", 1, FacetOrder.DESC)); assertEquals(1, select.getFacets().size()); select.resetFacets(); assertEquals(0, select.getFacets().size()); } catch (final InvalidCreateOperationException e) { e.printStackTrace(); fail(e.getMessage()); } assertThatThrownBy(() -> { final SelectMultiQuery selectNull = new SelectMultiQuery(); selectNull.addFacets((Facet) null); }).isInstanceOf(IllegalArgumentException.class); assertThatCode(() -> { final SelectMultiQuery selectNull = new SelectMultiQuery(); selectNull.addFacets(new Facet[0]); }).doesNotThrowAnyException(); }
public final SelectMultiQuery addFacets(final Facet... facets) { for (final Facet facet : facets) { ParametersChecker.checkParameter("Facet is a mandatory parameter", facet); this.facets.add(facet); } return this; }
SelectMultiQuery extends RequestMultiple { public final SelectMultiQuery addFacets(final Facet... facets) { for (final Facet facet : facets) { ParametersChecker.checkParameter("Facet is a mandatory parameter", facet); this.facets.add(facet); } return this; } }
SelectMultiQuery extends RequestMultiple { public final SelectMultiQuery addFacets(final Facet... facets) { for (final Facet facet : facets) { ParametersChecker.checkParameter("Facet is a mandatory parameter", facet); this.facets.add(facet); } return this; }  }
SelectMultiQuery extends RequestMultiple { public final SelectMultiQuery addFacets(final Facet... facets) { for (final Facet facet : facets) { ParametersChecker.checkParameter("Facet is a mandatory parameter", facet); this.facets.add(facet); } return this; }  final SelectMultiQuery resetFacets(); final SelectMultiQuery resetLimitFilter(); final SelectMultiQuery resetOrderByFilter(); final SelectMultiQuery resetUsedProjection(); final SelectMultiQuery resetUsageProjection(); @Override final SelectMultiQuery reset(); final SelectMultiQuery setLimitFilter(final long offset, final long limit); final SelectMultiQuery setLimitFilter(final JsonNode filterContent); final SelectMultiQuery parseLimitFilter(final String filter); final SelectMultiQuery addOrderByAscFilter(final String... variableNames); final SelectMultiQuery addOrderByDescFilter(final String... variableNames); final SelectMultiQuery addOrderByFilter(final JsonNode filterContent); final SelectMultiQuery parseOrderByFilter(final String filter); @Override final SelectMultiQuery setFilter(final JsonNode filterContent); final SelectMultiQuery addUsedProjection(final String... variableNames); final SelectMultiQuery addUnusedProjection(final String... variableNames); final SelectMultiQuery addProjection(final JsonNode projectionContent); final SelectMultiQuery parseProjection(final String projection); void setProjectionSliceOnQualifier(String... additionalFields); final SelectMultiQuery setUsageProjection(final String usage); final SelectMultiQuery setUsageProjection(final JsonNode projectionContent); final SelectMultiQuery setProjection(final JsonNode projectionContent); final ObjectNode getFinalSelect(); final ObjectNode getFinalSelectById(); @Override final boolean getAllProjection(); @Override final ObjectNode getProjection(); final List<Facet> getFacets(); final SelectMultiQuery addFacets(final Facet... facets); SelectMultiQuery setFacet(Facet facet); final SelectMultiQuery setScrollFilter(final String scrollId, final int scrollTimeout, final int limit); Long getThreshold(); void setThreshold(Long threshold); @Override String toString(); }
SelectMultiQuery extends RequestMultiple { public final SelectMultiQuery addFacets(final Facet... facets) { for (final Facet facet : facets) { ParametersChecker.checkParameter("Facet is a mandatory parameter", facet); this.facets.add(facet); } return this; }  final SelectMultiQuery resetFacets(); final SelectMultiQuery resetLimitFilter(); final SelectMultiQuery resetOrderByFilter(); final SelectMultiQuery resetUsedProjection(); final SelectMultiQuery resetUsageProjection(); @Override final SelectMultiQuery reset(); final SelectMultiQuery setLimitFilter(final long offset, final long limit); final SelectMultiQuery setLimitFilter(final JsonNode filterContent); final SelectMultiQuery parseLimitFilter(final String filter); final SelectMultiQuery addOrderByAscFilter(final String... variableNames); final SelectMultiQuery addOrderByDescFilter(final String... variableNames); final SelectMultiQuery addOrderByFilter(final JsonNode filterContent); final SelectMultiQuery parseOrderByFilter(final String filter); @Override final SelectMultiQuery setFilter(final JsonNode filterContent); final SelectMultiQuery addUsedProjection(final String... variableNames); final SelectMultiQuery addUnusedProjection(final String... variableNames); final SelectMultiQuery addProjection(final JsonNode projectionContent); final SelectMultiQuery parseProjection(final String projection); void setProjectionSliceOnQualifier(String... additionalFields); final SelectMultiQuery setUsageProjection(final String usage); final SelectMultiQuery setUsageProjection(final JsonNode projectionContent); final SelectMultiQuery setProjection(final JsonNode projectionContent); final ObjectNode getFinalSelect(); final ObjectNode getFinalSelectById(); @Override final boolean getAllProjection(); @Override final ObjectNode getProjection(); final List<Facet> getFacets(); final SelectMultiQuery addFacets(final Facet... facets); SelectMultiQuery setFacet(Facet facet); final SelectMultiQuery setScrollFilter(final String scrollId, final int scrollTimeout, final int limit); Long getThreshold(); void setThreshold(Long threshold); @Override String toString();  }