@Programmatic
    public List<Paperclip> findByDocument(final DocumentAbstract document) {
        return repositoryService.allMatches(
                new QueryDefault<>(Paperclip.class,
                        "findByDocument",
                        "document", document));
    }
@ Programmatic public List < Paperclip > findByDocument ( final DocumentAbstract document ) { return repositoryService . allMatches ( new QueryDefault < > ( Paperclip . class , "findByDocument" , "document" , document ) ) ; }
region > findByDocument (programmatic)