SimpleReactiveCosmosRepository (Azure SDK for Java Reference Documentation)
James Stevens
Published Feb 16, 2026
- 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 Summary
Constructor Detail
SimpleReactiveCosmosRepository
public SimpleReactiveCosmosRepository(CosmosEntityInformation<T,K> metadata, ReactiveCosmosOperations reactiveCosmosOperations)
Initialization with metadata and reactiveCosmosOperations
- Parameters:
metadata- for entityInformationreactiveCosmosOperations- 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:
findByIdin interfaceReactiveCosmosRepository<T,K extends Serializable>- Parameters:
id- must not be null.partitionKey- partition key value of the entity, must not be null.- Returns:
Monoemitting the entity with the given id orMono.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:
deleteByIdin interfaceReactiveCosmosRepository<T,K extends Serializable>- Parameters:
id- must not be null.partitionKey- partition key value of the entity, must not be null.- Returns:
Monoemitting the void Mono.
Copyright © 2021 Microsoft Corporation. All rights reserved.