@Test public void testRequestRange() { RangeQuery request = null; final Date date1 = new Date(System.currentTimeMillis()); final Date date2 = new Date(System.currentTimeMillis() + 100); try { request = new RangeQuery("var", QUERY.GT, 1, QUERY.LT, 2); assertTrue(request.isReady()); request = new RangeQuery("var", QUERY.GTE, 1, QUERY.LTE, 2); assertTrue(request.isReady()); request = new RangeQuery("var", QUERY.GT, 1.0, QUERY.LT, 2.0); assertTrue(request.isReady()); request = new RangeQuery("var", QUERY.GTE, 1.0, QUERY.LTE, 2.0); assertTrue(request.isReady()); request = new RangeQuery("var", QUERY.GT, "1", QUERY.LT, "2"); assertTrue(request.isReady()); request = new RangeQuery("var", QUERY.GTE, "1", QUERY.LTE, "2"); assertTrue(request.isReady()); request = new RangeQuery("var", QUERY.GT, date1, QUERY.LT, date2); assertTrue(request.isReady()); request = new RangeQuery("var", QUERY.GTE, date1, QUERY.LTE, date2); assertTrue(request.isReady()); } catch (final InvalidCreateOperationException e) { e.printStackTrace(); fail(e.getMessage()); } try { request = new RangeQuery("var", QUERY.NOT, 1, QUERY.LT, 2); fail("Should have raized an exception due to incorrect argument"); } catch (final InvalidCreateOperationException e) { assertNotNull(e); } try { request = new RangeQuery("var", QUERY.LT, 1, QUERY.LT, 2); fail("Should have raized an exception due to incorrect argument"); } catch (final InvalidCreateOperationException e) { assertNotNull(e); } try { request = new RangeQuery("var", QUERY.LT, 1, QUERY.GT, 2); fail("Should have raized an exception due to incorrect argument"); } catch (final InvalidCreateOperationException e) { assertNotNull(e); } try { request = new RangeQuery("var", QUERY.GT, 1, QUERY.NOT, 2); fail("Should have raized an exception due to incorrect argument"); } catch (final InvalidCreateOperationException e) { assertNotNull(e); } try { request = new RangeQuery("", QUERY.GT, 1, QUERY.LT, 2); fail("Should have raized an exception due to incorrect argument"); } catch (final InvalidCreateOperationException e) { assertNotNull(e); } }
public boolean isReady() { return ready; }
Query { public boolean isReady() { return ready; } }
Query { public boolean isReady() { return ready; } protected  Query(); }
Query { public boolean isReady() { return ready; } protected  Query(); void clean(); final Query setExactDepthLimit(final int exactdepth); final Query setRelativeDepthLimit(final int relativedepth); final Query setDepthLimit(final int relativedepth); ObjectNode getCurrentQuery(); JsonNode getNode(String key); JsonNode getCurrentObject(); QUERY getQUERY(); boolean isReady(); Query setExtraInfo(int val); int getExtraInfo(); final boolean isFullText(); final Query setFullText(boolean isFullText); final int getParserExactdepth(); final Query setParserExactdepth(int exactdepth); final int getParserRelativeDepth(); final Query setParserRelativeDepth(int relativedepth); @Override String toString(); }
Query { public boolean isReady() { return ready; } protected  Query(); void clean(); final Query setExactDepthLimit(final int exactdepth); final Query setRelativeDepthLimit(final int relativedepth); final Query setDepthLimit(final int relativedepth); ObjectNode getCurrentQuery(); JsonNode getNode(String key); JsonNode getCurrentObject(); QUERY getQUERY(); boolean isReady(); Query setExtraInfo(int val); int getExtraInfo(); final boolean isFullText(); final Query setFullText(boolean isFullText); final int getParserExactdepth(); final Query setParserExactdepth(int exactdepth); final int getParserRelativeDepth(); final Query setParserRelativeDepth(int relativedepth); @Override String toString(); static final String DATE; }