code: @Programmatic
      public Note add(
              final Object notable,
              final String noteText,
              final LocalDate date,
              final String calendarName) {
          final Note note = repositoryService.instantiate(Note.class);
          note.setDate(date);
          note.setCalendarName(calendarName);
          note.setContent(noteText);
          repositoryService.persistAndFlush(note);
  
          final NotableLink link = notableLinkRepository.createLink(note, notable);
          // stored redundantly for querying...
          link.setCalendarName(calendarName);
          link.setDate(date);
  
          return note;
      }
docs: region > add (programmatic)