title: Spring Data Repo General Criteria
body: <p>I have a Spring Data repository with multiple find methods like below. </p>
  
  <pre><code>@Repository
  public interface UsersRepository extends 
  CrudRepository&lt;UserView&gt;, Integer&gt; {
  
  @Override
  Optional&lt;Users&gt; findById(Integer aLong);
  List&lt;Users&gt; findAllAccountNotNull...
  List&lt;Users&gt; findAllThat....
  List&lt;Users&gt; findAllThisToo....
  ....
  
  }
  </code></pre>
  
  <p>Now according to a new requirement, I want to add a criteria to <strong>ALL</strong> of this methods for example,</p>
  
  <pre><code>List&lt;Users&gt; findAll...NotInUserBlocked
  </code></pre>
  
  <p>So <strong>all</strong> above find statements should work with a common criteria of "find all users only who are not blocked". I can add this one by one to all find methods and also update all the methods that are calling these. But there are many. Is there a better way of doing this from a central place? And more cleanly?</p>
  
  <p>Edit: Please note that this is a view. And the soft delete I want to make is on a different entity(Account). So A field in User view is constructed by taking into account User.Account.isNotBlocked. </p>