Exemplo n.º 1
0
 public void update(Object updated) throws ValidationFailureException, EntityNotFoundException {
   log.debug(format("Updating [%s] - %s", updated.getClass().getSimpleName(), updated.toString()));
   validator.validateUpdate(updated);
   Object original = query.findById(updated.getClass(), getPrimaryValueAsLong(updated));
   SQLGenerator sql = new SQLGenerator();
   execute(sql.getUpdateSQL(original, updated));
 }
Exemplo n.º 2
0
 public void delete(Object o) throws ValidationFailureException {
   log.debug(format("Deleting [%s] - %s", o.getClass().getSimpleName(), o.toString()));
   validator.validateDelete(o);
   SQLGenerator sql = new SQLGenerator();
   execute(sql.getDeleteSQL(o));
 }