Class SimpleR2dbcRepository<T,ID>
java.lang.Object
org.springframework.data.r2dbc.repository.support.SimpleR2dbcRepository<T,ID>
- All Implemented Interfaces:
R2dbcRepository<T,
,ID> ReactiveQueryByExampleExecutor<T>
,ReactiveCrudRepository<T,
,ID> ReactiveSortingRepository<T,
,ID> 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
ConstructorDescriptionSimpleR2dbcRepository
(RelationalEntityInformation<T, ID> entity, R2dbcEntityOperations entityOperations, R2dbcConverter converter) Create a newSimpleR2dbcRepository
.SimpleR2dbcRepository
(RelationalEntityInformation<T, ID> entity, DatabaseClient databaseClient, R2dbcConverter converter, ReactiveDataAccessStrategy accessStrategy) Create a newSimpleR2dbcRepository
. -
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<Long>
count()
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) 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><S extends T>
reactor.core.publisher.Flux<S>reactor.core.publisher.Flux<T>
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
(Example<S> example, Function<FluentQuery.ReactiveFluentQuery<S>, P> queryFunction) reactor.core.publisher.Mono<T>
reactor.core.publisher.Mono<T>
<S extends T>
reactor.core.publisher.Mono<S><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, DatabaseClient databaseClient, R2dbcConverter converter, ReactiveDataAccessStrategy accessStrategy) Create a newSimpleR2dbcRepository
.- Parameters:
entity
-databaseClient
-converter
-accessStrategy
-- Since:
- 1.2
-
-
Method Details
-
save
- Specified by:
save
in interfaceReactiveCrudRepository<T,
ID>
-
saveAll
@Transactional public <S extends T> reactor.core.publisher.Flux<S> saveAll(Iterable<S> objectsToSave) - Specified by:
saveAll
in interfaceReactiveCrudRepository<T,
ID>
-
saveAll
@Transactional public <S extends T> reactor.core.publisher.Flux<S> saveAll(org.reactivestreams.Publisher<S> objectsToSave) - Specified by:
saveAll
in interfaceReactiveCrudRepository<T,
ID>
-
findById
- Specified by:
findById
in interfaceReactiveCrudRepository<T,
ID>
-
findById
- Specified by:
findById
in interfaceReactiveCrudRepository<T,
ID>
-
existsById
- Specified by:
existsById
in interfaceReactiveCrudRepository<T,
ID>
-
existsById
- Specified by:
existsById
in interfaceReactiveCrudRepository<T,
ID>
-
findAll
- Specified by:
findAll
in interfaceReactiveCrudRepository<T,
ID>
-
findAllById
- Specified by:
findAllById
in interfaceReactiveCrudRepository<T,
ID>
-
findAllById
- Specified by:
findAllById
in interfaceReactiveCrudRepository<T,
ID>
-
count
- Specified by:
count
in interfaceReactiveCrudRepository<T,
ID>
-
deleteById
- Specified by:
deleteById
in interfaceReactiveCrudRepository<T,
ID>
-
deleteById
@Transactional public reactor.core.publisher.Mono<Void> deleteById(org.reactivestreams.Publisher<ID> idPublisher) - Specified by:
deleteById
in interfaceReactiveCrudRepository<T,
ID>
-
delete
- Specified by:
delete
in interfaceReactiveCrudRepository<T,
ID>
-
deleteAllById
- Specified by:
deleteAllById
in interfaceReactiveCrudRepository<T,
ID>
-
deleteAll
- Specified by:
deleteAll
in interfaceReactiveCrudRepository<T,
ID>
-
deleteAll
@Transactional public reactor.core.publisher.Mono<Void> deleteAll(org.reactivestreams.Publisher<? extends T> objectPublisher) - Specified by:
deleteAll
in interfaceReactiveCrudRepository<T,
ID>
-
deleteAll
- Specified by:
deleteAll
in interfaceReactiveCrudRepository<T,
ID>
-
findAll
- Specified by:
findAll
in interfaceReactiveSortingRepository<T,
ID>
-
findOne
- Specified by:
findOne
in interfaceReactiveQueryByExampleExecutor<T>
-
findAll
- Specified by:
findAll
in interfaceReactiveQueryByExampleExecutor<T>
-
findAll
- Specified by:
findAll
in interfaceReactiveQueryByExampleExecutor<T>
-
count
- Specified by:
count
in interfaceReactiveQueryByExampleExecutor<T>
-
exists
- Specified by:
exists
in interfaceReactiveQueryByExampleExecutor<T>
-
findBy
public <S extends T,R, P findByP extends org.reactivestreams.Publisher<R>> (Example<S> example, Function<FluentQuery.ReactiveFluentQuery<S>, P> queryFunction) - Specified by:
findBy
in interfaceReactiveQueryByExampleExecutor<T>
-