return q.getResultList();
}
@Override
public void deleteNote(Long id) {
Note n = entityManager.find(Note.class, id);
if (n != null) {
entityManager.remove(n);
if (n.getSchedulingExpression() != null) {
try {
scheduler.unscheduleJob("triggerId" + id, null);
} catch (SchedulerException e) {
log.error("Not possible to unschedule note after deletion. Error message: \n {}", e);
}