use of org.apache.isis.applib.services.bookmark.Bookmark in project estatio by estatio.
the class PaperclipRepository method findByAttachedTo.
// endregion
// region > findByAttachedTo (programmatic)
@Programmatic
public List<Paperclip> findByAttachedTo(final Object attachedTo) {
if (attachedTo == null) {
return null;
}
final Bookmark bookmark = bookmarkService.bookmarkFor(attachedTo);
if (bookmark == null) {
return null;
}
final String attachedToStr = bookmark.toString();
return repositoryService.allMatches(new QueryDefault<>(Paperclip.class, "findByAttachedTo", "attachedToStr", attachedToStr));
}
Aggregations