What is the difference between spring-data-jpa Repository pattern Vs Querydsl query pattern?
<p>I am devloping <code>Spring MVC + spring-data-jpa + Hibernate</code> example. I'm using simple <code>Repository</code> (by <code>extending JpaRepository&lt;T, ID extends Serializable&gt;</code>) pattern to perform querying on <code>DataSource(DS)</code> and get the result. Even I can write any custom query as per my business needs.</p>

<p>While doing research, I find the <code>"querydsl-sql"</code> API. This API uses plugins and need to use <code>QueryDslPredicateExecutor&lt;T&gt;</code> like (by </p>

<pre><code>extending JpaRepository&lt;T, ID extends Serializable&gt;,
QueryDslPredicateExecutor&lt;T&gt;)
</code></pre>

<p>. But on high level it look to me that this API also does the same thing that <code>Repository</code> API does.</p>

<p>Could someone please suggest / guide what is the difference between two methods? One use simple Repository and another uses QueryDslPredicateExecutor</p>

<pre><code>List&lt;Customer&gt; findByCustomerNumberAndCustomerId(Integer customerNumber, Integer customerId);
</code></pre>

<p>Querydsl method</p>

<pre><code>    @Query("select c from Customer c where c.customerNumber=:customerNumber and c.customerId=:customerId")
    List&lt;Customer&gt; findByCustomerNumberAndCustomerId(@Param("customerNumber") 
Integer customerNumber, @Param("customerId") Integer customerId);
</code></pre>