public Boolean delete(QuestionUI question) { Question existing = qaRepo.findBySubject(question.getSubject()); if (existing == null) { return false; } qaRepo.delete(existing); return true; }
public QuestionUI update(QuestionUI question) { Question existing = qaRepo.findBySubject(question.getSubject()); return qMapper.toUIBean(qaRepo.save(existing)); }