Class SimpleR2dbcRepository<T,ID>
java.lang.Object
org.springframework.data.r2dbc.repository.support.SimpleR2dbcRepository<T,ID>
- All Implemented Interfaces:
R2dbcRepository<T,,ID> org.springframework.data.repository.query.ReactiveQueryByExampleExecutor<T>,org.springframework.data.repository.reactive.ReactiveCrudRepository<T,,ID> org.springframework.data.repository.reactive.ReactiveSortingRepository<T,,ID> org.springframework.data.repository.Repository<T,ID>
@Transactional(readOnly=true)
public class SimpleR2dbcRepository<T,ID>
extends Object
implements R2dbcRepository<T,ID>
Simple
ReactiveSortingRepository implementation using R2DBC through DatabaseClient.- Author:
- Mark Paluch, Jens Schauder, Mingyuan Wu, Stephen Cohen, Greg Turnquist
-
Constructor Summary
ConstructorsConstructorDescriptionSimpleR2dbcRepository(RelationalEntityInformation<T, ID> entity, R2dbcEntityOperations entityOperations, R2dbcConverter converter) Create a newSimpleR2dbcRepository.SimpleR2dbcRepository(RelationalEntityInformation<T, ID> entity, org.springframework.r2dbc.core.DatabaseClient databaseClient, R2dbcConverter converter, ReactiveDataAccessStrategy accessStrategy) Create a newSimpleR2dbcRepository. -
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<Long>count()count(org.springframework.data.domain.Example<S> example) reactor.core.publisher.Mono<Void>reactor.core.publisher.Mono<Void>reactor.core.publisher.Mono<Void>reactor.core.publisher.Mono<Void>reactor.core.publisher.Mono<Void>deleteAllById(Iterable<? extends ID> ids) reactor.core.publisher.Mono<Void>deleteById(ID id) reactor.core.publisher.Mono<Void>deleteById(org.reactivestreams.Publisher<ID> idPublisher) exists(org.springframework.data.domain.Example<S> example) reactor.core.publisher.Mono<Boolean>existsById(ID id) reactor.core.publisher.Mono<Boolean>existsById(org.reactivestreams.Publisher<ID> publisher) reactor.core.publisher.Flux<T>findAll()<S extends T>
reactor.core.publisher.Flux<S>findAll(org.springframework.data.domain.Example<S> example) <S extends T>
reactor.core.publisher.Flux<S>findAll(org.springframework.data.domain.Example<S> example, org.springframework.data.domain.Sort sort) reactor.core.publisher.Flux<T>findAll(org.springframework.data.domain.Sort sort) reactor.core.publisher.Flux<T>findAllById(Iterable<ID> iterable) reactor.core.publisher.Flux<T>findAllById(org.reactivestreams.Publisher<ID> idPublisher) <S extends T,R, P extends org.reactivestreams.Publisher<R>>
PfindBy(org.springframework.data.domain.Example<S> example, Function<org.springframework.data.repository.query.FluentQuery.ReactiveFluentQuery<S>, P> queryFunction) reactor.core.publisher.Mono<T>reactor.core.publisher.Mono<T><S extends T>
reactor.core.publisher.Mono<S>findOne(org.springframework.data.domain.Example<S> example) <S extends T>
reactor.core.publisher.Mono<S>save(S objectToSave) <S extends T>
reactor.core.publisher.Flux<S><S extends T>
reactor.core.publisher.Flux<S>saveAll(org.reactivestreams.Publisher<S> objectsToSave)
-
Constructor Details
-
SimpleR2dbcRepository
public SimpleR2dbcRepository(RelationalEntityInformation<T, ID> entity, R2dbcEntityOperations entityOperations, R2dbcConverter converter) Create a newSimpleR2dbcRepository.- Parameters:
entity-entityOperations-converter-- Since:
- 1.1
-
SimpleR2dbcRepository
public SimpleR2dbcRepository(RelationalEntityInformation<T, ID> entity, org.springframework.r2dbc.core.DatabaseClient databaseClient, R2dbcConverter converter, ReactiveDataAccessStrategy accessStrategy) Create a newSimpleR2dbcRepository.- Parameters:
entity-databaseClient-converter-accessStrategy-- Since:
- 1.2
-
-
Method Details
-
save
-
saveAll
-
saveAll
@Transactional public <S extends T> reactor.core.publisher.Flux<S> saveAll(org.reactivestreams.Publisher<S> objectsToSave) -
findById
-
findById
-
existsById
-
existsById
-
findAll
-
findAllById
-
findAllById
-
count
-
deleteById
-
deleteById
-
delete
-
deleteAllById
-
deleteAll
-
deleteAll
-
deleteAll
-
findAll
-
findOne
public <S extends T> reactor.core.publisher.Mono<S> findOne(org.springframework.data.domain.Example<S> example) - Specified by:
findOnein interfaceorg.springframework.data.repository.query.ReactiveQueryByExampleExecutor<T>
-
findAll
public <S extends T> reactor.core.publisher.Flux<S> findAll(org.springframework.data.domain.Example<S> example) - Specified by:
findAllin interfaceorg.springframework.data.repository.query.ReactiveQueryByExampleExecutor<T>
-
findAll
public <S extends T> reactor.core.publisher.Flux<S> findAll(org.springframework.data.domain.Example<S> example, org.springframework.data.domain.Sort sort) - Specified by:
findAllin interfaceorg.springframework.data.repository.query.ReactiveQueryByExampleExecutor<T>
-
count
public <S extends T> reactor.core.publisher.Mono<Long> count(org.springframework.data.domain.Example<S> example) - Specified by:
countin interfaceorg.springframework.data.repository.query.ReactiveQueryByExampleExecutor<T>
-
exists
public <S extends T> reactor.core.publisher.Mono<Boolean> exists(org.springframework.data.domain.Example<S> example) - Specified by:
existsin interfaceorg.springframework.data.repository.query.ReactiveQueryByExampleExecutor<T>
-
findBy
public <S extends T,R, P findByP extends org.reactivestreams.Publisher<R>> (org.springframework.data.domain.Example<S> example, Function<org.springframework.data.repository.query.FluentQuery.ReactiveFluentQuery<S>, P> queryFunction) - Specified by:
findByin interfaceorg.springframework.data.repository.query.ReactiveQueryByExampleExecutor<T>
-