Notes theNote = new Notes(noteName);
if (notesService.findOne(theNote.getFileName()) == null) {
Set<Users> noteUsers = new HashSet<Users>();
noteUsers.add(u);
theNote.setUsers(noteUsers);
notesService.save(theNote);
userFromDB.addNote(theNote);
Users savedUser = usersService.save(userFromDB.getId(), userFromDB);
session.setAttribute("userSession", savedUser);
}