DATAJPA-176 - Introduce Querydsl abstraction.
Introduced Querydsl helper class to allow using more functionality from QuerydslJpaRepository as well as QuerydslRepositorySupport. Moved applyPagination(…) and applySorting(…) methods into that helper class. Removed QuerydslUtils and moved functionality into Querydsl helper. This change breaks exposed API in Querydsl repo and repo support classes.
This commit is contained in:
@@ -24,6 +24,7 @@ import javax.persistence.PersistenceContext;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.jpa.domain.sample.User;
|
||||
import org.springframework.data.jpa.repository.support.QueryDslRepositorySupportTests.UserRepository;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
@@ -63,6 +64,10 @@ public class QueryDslRepositorySupportIntegrationTests {
|
||||
|
||||
static class ReconfiguringUserRepositoryImpl extends QueryDslRepositorySupport {
|
||||
|
||||
public ReconfiguringUserRepositoryImpl() {
|
||||
super(User.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
@PersistenceContext(unitName = "querydsl")
|
||||
public void setEntityManager(EntityManager entityManager) {
|
||||
|
||||
@@ -127,6 +127,10 @@ public class QueryDslRepositorySupportTests {
|
||||
|
||||
private static final QUser user = QUser.user;
|
||||
|
||||
public UserRepositoryImpl() {
|
||||
super(User.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
@PersistenceContext(unitName = "default")
|
||||
public void setEntityManager(EntityManager entityManager) {
|
||||
|
||||
Reference in New Issue
Block a user