@Test public void testRangeRequest() { final Date date1 = new Date(System.currentTimeMillis()); final Date date2 = new Date(System.currentTimeMillis() + 100); try { Query query = range("var", 1, false, 2, false); assertTrue(query.isReady()); query = range("var", 1, true, 2, false); assertTrue(query.isReady()); query = range("var", 1, false, 2, true); assertTrue(query.isReady()); query = range("var", 1, true, 2, true); assertTrue(query.isReady()); query = range("var", 1.0, false, 2.0, false); assertTrue(query.isReady()); query = range("var", 1.0, true, 2.0, false); assertTrue(query.isReady()); query = range("var", 1.0, false, 2.0, true); assertTrue(query.isReady()); query = range("var", 1.0, true, 2.0, true); assertTrue(query.isReady()); query = range("var", "1", false, "2", false); assertTrue(query.isReady()); query = range("var", "1", true, "2", false); assertTrue(query.isReady()); query = range("var", "1", false, "2", true); assertTrue(query.isReady()); query = range("var", "1", true, "2", true); assertTrue(query.isReady()); query = range("var", date1, false, date2, false); assertTrue(query.isReady()); query = range("var", date1, true, date2, false); assertTrue(query.isReady()); query = range("var", date1, false, date2, true); assertTrue(query.isReady()); query = range("var", date1, true, date2, true); assertTrue(query.isReady()); } catch (final InvalidCreateOperationException e) { e.printStackTrace(); fail(e.getMessage()); } }
public static final RangeQuery range(final String variableName, final long min, final boolean includeMin, final long max, final boolean includeMax) throws InvalidCreateOperationException { final QUERY rmin = includeMin ? QUERY.GTE : QUERY.GT; final QUERY rmax = includeMax ? QUERY.LTE : QUERY.LT; return new RangeQuery(variableName, rmin, min, rmax, max); }
QueryHelper { public static final RangeQuery range(final String variableName, final long min, final boolean includeMin, final long max, final boolean includeMax) throws InvalidCreateOperationException { final QUERY rmin = includeMin ? QUERY.GTE : QUERY.GT; final QUERY rmax = includeMax ? QUERY.LTE : QUERY.LT; return new RangeQuery(variableName, rmin, min, rmax, max); } }
QueryHelper { public static final RangeQuery range(final String variableName, final long min, final boolean includeMin, final long max, final boolean includeMax) throws InvalidCreateOperationException { final QUERY rmin = includeMin ? QUERY.GTE : QUERY.GT; final QUERY rmax = includeMax ? QUERY.LTE : QUERY.LT; return new RangeQuery(variableName, rmin, min, rmax, max); } protected  QueryHelper(); }
QueryHelper { public static final RangeQuery range(final String variableName, final long min, final boolean includeMin, final long max, final boolean includeMax) throws InvalidCreateOperationException { final QUERY rmin = includeMin ? QUERY.GTE : QUERY.GT; final QUERY rmax = includeMax ? QUERY.LTE : QUERY.LT; return new RangeQuery(variableName, rmin, min, rmax, max); } protected  QueryHelper(); static final PathQuery path(final String... pathes); static final BooleanQuery and(); static final BooleanQuery or(); static final BooleanQuery not(); static final CompareQuery eq(final String variableName, final boolean value); static final CompareQuery eq(final String variableName, final long value); static final CompareQuery eq(final String variableName, final double value); static final CompareQuery eq(final String variableName, final String value); static final CompareQuery eq(final String variableName, final Date value); static final CompareQuery ne(final String variableName, final boolean value); static final CompareQuery ne(final String variableName, final long value); static final CompareQuery ne(final String variableName, final double value); static final CompareQuery ne(final String variableName, final String value); static final CompareQuery ne(final String variableName, final Date value); static final CompareQuery lt(final String variableName, final boolean value); static final CompareQuery lt(final String variableName, final long value); static final CompareQuery lt(final String variableName, final double value); static final CompareQuery lt(final String variableName, final String value); static final CompareQuery lt(final String variableName, final Date value); static final CompareQuery lte(final String variableName, final boolean value); static final CompareQuery lte(final String variableName, final long value); static final CompareQuery lte(final String variableName, final double value); static final CompareQuery lte(final String variableName, final String value); static final CompareQuery lte(final String variableName, final Date value); static final CompareQuery gt(final String variableName, final boolean value); static final CompareQuery gt(final String variableName, final long value); static final CompareQuery gt(final String variableName, final double value); static final CompareQuery gt(final String variableName, final String value); static final CompareQuery gt(final String variableName, final Date value); static final CompareQuery gte(final String variableName, final boolean value); static final CompareQuery gte(final String variableName, final long value); static final CompareQuery gte(final String variableName, final double value); static final CompareQuery gte(final String variableName, final String value); static final CompareQuery gte(final String variableName, final Date value); static final CompareQuery size(final String variableName, final long value); static final ExistsQuery exists(final String variableName); @Deprecated static final ExistsQuery missing(final String variableName); static final ExistsQuery isNull(final String variableName); static final InQuery in(final String variableName, final boolean... value); static final InQuery in(final String variableName, final long... value); static final InQuery in(final String variableName, final double... value); static final InQuery in(final String variableName, final String... value); static final InQuery in(final String variableName, final Date... value); static final InQuery nin(final String variableName, final boolean... value); static final InQuery nin(final String variableName, final long... value); static final InQuery nin(final String variableName, final double... value); static final InQuery nin(final String variableName, final String... value); static final InQuery nin(final String variableName, final Date... value); static final MatchQuery match(final String variableName, final String value); static final MatchQuery matchAll(final String variableName, final String value); static final MatchQuery matchPhrase(final String variableName,
        final String value); static final MatchQuery matchPhrasePrefix(final String variableName,
        final String value); static final SearchQuery regex(final String variableName, final String value); static final SearchQuery search(final String variableName, final String value); static final NestedQuery nestedSearch(final String variableName, final JsonNode value); static final TermQuery term(final String variableName, final String value); static final TermQuery term(final String variableName, final long value); static final TermQuery term(final String variableName, final double value); static final TermQuery term(final String variableName, final boolean value); static final TermQuery term(final String variableName, final Date value); static final TermQuery term(final Map<String, Object> variableNameValue); static final WildcardQuery wildcard(final String variableName,
        final String value); static final MltQuery flt(final String value, final String... variableName); static final MltQuery mlt(final String value, final String... variableName); static final RangeQuery range(final String variableName, final long min,
        final boolean includeMin, final long max,
        final boolean includeMax); static final RangeQuery range(final String variableName, final double min,
        final boolean includeMin,
        final double max, final boolean includeMax); static final RangeQuery range(final String variableName, final String min,
        final boolean includeMin,
        final String max, final boolean includeMax); static final RangeQuery range(final String variableName, final Date min,
        final boolean includeMin, final Date max,
        final boolean includeMax); }
