title: Filters For Spring Data + JPA
body: <p>Is there any way to define generic filters for Spring data repositories that allow filtering out data, similar to what is available with Hibernate?  As an example it would be cool if I could do something like this:</p>
  
  <pre><code>@FilterDef(name = "clientSecurity", defaultCondition = "clientId in (:allowableClients)", parameters = { @ParamDef(name = "allowableClients", type = "Long") })
  public interface DocumentRepository extends Repository&lt;Document, Long&gt; {
      public List&lt;Document&gt; findAll();
  }
  </code></pre>
  
  <p>So in the above example, my document repository would only return all documents that belong to client in the set of allowable client ids.</p>