@Test public void testGetFinalInsert() { final InsertMultiQuery insert = new InsertMultiQuery(); assertTrue(insert.queries.isEmpty()); try { insert.addQueries(new PathQuery("path3")); assertEquals(1, insert.queries.size()); insert.setMult(true); insert.addData(JsonHandler.createObjectNode().put("var1", 1)); final ObjectNode node = insert.getFinalInsert(); assertEquals(4, node.size()); } catch (final InvalidCreateOperationException e) { e.printStackTrace(); fail(e.getMessage()); } }
public final ObjectNode getFinalInsert() { final ObjectNode node = getFinal(); if (data != null && data.size() > 0) { node.set(GLOBAL.DATA.exactToken(), data); } else { node.putObject(GLOBAL.DATA.exactToken()); } return node; }
InsertMultiQuery extends RequestMultiple { public final ObjectNode getFinalInsert() { final ObjectNode node = getFinal(); if (data != null && data.size() > 0) { node.set(GLOBAL.DATA.exactToken(), data); } else { node.putObject(GLOBAL.DATA.exactToken()); } return node; } }
InsertMultiQuery extends RequestMultiple { public final ObjectNode getFinalInsert() { final ObjectNode node = getFinal(); if (data != null && data.size() > 0) { node.set(GLOBAL.DATA.exactToken(), data); } else { node.putObject(GLOBAL.DATA.exactToken()); } return node; }  }
InsertMultiQuery extends RequestMultiple { public final ObjectNode getFinalInsert() { final ObjectNode node = getFinal(); if (data != null && data.size() > 0) { node.set(GLOBAL.DATA.exactToken(), data); } else { node.putObject(GLOBAL.DATA.exactToken()); } return node; }  final InsertMultiQuery resetData(); @Override final InsertMultiQuery reset(); final InsertMultiQuery setMult(final boolean mult); final InsertMultiQuery setMult(final JsonNode filterContent); @Override final InsertMultiQuery setFilter(final JsonNode filterContent); final InsertMultiQuery addData(final ObjectNode... data); final InsertMultiQuery setData(final JsonNode dataContent); final InsertMultiQuery parseData(final String data); final ObjectNode getFinalInsert(); @Override final ObjectNode getData(); @Override String toString(); }
InsertMultiQuery extends RequestMultiple { public final ObjectNode getFinalInsert() { final ObjectNode node = getFinal(); if (data != null && data.size() > 0) { node.set(GLOBAL.DATA.exactToken(), data); } else { node.putObject(GLOBAL.DATA.exactToken()); } return node; }  final InsertMultiQuery resetData(); @Override final InsertMultiQuery reset(); final InsertMultiQuery setMult(final boolean mult); final InsertMultiQuery setMult(final JsonNode filterContent); @Override final InsertMultiQuery setFilter(final JsonNode filterContent); final InsertMultiQuery addData(final ObjectNode... data); final InsertMultiQuery setData(final JsonNode dataContent); final InsertMultiQuery parseData(final String data); final ObjectNode getFinalInsert(); @Override final ObjectNode getData(); @Override String toString();  }