QueryHelper { public static final RangeQuery range(final String variableName, final long min, final boolean includeMin, final long max, final boolean includeMax) throws InvalidCreateOperationException { final QUERY rmin = includeMin ? QUERY.GTE : QUERY.GT; final QUERY rmax = includeMax ? QUERY.LTE : QUERY.LT; return new RangeQuery(variableName, rmin, min, rmax, max); } protected  QueryHelper(); static final PathQuery path(final String... pathes); static final BooleanQuery and(); static final BooleanQuery or(); static final BooleanQuery not(); static final CompareQuery eq(final String variableName, final boolean value); static final CompareQuery eq(final String variableName, final long value); static final CompareQuery eq(final String variableName, final double value); static final CompareQuery eq(final String variableName, final String value); static final CompareQuery eq(final String variableName, final Date value); static final CompareQuery ne(final String variableName, final boolean value); static final CompareQuery ne(final String variableName, final long value); static final CompareQuery ne(final String variableName, final double value); static final CompareQuery ne(final String variableName, final String value); static final CompareQuery ne(final String variableName, final Date value); static final CompareQuery lt(final String variableName, final boolean value); static final CompareQuery lt(final String variableName, final long value); static final CompareQuery lt(final String variableName, final double value); static final CompareQuery lt(final String variableName, final String value); static final CompareQuery lt(final String variableName, final Date value); static final CompareQuery lte(final String variableName, final boolean value); static final CompareQuery lte(final String variableName, final long value); static final CompareQuery lte(final String variableName, final double value); static final CompareQuery lte(final String variableName, final String value); static final CompareQuery lte(final String variableName, final Date value); static final CompareQuery gt(final String variableName, final boolean value); static final CompareQuery gt(final String variableName, final long value); static final CompareQuery gt(final String variableName, final double value); static final CompareQuery gt(final String variableName, final String value); static final CompareQuery gt(final String variableName, final Date value); static final CompareQuery gte(final String variableName, final boolean value); static final CompareQuery gte(final String variableName, final long value); static final CompareQuery gte(final String variableName, final double value); static final CompareQuery gte(final String variableName, final String value); static final CompareQuery gte(final String variableName, final Date value); static final CompareQuery size(final String variableName, final long value); static final ExistsQuery exists(final String variableName); @Deprecated static final ExistsQuery missing(final String variableName); static final ExistsQuery isNull(final String variableName); static final InQuery in(final String variableName, final boolean... value); static final InQuery in(final String variableName, final long... value); static final InQuery in(final String variableName, final double... value); static final InQuery in(final String variableName, final String... value); static final InQuery in(final String variableName, final Date... value); static final InQuery nin(final String variableName, final boolean... value); static final InQuery nin(final String variableName, final long... value); static final InQuery nin(final String variableName, final double... value); static final InQuery nin(final String variableName, final String... value); static final InQuery nin(final String variableName, final Date... value); static final MatchQuery match(final String variableName, final String value); static final MatchQuery matchAll(final String variableName, final String value); static final MatchQuery matchPhrase(final String variableName,
        final String value); static final MatchQuery matchPhrasePrefix(final String variableName,
        final String value); static final SearchQuery regex(final String variableName, final String value); static final SearchQuery search(final String variableName, final String value); static final NestedQuery nestedSearch(final String variableName, final JsonNode value); static final TermQuery term(final String variableName, final String value); static final TermQuery term(final String variableName, final long value); static final TermQuery term(final String variableName, final double value); static final TermQuery term(final String variableName, final boolean value); static final TermQuery term(final String variableName, final Date value); static final TermQuery term(final Map<String, Object> variableNameValue); static final WildcardQuery wildcard(final String variableName,
        final String value); static final MltQuery flt(final String value, final String... variableName); static final MltQuery mlt(final String value, final String... variableName); static final RangeQuery range(final String variableName, final long min,
        final boolean includeMin, final long max,
        final boolean includeMax); static final RangeQuery range(final String variableName, final double min,
        final boolean includeMin,
        final double max, final boolean includeMax); static final RangeQuery range(final String variableName, final String min,
        final boolean includeMin,
        final String max, final boolean includeMax); static final RangeQuery range(final String variableName, final Date min,
        final boolean includeMin, final Date max,
        final boolean includeMax);  }