title: Spring Data JPA - repository findAll method using flag column
body: <p>I want to use the method findAll in a repository, but I`d like it to return just entities which have a certain value. For example, I want it to return just entities which are active = 1. Is there a way to do that?</p>
  
  <p>Now I have to write for all my repositories something like this: </p>
  
  <pre><code>@Query("select p from Parameter p where p.active = 1")
  public List&lt;Parameter&gt; findAll();
  </code></pre>
  
  <p>Instead of using the findOne method I have to write this in all my repositories:</p>
  
  <pre><code>@Query("select p from Parameter p where p.active = 1 and p.id=?1")
  public Parameter findById(Long id);
  </code></pre>
  
  <p>Is there a better way to apply a blanket filter to all queries?</p>