public class SimpleReactiveCosmosRepository<T,K extends Serializable> extends Object implements ReactiveCosmosRepository<T,K>
| Modifier and Type | Field and Description |
|---|---|
private ReactiveCosmosOperations |
cosmosOperations |
private CosmosEntityInformation<T,K> |
entityInformation |
| Constructor and Description |
|---|
SimpleReactiveCosmosRepository(CosmosEntityInformation<T,K> metadata,
org.springframework.context.ApplicationContext applicationContext) |
SimpleReactiveCosmosRepository(CosmosEntityInformation<T,K> metadata,
ReactiveCosmosOperations reactiveCosmosOperations) |
| Modifier and Type | Method and Description |
|---|---|
reactor.core.publisher.Mono<Long> |
count() |
private com.azure.data.cosmos.CosmosContainerResponse |
createContainerIfNotExists() |
private com.azure.data.cosmos.PartitionKey |
createKey(String partitionKeyValue) |
reactor.core.publisher.Mono<Void> |
delete(T entity) |
reactor.core.publisher.Mono<Void> |
deleteAll() |
reactor.core.publisher.Mono<Void> |
deleteAll(Iterable<? extends T> entities) |
reactor.core.publisher.Mono<Void> |
deleteAll(org.reactivestreams.Publisher<? extends T> entityStream) |
reactor.core.publisher.Mono<Void> |
deleteById(K id) |
reactor.core.publisher.Mono<Void> |
deleteById(K id,
com.azure.data.cosmos.PartitionKey partitionKey)
Deletes an entity by its id and partition key.
|
reactor.core.publisher.Mono<Void> |
deleteById(org.reactivestreams.Publisher<K> publisher) |
reactor.core.publisher.Mono<Boolean> |
existsById(K id) |
reactor.core.publisher.Mono<Boolean> |
existsById(org.reactivestreams.Publisher<K> publisher) |
reactor.core.publisher.Flux<T> |
findAll() |
reactor.core.publisher.Flux<T> |
findAll(com.azure.data.cosmos.PartitionKey partitionKey)
Returns Flux of items in a specific partition
|
reactor.core.publisher.Flux<T> |
findAll(org.springframework.data.domain.Sort sort) |
reactor.core.publisher.Flux<T> |
findAllById(Iterable<K> ids) |
reactor.core.publisher.Flux<T> |
findAllById(org.reactivestreams.Publisher<K> ids) |
reactor.core.publisher.Mono<T> |
findById(K id) |
reactor.core.publisher.Mono<T> |
findById(K id,
com.azure.data.cosmos.PartitionKey partitionKey)
Retrieves an entity by its id and partition key.
|
reactor.core.publisher.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) |
private final CosmosEntityInformation<T,K extends Serializable> entityInformation
private final ReactiveCosmosOperations cosmosOperations
public SimpleReactiveCosmosRepository(CosmosEntityInformation<T,K> metadata, org.springframework.context.ApplicationContext applicationContext)
public SimpleReactiveCosmosRepository(CosmosEntityInformation<T,K> metadata, ReactiveCosmosOperations reactiveCosmosOperations)
private com.azure.data.cosmos.CosmosContainerResponse createContainerIfNotExists()
public reactor.core.publisher.Flux<T> findAll(org.springframework.data.domain.Sort sort)
findAll in interface org.springframework.data.repository.reactive.ReactiveSortingRepository<T,K extends Serializable>public reactor.core.publisher.Flux<T> findAll(com.azure.data.cosmos.PartitionKey partitionKey)
ReactiveCosmosRepositoryfindAll in interface ReactiveCosmosRepository<T,K extends Serializable>partitionKey - partition key valueFlux of items with partition key valuepublic <S extends T> reactor.core.publisher.Mono<S> save(S entity)
save in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,K extends Serializable>public <S extends T> reactor.core.publisher.Flux<S> saveAll(Iterable<S> entities)
saveAll in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,K extends Serializable>public <S extends T> reactor.core.publisher.Flux<S> saveAll(org.reactivestreams.Publisher<S> entityStream)
saveAll in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,K extends Serializable>public reactor.core.publisher.Mono<T> findById(K id)
findById in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,K extends Serializable>public reactor.core.publisher.Mono<T> findById(org.reactivestreams.Publisher<K> publisher)
findById in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,K extends Serializable>public reactor.core.publisher.Mono<T> findById(K id, com.azure.data.cosmos.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 reactor.core.publisher.Mono<Boolean> existsById(K id)
existsById in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,K extends Serializable>public reactor.core.publisher.Mono<Boolean> existsById(org.reactivestreams.Publisher<K> publisher)
existsById in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,K extends Serializable>public reactor.core.publisher.Flux<T> findAll()
findAll in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,K extends Serializable>public reactor.core.publisher.Flux<T> findAllById(Iterable<K> ids)
findAllById in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,K extends Serializable>public reactor.core.publisher.Flux<T> findAllById(org.reactivestreams.Publisher<K> ids)
findAllById in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,K extends Serializable>public reactor.core.publisher.Mono<Long> count()
count in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,K extends Serializable>public reactor.core.publisher.Mono<Void> deleteById(K id)
deleteById in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,K extends Serializable>public reactor.core.publisher.Mono<Void> deleteById(org.reactivestreams.Publisher<K> publisher)
deleteById in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,K extends Serializable>public reactor.core.publisher.Mono<Void> deleteById(K id, com.azure.data.cosmos.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 reactor.core.publisher.Mono<Void> delete(@NonNull T entity)
delete in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,K extends Serializable>public reactor.core.publisher.Mono<Void> deleteAll(Iterable<? extends T> entities)
deleteAll in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,K extends Serializable>public reactor.core.publisher.Mono<Void> deleteAll(org.reactivestreams.Publisher<? extends T> entityStream)
deleteAll in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,K extends Serializable>public reactor.core.publisher.Mono<Void> deleteAll()
deleteAll in interface org.springframework.data.repository.reactive.ReactiveCrudRepository<T,K extends Serializable>private com.azure.data.cosmos.PartitionKey createKey(String partitionKeyValue)
Copyright © 2020 Microsoft. All rights reserved.