@Override public void addAll(Serializable[]... tuples) throws NoSuchRelationException { List<BasicEdit> ops = new ArrayList<BasicEdit>(tuples.length); for (Serializable[] tuple : tuples) ops.add(new AddTuple(tuple)); EditDataResponse resp = browser.editData(editRequest(new BatchEdit(ops))); checkOther(check(resp, NoSuchRelationException.class)); }
@Override public void add(Serializable... fields) throws NoSuchRelationException { EditDataResponse resp = browser.editData(editRequest(new AddTuple(fields))); checkOther(check(resp, NoSuchRelationException.class)); }
@Override public int delete(Condition condition) throws NoSuchFieldInRelationException, NoSuchRelationException { EditDataResponse resp = browser.editData(editRequest(new DeleteTuples(condition))); checkOther(check(check(resp, NoSuchRelationException.class), NoSuchFieldInRelationException.class)); return resp.getCount(); }
@Override public int addOrUpdate(Condition condition, Serializable[] tuple) throws NoSuchFieldInRelationException, NoSuchRelationException { EditDataResponse resp = browser.editData(editRequest(new UpdateTuples(condition, tuple, true))); checkOther(check(check(resp, NoSuchRelationException.class), NoSuchFieldInRelationException.class)); return resp.getCount(); }
@Override public int update(Condition condition, Serializable[] tuple) throws NoSuchFieldInRelationException, NoSuchRelationException { EditDataResponse resp = browser.editData(editRequest(new UpdateTuples(condition, tuple))); checkOther(check(check(resp, NoSuchRelationException.class), NoSuchFieldInRelationException.class)); return resp.getCount(); }