@Override public SickNoteComment create( SickNote sickNote, SickNoteStatus status, Optional<String> text, Person author) { SickNoteComment comment = new SickNoteComment(); comment.setSickNote(sickNote); comment.setDate(DateMidnight.now()); comment.setStatus(status); comment.setPerson(author); if (text.isPresent()) { comment.setText(text.get()); } commentDAO.save(comment); return comment; }
@Override public List<SickNoteComment> getCommentsBySickNote(SickNote sickNote) { return commentDAO.getCommentsBySickNote(sickNote); }