I
InsightNexus

SimpleReactiveCosmosRepository (Azure SDK for Java Reference Documentation)

Author

James Stevens

Published Feb 16, 2026

SimpleReactiveCosmosRepository (Azure SDK for Java Reference Documentation)
  • 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,ID>, org.springframework.data.repository.reactive.ReactiveSortingRepository<T,K>, org.springframework.data.repository.Repository<T,ID>

    public class SimpleReactiveCosmosRepository<T,K extends Serializable>extends Objectimplements ReactiveCosmosRepository<T,K>

    Repository class for simple reactive Cosmos operation

    • Constructor Detail

      • SimpleReactiveCosmosRepository

        public SimpleReactiveCosmosRepository(CosmosEntityInformation<T,K> metadata, ReactiveCosmosOperations reactiveCosmosOperations)

        Initialization with metadata and reactiveCosmosOperations

        Parameters:
        metadata - for entityInformation
        reactiveCosmosOperations - for cosmosOperations
    • Method Detail

      • findById

        public Mono<T> findById(K id, com.azure.cosmos.models.PartitionKey partitionKey)

        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.
      • deleteById

        public Mono<Void> deleteById(K id, com.azure.cosmos.models.PartitionKey partitionKey)

        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.

Copyright © 2021 Microsoft Corporation. All rights reserved.