Class SimpleReactiveCassandraRepository<T,ID>

java.lang.Object
org.springframework.data.cassandra.repository.support.SimpleReactiveCassandraRepository<T,ID>
All Implemented Interfaces:
ReactiveCassandraRepository<T,ID>, org.springframework.data.repository.reactive.ReactiveCrudRepository<T,ID>, org.springframework.data.repository.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 Details

  • Method Details

    • save

      public <S extends T> reactor.core.publisher.Mono<S> save(S entity)
      Specified by:
      save in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,ID>
    • saveAll

      public <S extends T> reactor.core.publisher.Flux<S> saveAll(Iterable<S> entities)
      Specified by:
      saveAll in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,ID>
    • saveAll

      public <S extends T> reactor.core.publisher.Flux<S> saveAll(org.reactivestreams.Publisher<S> entityStream)
      Specified by:
      saveAll in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,ID>
    • findById

      public reactor.core.publisher.Mono<T> findById(ID id)
      Specified by:
      findById in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,ID>
    • findById

      public reactor.core.publisher.Mono<T> findById(org.reactivestreams.Publisher<ID> publisher)
      Specified by:
      findById in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,ID>
    • existsById

      public reactor.core.publisher.Mono<Boolean> existsById(ID id)
      Specified by:
      existsById in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,ID>
    • existsById

      public reactor.core.publisher.Mono<Boolean> existsById(org.reactivestreams.Publisher<ID> publisher)
      Specified by:
      existsById in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,ID>
    • findAll

      public reactor.core.publisher.Flux<T> findAll()
      Specified by:
      findAll in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,ID>
    • findAllById

      public reactor.core.publisher.Flux<T> findAllById(Iterable<ID> ids)
      Description copied from interface: ReactiveCassandraRepository

      Note: Cassandra supports single-field IN queries only. Fetches each row individually when using MapId with multiple components.

      Specified by:
      findAllById in interface ReactiveCassandraRepository<T,ID>
      Specified by:
      findAllById in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,ID>
    • findAllById

      public reactor.core.publisher.Flux<T> findAllById(org.reactivestreams.Publisher<ID> idStream)
      Description copied from interface: ReactiveCassandraRepository

      Fetches each row individually.

      Specified by:
      findAllById in interface ReactiveCassandraRepository<T,ID>
      Specified by:
      findAllById in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,ID>
    • count

      public reactor.core.publisher.Mono<Long> count()
      Specified by:
      count in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,ID>
    • deleteById

      public reactor.core.publisher.Mono<Void> deleteById(ID id)
      Specified by:
      deleteById in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,ID>
    • deleteById

      public reactor.core.publisher.Mono<Void> deleteById(org.reactivestreams.Publisher<ID> publisher)
      Specified by:
      deleteById in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,ID>
    • delete

      public reactor.core.publisher.Mono<Void> delete(T entity)
      Specified by:
      delete in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,ID>
    • deleteAllById

      public reactor.core.publisher.Mono<Void> deleteAllById(Iterable<? extends ID> ids)
      Specified by:
      deleteAllById in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,ID>
    • deleteAll

      public reactor.core.publisher.Mono<Void> deleteAll(Iterable<? extends T> entities)
      Specified by:
      deleteAll in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,ID>
    • deleteAll

      public reactor.core.publisher.Mono<Void> deleteAll(org.reactivestreams.Publisher<? extends T> entityStream)
      Specified by:
      deleteAll in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,ID>
    • deleteAll

      public reactor.core.publisher.Mono<Void> deleteAll()
      Specified by:
      deleteAll in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,ID>
    • insert

      public <S extends T> reactor.core.publisher.Mono<S> insert(S entity)
      Description copied from interface: ReactiveCassandraRepository
      Inserts 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 using ReactiveCrudRepository.save(Object) instead to avoid the usage of store-specific API.
      Specified by:
      insert in interface ReactiveCassandraRepository<T,ID>
      Parameters:
      entity - must not be null.
      Returns:
      the saved entity
    • insert

      public <S extends T> reactor.core.publisher.Flux<S> insert(Iterable<S> entities)
      Description copied from interface: ReactiveCassandraRepository
      Inserts 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 using ReactiveCrudRepository.save(Object) instead to avoid the usage of store-specific API.
      Specified by:
      insert in interface ReactiveCassandraRepository<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: ReactiveCassandraRepository
      Inserts 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 using ReactiveCrudRepository.save(Object) instead to avoid the usage of store-specific API.
      Specified by:
      insert in interface ReactiveCassandraRepository<T,ID>
      Parameters:
      entityStream - must not be null.
      Returns:
      the saved entity