I try to implement a JPA custom repository.
I have a filter object like this:
public class FilterPatient { private String surname; private String
You have a lot of built-in ways to create custom queries, for example findByNameAndSurname will work without the @Query annotation..
findByNameAndSurname
@Query
http://docs.spring.io/spring-data/jpa/docs/1.3.0.RELEASE/reference/html/jpa.repositories.html#jpa.query-methods