Class SimpleReactiveCosmosRepository<T,K extends Serializable>

java.lang.Object
com.azure.spring.data.cosmos.repository.support.SimpleReactiveCosmosRepository<T,K>
All Implemented Interfaces:
ReactiveCosmosRepository<T,K>, org.springframework.data.repository.reactive.ReactiveCrudRepository<T,K>, org.springframework.data.repository.reactive.ReactiveSortingRepository<T,K>, org.springframework.data.repository.Repository<T,K>

public class SimpleReactiveCosmosRepository<T,K extends Serializable> extends Object implements ReactiveCosmosRepository<T,K>
Repository class for simple reactive Cosmos operation
  • Constructor Details

    • SimpleReactiveCosmosRepository

      public SimpleReactiveCosmosRepository(CosmosEntityInformation<T,K> metadata, ReactiveCosmosOperations reactiveCosmosOperations)
      Initialization with metadata and reactiveCosmosOperations
      Parameters:
      metadata - for entityInformation
      reactiveCosmosOperations - for cosmosOperations
  • Method Details

    • findAll

      public Flux<T> findAll(org.springframework.data.domain.Sort sort)
      Specified by:
      findAll in interface org.springframework.data.repository.reactive.ReactiveSortingRepository<T,K extends Serializable>
    • findAll

      public Flux<T> findAll(PartitionKey partitionKey)
      Description copied from interface: ReactiveCosmosRepository
      Returns Flux of items in a specific partition
      Specified by:
      findAll in interface ReactiveCosmosRepository<T,K extends Serializable>
      Parameters:
      partitionKey - partition key value
      Returns:
      Flux of items with partition key value
    • save

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

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

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

      public Mono<T> findById(K id)
      Specified by:
      findById in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,K extends Serializable>
    • findById

      public Mono<T> findById(org.reactivestreams.Publisher<K> publisher)
      Specified by:
      findById in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,K extends Serializable>
    • findById

      public Mono<T> findById(K id, PartitionKey partitionKey)
      Description copied from interface: ReactiveCosmosRepository
      Retrieves an entity by its id and partition key.
      Specified by:
      findById in interface ReactiveCosmosRepository<T,K extends Serializable>
      Parameters:
      id - must not be null.
      partitionKey - partition key value of the entity, must not be null.
      Returns:
      Mono emitting the entity with the given id or Mono.empty() if none found.
    • existsById

      public Mono<Boolean> existsById(K id)
      Specified by:
      existsById in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,K extends Serializable>
    • existsById

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

      public Flux<T> findAll()
      Specified by:
      findAll in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,K extends Serializable>
    • findAllById

      public Flux<T> findAllById(Iterable<K> ids)
      Specified by:
      findAllById in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,K extends Serializable>
    • findAllById

      public Flux<T> findAllById(org.reactivestreams.Publisher<K> ids)
      Specified by:
      findAllById in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,K extends Serializable>
    • count

      public Mono<Long> count()
      Specified by:
      count in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,K extends Serializable>
    • deleteById

      public Mono<Void> deleteById(K id)
      Specified by:
      deleteById in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,K extends Serializable>
    • deleteById

      public Mono<Void> deleteById(org.reactivestreams.Publisher<K> publisher)
      Specified by:
      deleteById in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,K extends Serializable>
    • deleteById

      public Mono<Void> deleteById(K id, PartitionKey partitionKey)
      Description copied from interface: ReactiveCosmosRepository
      Deletes an entity by its id and partition key.
      Specified by:
      deleteById in interface ReactiveCosmosRepository<T,K extends Serializable>
      Parameters:
      id - must not be null.
      partitionKey - partition key value of the entity, must not be null.
      Returns:
      Mono emitting the void Mono.
    • delete

      public Mono<Void> delete(@NonNull T entity)
      Specified by:
      delete in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,K extends Serializable>
    • deleteAllById

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

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

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

      public Mono<Void> deleteAll()
      Specified by:
      deleteAll in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,K extends Serializable>