Skip to content

Commit 218bedf

Browse files
committed
Adopt tests to PagingAndSortingRepository split.
Closes #2105
1 parent b7d6b2b commit 218bedf

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

spring-data-rest-core/src/test/java/org/springframework/data/rest/core/domain/PersonRepository.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
import org.springframework.data.domain.Page;
2222
import org.springframework.data.domain.Pageable;
23+
import org.springframework.data.repository.CrudRepository;
2324
import org.springframework.data.repository.PagingAndSortingRepository;
2425
import org.springframework.data.repository.query.Param;
2526
import org.springframework.data.rest.core.annotation.RepositoryRestResource;
@@ -32,7 +33,7 @@
3233
* @author Oliver Gierke
3334
*/
3435
@RepositoryRestResource(collectionResourceRel = "people", path = "people")
35-
public interface PersonRepository extends PagingAndSortingRepository<Person, UUID> {
36+
public interface PersonRepository extends PagingAndSortingRepository<Person, UUID>, CrudRepository<Person, UUID> {
3637

3738
@RestResource(rel = "firstname", path = "firstname")
3839
Page<Person> findByFirstName(@Param("firstName") String firstName, Pageable pageable);

spring-data-rest-tests/spring-data-rest-tests-jpa/src/main/java/org/springframework/data/rest/webmvc/jpa/PersonRepository.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import org.springframework.data.domain.Pageable;
2323
import org.springframework.data.domain.Sort;
2424
import org.springframework.data.jpa.repository.Query;
25+
import org.springframework.data.repository.CrudRepository;
2526
import org.springframework.data.repository.PagingAndSortingRepository;
2627
import org.springframework.data.repository.query.Param;
2728
import org.springframework.data.rest.core.annotation.RepositoryRestResource;
@@ -36,7 +37,7 @@
3637
* @author Oliver Gierke
3738
*/
3839
@RepositoryRestResource(collectionResourceRel = "people", path = "people")
39-
public interface PersonRepository extends PagingAndSortingRepository<Person, Long> {
40+
public interface PersonRepository extends PagingAndSortingRepository<Person, Long>, CrudRepository<Person, Long> {
4041

4142
@RestResource(rel = "firstname", path = "firstname")
4243
Page<Person> findByFirstName(@Param("firstname") String firstName, Pageable pageable);

spring-data-rest-tests/spring-data-rest-tests-mongodb/src/main/java/org/springframework/data/rest/tests/mongodb/ProfileRepository.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,15 @@
1818
import java.util.List;
1919
import java.util.Optional;
2020

21+
import org.springframework.data.repository.CrudRepository;
2122
import org.springframework.data.repository.PagingAndSortingRepository;
2223
import org.springframework.data.repository.query.Param;
2324

2425
/**
2526
* @author Jon Brisbin
2627
* @author Oliver Gierke
2728
*/
28-
public interface ProfileRepository extends PagingAndSortingRepository<Profile, String> {
29+
public interface ProfileRepository extends PagingAndSortingRepository<Profile, String>, CrudRepository<Profile, String> {
2930

3031
List<Profile> findByType(String type);
3132

spring-data-rest-tests/spring-data-rest-tests-mongodb/src/main/java/org/springframework/data/rest/tests/mongodb/UserRepository.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,14 @@
2121
import org.springframework.data.querydsl.QuerydslPredicateExecutor;
2222
import org.springframework.data.querydsl.binding.QuerydslBinderCustomizer;
2323
import org.springframework.data.querydsl.binding.QuerydslBindings;
24+
import org.springframework.data.repository.CrudRepository;
2425
import org.springframework.data.repository.PagingAndSortingRepository;
2526
import org.springframework.data.repository.query.Param;
2627

2728
/**
2829
* @author Oliver Gierke
2930
*/
30-
public interface UserRepository extends PagingAndSortingRepository<User, BigInteger>, QuerydslPredicateExecutor<User>,
31+
public interface UserRepository extends PagingAndSortingRepository<User, BigInteger>, CrudRepository<User, BigInteger>, QuerydslPredicateExecutor<User>,
3132
QuerydslBinderCustomizer<QUser> {
3233

3334
List<User> findByFirstname(String firstname);

0 commit comments

Comments
 (0)