public class SimpleReactiveCosmosRepository<T,K extends Serializable> extends Object implements ReactiveCosmosRepository<T,K>
| Constructor and Description |
|---|
SimpleReactiveCosmosRepository(CosmosEntityInformation<T,K> metadata,
ReactiveCosmosOperations reactiveCosmosOperations)
Initialization with metadata and reactiveCosmosOperations
|
| Modifier and Type | Method and Description |
|---|---|
Mono<Long> |
count() |
Mono<Void> |
delete(T entity) |
Mono<Void> |
deleteAll() |
Mono<Void> |
deleteAll(Iterable<? extends T> entities) |
Mono<Void> |
deleteAll(org.reactivestreams.Publisher<? extends T> entityStream) |
Mono<Void> |
deleteAllById(Iterable<? extends K> ids) |
Mono<Void> |
deleteById(K id) |
Mono<Void> |
deleteById(K id,
PartitionKey partitionKey)
Deletes an entity by its id and partition key.
|
Mono<Void> |
deleteById(org.reactivestreams.Publisher<K> publisher) |
Mono<Boolean> |
existsById(K id) |
Mono<Boolean> |
existsById(org.reactivestreams.Publisher<K> publisher) |
Flux<T> |
findAll() |
Flux<T> |
findAll(PartitionKey partitionKey)
Returns Flux of items in a specific partition
|
Flux<T> |
findAll(org.springframework.data.domain.Sort sort) |
Flux<T> |
findAllById(Iterable<K> ids) |
Flux<T> |
findAllById(org.reactivestreams.Publisher<K> ids) |
Mono<T> |
findById(K id) |
Mono<T> |
findById(K id,
PartitionKey partitionKey)
Retrieves an entity by its id and partition key.
|
Mono<T> |
findById(org.reactivestreams.Publisher<K> publisher) |
<S extends T> |
save(S entity) |
<S extends T> |
saveAll(Iterable<S> entities) |
<S extends T> |
saveAll(org.reactivestreams.Publisher<S> entityStream) |
public SimpleReactiveCosmosRepository(CosmosEntityInformation<T,K> metadata, ReactiveCosmosOperations reactiveCosmosOperations)
metadata - for entityInformationreactiveCosmosOperations - for cosmosOperationspublic Flux<T> findAll(PartitionKey partitionKey)
ReactiveCosmosRepositoryfindAll in interface ReactiveCosmosRepository<T,K extends Serializable>partitionKey - partition key valueFlux of items with partition key valuepublic <S extends T> Mono<S> save(S entity)
save in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,ID>public <S extends T> Flux<S> saveAll(Iterable<S> entities)
saveAll in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,ID>public <S extends T> Flux<S> saveAll(org.reactivestreams.Publisher<S> entityStream)
saveAll in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,ID>public Mono<T> findById(K id)
findById in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,ID>public Mono<T> findById(org.reactivestreams.Publisher<K> publisher)
findById in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,ID>public Mono<T> findById(K id, PartitionKey partitionKey)
ReactiveCosmosRepositoryfindById in interface ReactiveCosmosRepository<T,K extends Serializable>id - must not be null.partitionKey - partition key value of the entity, must not be null.Mono emitting the entity with the given id or Mono.empty() if none found.public Mono<Boolean> existsById(K id)
existsById in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,ID>public Mono<Boolean> existsById(org.reactivestreams.Publisher<K> publisher)
existsById in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,ID>public Flux<T> findAll()
findAll in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,ID>public Flux<T> findAllById(Iterable<K> ids)
findAllById in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,ID>public Flux<T> findAllById(org.reactivestreams.Publisher<K> ids)
findAllById in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,ID>public Mono<Long> count()
count in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,ID>public Mono<Void> deleteById(K id)
deleteById in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,ID>public Mono<Void> deleteById(org.reactivestreams.Publisher<K> publisher)
deleteById in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,ID>public Mono<Void> deleteById(K id, PartitionKey partitionKey)
ReactiveCosmosRepositorydeleteById in interface ReactiveCosmosRepository<T,K extends Serializable>id - must not be null.partitionKey - partition key value of the entity, must not be null.Mono emitting the void Mono.public Mono<Void> delete(@NonNull T entity)
delete in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,ID>public Mono<Void> deleteAllById(Iterable<? extends K> ids)
deleteAllById in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,ID>public Mono<Void> deleteAll(Iterable<? extends T> entities)
deleteAll in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,ID>public Mono<Void> deleteAll(org.reactivestreams.Publisher<? extends T> entityStream)
deleteAll in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,ID>Copyright © 2021 Microsoft Corporation. All rights reserved.