title: JPA custom findOne and findAll
body: <p>I have a table place that contain as column "state" (it is an Enum that can be 'ACTIVE' or 'INACTIVE')</p>
  
  <p>I would like to know if there is a way with JPA2 that when i call placeRepository.findAll() or placeRepository.getOne(id) only select the row in the database that are marked as "ACTIVE" ?</p>
  
  <p>something like this   </p>
  
  <pre><code>List&lt;Place&gt; findByStateActiveOnly();
  </code></pre>
  
  <p><strong>EDIT:</strong>
  Bonus question:
  I'am at the moment refactoring my project to be able to add a place (and other entities) in a pending state. Because I have added an extra column "state" now i have to add to ALL my queries this condition  <code>"AND p.state=my.package.State.ACTIVE"</code> like this;</p>
  
  <pre><code>@Query("select p from Place p where p.idPlace = ?1 AND p.state=my.package.State.ACTIVE") 
  </code></pre>
  
  <p>Isn't there a way to tell jpa to automatically select me if the state is ACTIVE ?</p>
  
  <p>Thank you!</p>