Interface ReactiveCosmosRepository<T,K>
-
- All Superinterfaces:
org.springframework.data.repository.reactive.ReactiveCrudRepository<T,K>,org.springframework.data.repository.reactive.ReactiveSortingRepository<T,K>,org.springframework.data.repository.Repository<T,K>
- All Known Implementing Classes:
SimpleReactiveCosmosRepository
@NoRepositoryBean public interface ReactiveCosmosRepository<T,K> extends org.springframework.data.repository.reactive.ReactiveSortingRepository<T,K>Repository interface with search and delete operation
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Mono<Void>deleteById(K id, PartitionKey partitionKey)Deletes an entity by its id and partition key.Flux<T>findAll(PartitionKey partitionKey)Returns Flux of items in a specific partitionMono<T>findById(K id, PartitionKey partitionKey)Retrieves an entity by its id and partition key.
-
-
-
Method Detail
-
findById
Mono<T> findById(K id, PartitionKey partitionKey)
Retrieves an entity by its id and partition key.- 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.- Throws:
IllegalArgumentException- in case the givenidis null.
-
deleteById
Mono<Void> deleteById(K id, PartitionKey partitionKey)
Deletes an entity by its id and partition key.- Parameters:
id- must not be null.partitionKey- partition key value of the entity, must not be null.- Returns:
Monoemitting the void Mono.- Throws:
IllegalArgumentException- in case the givenidis null.
-
findAll
Flux<T> findAll(PartitionKey partitionKey)
Returns Flux of items in a specific partition- Parameters:
partitionKey- partition key value- Returns:
Fluxof items with partition key value
-
-