title: What is the difference between a criteria, a predicate, and a specification?
body: <p>In the <a href="https://docs.spring.io/spring-data/jpa/docs/2.0.1.RELEASE/reference/html/#specifications" rel="noreferrer">Spring Data JPA - Reference Documentation</a>, a criteria is defined by:</p>
  
  <blockquote>
    <p>Writing a criteria you actually define the where-clause of a query for a domain class.</p>
  </blockquote>
  
  <p>Specifications and predicates seem to have the same role.</p>
  
  <p>What is the difference between a <a href="https://docs.oracle.com/javaee/7/api/javax/persistence/criteria/CriteriaQuery.html" rel="noreferrer">criteria</a>, a <a href="https://docs.oracle.com/javaee/7/api/javax/persistence/criteria/Predicate.html" rel="noreferrer">predicate</a> and a <a href="https://docs.spring.io/spring-data/jpa/docs/current/api/org/springframework/data/jpa/domain/Specification.html" rel="noreferrer">specification</a>?</p>