dom/src/main/java/org/incode/module/note/dom/impl/notablelink/NotableLinkRepository.java
@Programmatic
    public NotableLink createLink(
            final Note note,
            final Object notable) {

        final Class<? extends NotableLink> subtype = subtypeClassFor(notable);

        final NotableLink link = repositoryService.instantiate(subtype);

        link.setNote(note);

        final Bookmark bookmark = bookmarkService.bookmarkFor(notable);
        link.setNotable(notable);
        link.setNotableStr(bookmark.toString());

        repositoryService.persistAndFlush(link);

        return link;
    }
@Programmatic
    public NotableLink createLink(
            final Note note,
            final Object notable) {

        final Class<? extends NotableLink> subtype = subtypeClassFor(notable);

        final NotableLink link = repositoryService.instantiate(subtype);

        link.setNote(note);

        final Bookmark bookmark = bookmarkService.bookmarkFor(notable);
        link.setNotable(notable);
        link.setNotableStr(bookmark.toString());

        repositoryService.persistAndFlush(link);

        return link;
    }
region > createLink (programmatic)