@Test public void testAddActions() { final UpdateMultiQuery update = new UpdateMultiQuery(); assertTrue(update.actions.isEmpty()); try { update.addActions(new AddAction("varname", 1).add(true)); update.addActions(new IncAction("varname2", 2)); update.addActions(new PullAction("varname3", true).add("val")); update.addActions(new PopAction("varname4")); update.addActions(new PushAction("varname5", "val").add(1.0)); update.addActions(new RenameAction("varname6", "varname7")); update.addActions(new SetAction("varname8", "val").add("varname9", 1)); update.addActions(new UnsetAction("varname10", "varname11").add("varname12")); assertEquals(8, update.actions.size()); update.resetActions(); assertEquals(0, update.actions.size()); } catch (final InvalidCreateOperationException e) { e.printStackTrace(); fail(e.getMessage()); } }
public final UpdateMultiQuery addActions(final Action... action) throws InvalidCreateOperationException { for (final Action act : action) { if (!act.isReady()) { throw new InvalidCreateOperationException( "Action is not ready to be added: " + act.getCurrentAction()); } actions.add(act); } return this; }
UpdateMultiQuery extends RequestMultiple { public final UpdateMultiQuery addActions(final Action... action) throws InvalidCreateOperationException { for (final Action act : action) { if (!act.isReady()) { throw new InvalidCreateOperationException( "Action is not ready to be added: " + act.getCurrentAction()); } actions.add(act); } return this; } }
UpdateMultiQuery extends RequestMultiple { public final UpdateMultiQuery addActions(final Action... action) throws InvalidCreateOperationException { for (final Action act : action) { if (!act.isReady()) { throw new InvalidCreateOperationException( "Action is not ready to be added: " + act.getCurrentAction()); } actions.add(act); } return this; }  }
UpdateMultiQuery extends RequestMultiple { public final UpdateMultiQuery addActions(final Action... action) throws InvalidCreateOperationException { for (final Action act : action) { if (!act.isReady()) { throw new InvalidCreateOperationException( "Action is not ready to be added: " + act.getCurrentAction()); } actions.add(act); } return this; }  final UpdateMultiQuery resetActions(); @Override final UpdateMultiQuery reset(); final UpdateMultiQuery setMult(final boolean mult); final UpdateMultiQuery setMult(final JsonNode filterContent); @Override final UpdateMultiQuery setFilter(final JsonNode filterContent); final UpdateMultiQuery addActions(final Action... action); final ObjectNode getFinalUpdateById(); final ObjectNode getFinalUpdate(); @Override final List<Action> getActions(); @Override String toString(); }
UpdateMultiQuery extends RequestMultiple { public final UpdateMultiQuery addActions(final Action... action) throws InvalidCreateOperationException { for (final Action act : action) { if (!act.isReady()) { throw new InvalidCreateOperationException( "Action is not ready to be added: " + act.getCurrentAction()); } actions.add(act); } return this; }  final UpdateMultiQuery resetActions(); @Override final UpdateMultiQuery reset(); final UpdateMultiQuery setMult(final boolean mult); final UpdateMultiQuery setMult(final JsonNode filterContent); @Override final UpdateMultiQuery setFilter(final JsonNode filterContent); final UpdateMultiQuery addActions(final Action... action); final ObjectNode getFinalUpdateById(); final ObjectNode getFinalUpdate(); @Override final List<Action> getActions(); @Override String toString();  }