Ejemplo n.º 1
0
 public Note saveNote(Note note) {
   Notebook notebook = notebookDao.findById(1L);
   note.setNotebook(notebook);
   AbstractGenerator generator = new AbstractGenerator(note.getContext());
   note.setSummary(generator.generate(100));
   note.setContext(this.saveNoteContextToStoragge(note.getContext()));
   noteDao.save(note);
   return note;
 }
Ejemplo n.º 2
0
 public Note getNote(Long noteId) {
   Note note = noteDao.findById(noteId);
   if (StringUtils.isNotEmpty(note.getContext())) {
     note.setContext(getNoteContextFromStoragge(note.getContext()));
     note.getNotebook();
   }
   note.getNotebook();
   return note;
 }