code: @Programmatic
      public Paperclip findByDocumentAndAttachedToAndRoleName(
              final DocumentAbstract<?> document,
              final Object attachedTo,
              final String roleName) {
          if(document == null) {
              return null;
          }
          if(attachedTo == null) {
              return null;
          }
          if(roleName == null) {
              return null;
          }
          final Bookmark bookmark = bookmarkService.bookmarkFor(attachedTo);
          if(bookmark == null) {
              return null;
          }
          final String attachedToStr = bookmark.toString();
          return repositoryService.firstMatch(
                  new QueryDefault<>(Paperclip.class,
                          "findByDocumentAndAttachedToAndRoleName",
                          "document", document,
                          "attachedToStr", attachedToStr,
                          "roleName", roleName));
      }
docs: region > findByDocumentAndAttachedToAndRoleName (programmatic)