Follow through with the split of CRUD repository and sorting repository.
See #1165
This commit is contained in:
@@ -23,6 +23,7 @@ import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.data.jdbc.core.JdbcAggregateOperations;
|
||||
import org.springframework.data.mapping.PersistentEntity;
|
||||
import org.springframework.data.repository.CrudRepository;
|
||||
import org.springframework.data.repository.PagingAndSortingRepository;
|
||||
import org.springframework.data.util.Streamable;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -36,7 +37,7 @@ import org.springframework.util.Assert;
|
||||
* @author Milan Milanov
|
||||
*/
|
||||
@Transactional(readOnly = true)
|
||||
public class SimpleJdbcRepository<T, ID> implements PagingAndSortingRepository<T, ID> {
|
||||
public class SimpleJdbcRepository<T, ID> implements CrudRepository<T,ID>, PagingAndSortingRepository<T, ID> {
|
||||
|
||||
private final JdbcAggregateOperations entityOperations;
|
||||
private final PersistentEntity<T, ?> entity;
|
||||
|
||||
@@ -52,6 +52,7 @@ import org.springframework.data.relational.core.dialect.H2Dialect;
|
||||
import org.springframework.data.relational.core.dialect.HsqlDbDialect;
|
||||
import org.springframework.data.relational.core.mapping.RelationalMappingContext;
|
||||
import org.springframework.data.relational.core.mapping.event.*;
|
||||
import org.springframework.data.repository.CrudRepository;
|
||||
import org.springframework.data.repository.PagingAndSortingRepository;
|
||||
import org.springframework.jdbc.core.JdbcOperations;
|
||||
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcOperations;
|
||||
@@ -297,7 +298,7 @@ public class SimpleJdbcRepositoryEventsUnitTests {
|
||||
return operations;
|
||||
}
|
||||
|
||||
interface DummyEntityRepository extends PagingAndSortingRepository<DummyEntity, Long> {}
|
||||
interface DummyEntityRepository extends CrudRepository<DummyEntity, Long>, PagingAndSortingRepository<DummyEntity, Long> {}
|
||||
|
||||
@Value
|
||||
@With
|
||||
|
||||
Reference in New Issue
Block a user