Class SimpleReactiveCassandraRepository<T,ID>
java.lang.Object
org.springframework.data.cassandra.repository.support.SimpleReactiveCassandraRepository<T,ID>
- All Implemented Interfaces:
ReactiveCassandraRepository<T,,ID> ReactiveCrudRepository<T,,ID> Repository<T,ID>
public class SimpleReactiveCassandraRepository<T,ID>
extends Object
implements ReactiveCassandraRepository<T,ID>
Reactive repository base implementation for Cassandra.
- Since:
- 2.0
- Author:
- Mark Paluch, Christoph Strobl, Jens Schauder
-
Constructor Summary
ConstructorsConstructorDescriptionSimpleReactiveCassandraRepository(CassandraEntityInformation<T, ID> metadata, ReactiveCassandraOperations operations) Create a newSimpleReactiveCassandraRepositoryfor the givenCassandraEntityInformationandReactiveCassandraOperations. -
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> publisher) 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()reactor.core.publisher.Flux<T>findAllById(Iterable<ID> ids) reactor.core.publisher.Flux<T>findAllById(org.reactivestreams.Publisher<ID> idStream) reactor.core.publisher.Mono<T>reactor.core.publisher.Mono<T><S extends T>
reactor.core.publisher.Flux<S>Inserts the given entities.<S extends T>
reactor.core.publisher.Flux<S>insert(org.reactivestreams.Publisher<S> entityStream) Inserts the given a given entities.<S extends T>
reactor.core.publisher.Mono<S>insert(S entity) Inserts the given entity.<S extends T>
reactor.core.publisher.Mono<S>save(S entity) <S extends T>
reactor.core.publisher.Flux<S><S extends T>
reactor.core.publisher.Flux<S>saveAll(org.reactivestreams.Publisher<S> entityStream)
-
Constructor Details
-
SimpleReactiveCassandraRepository
public SimpleReactiveCassandraRepository(CassandraEntityInformation<T, ID> metadata, ReactiveCassandraOperations operations) Create a newSimpleReactiveCassandraRepositoryfor the givenCassandraEntityInformationandReactiveCassandraOperations.- Parameters:
metadata- must not be null.operations- must not be null.
-
-
Method Details
-
save
- Specified by:
savein interfaceReactiveCrudRepository<T,ID>
-
saveAll
- Specified by:
saveAllin interfaceReactiveCrudRepository<T,ID>
-
saveAll
public <S extends T> reactor.core.publisher.Flux<S> saveAll(org.reactivestreams.Publisher<S> entityStream) - Specified by:
saveAllin interfaceReactiveCrudRepository<T,ID>
-
findById
- Specified by:
findByIdin interfaceReactiveCrudRepository<T,ID>
-
findById
- Specified by:
findByIdin interfaceReactiveCrudRepository<T,ID>
-
existsById
- Specified by:
existsByIdin interfaceReactiveCrudRepository<T,ID>
-
existsById
- Specified by:
existsByIdin interfaceReactiveCrudRepository<T,ID>
-
findAll
- Specified by:
findAllin interfaceReactiveCrudRepository<T,ID>
-
findAllById
Description copied from interface:ReactiveCassandraRepositoryNote: Cassandra supports single-field
INqueries only. Fetches each row individually when usingMapIdwith multiple components.- Specified by:
findAllByIdin interfaceReactiveCassandraRepository<T,ID> - Specified by:
findAllByIdin interfaceReactiveCrudRepository<T,ID>
-
findAllById
Description copied from interface:ReactiveCassandraRepositoryFetches each row individually.
- Specified by:
findAllByIdin interfaceReactiveCassandraRepository<T,ID> - Specified by:
findAllByIdin interfaceReactiveCrudRepository<T,ID>
-
count
- Specified by:
countin interfaceReactiveCrudRepository<T,ID>
-
deleteById
- Specified by:
deleteByIdin interfaceReactiveCrudRepository<T,ID>
-
deleteById
- Specified by:
deleteByIdin interfaceReactiveCrudRepository<T,ID>
-
delete
- Specified by:
deletein interfaceReactiveCrudRepository<T,ID>
-
deleteAllById
- Specified by:
deleteAllByIdin interfaceReactiveCrudRepository<T,ID>
-
deleteAll
- Specified by:
deleteAllin interfaceReactiveCrudRepository<T,ID>
-
deleteAll
public reactor.core.publisher.Mono<Void> deleteAll(org.reactivestreams.Publisher<? extends T> entityStream) - Specified by:
deleteAllin interfaceReactiveCrudRepository<T,ID>
-
deleteAll
- Specified by:
deleteAllin interfaceReactiveCrudRepository<T,ID>
-
insert
Description copied from interface:ReactiveCassandraRepositoryInserts the given entity. Assumes the instance to be new to be able to apply insertion optimizations. Use the returned instance for further operations as the save operation might have changed the entity instance completely. Prefer usingReactiveCrudRepository.save(Object)instead to avoid the usage of store-specific API.- Specified by:
insertin interfaceReactiveCassandraRepository<T,ID> - Parameters:
entity- must not be null.- Returns:
- the saved entity
-
insert
Description copied from interface:ReactiveCassandraRepositoryInserts the given entities. Assumes the instance to be new to be able to apply insertion optimizations. Use the returned instance for further operations as the save operation might have changed the entity instance completely. Prefer usingReactiveCrudRepository.save(Object)instead to avoid the usage of store-specific API.- Specified by:
insertin interfaceReactiveCassandraRepository<T,ID> - Parameters:
entities- must not be null.- Returns:
- the saved entity
-
insert
public <S extends T> reactor.core.publisher.Flux<S> insert(org.reactivestreams.Publisher<S> entityStream) Description copied from interface:ReactiveCassandraRepositoryInserts the given a given entities. Assumes the instance to be new to be able to apply insertion optimizations. Use the returned instance for further operations as the save operation might have changed the entity instance completely. Prefer usingReactiveCrudRepository.save(Object)instead to avoid the usage of store-specific API.- Specified by:
insertin interfaceReactiveCassandraRepository<T,ID> - Parameters:
entityStream- must not be null.- Returns:
- the saved entity
-