public void delete(long id) {
dao.delete(Comment.class, id);
}
public Comment update(long id, String author, String content) {
Comment comment = dao.find(Comment.class, id);
if (comment == null) {
throw new IllegalArgumentException("comment with id " + id + " not found");
}
comment.setAuthor(author);
comment.setContent(content);
return dao.update(comment);
}