SimpleReactiveCosmosRepository<T,K> Class

  • java.lang.Object
    • com.azure.spring.data.cosmos.repository.support.SimpleReactiveCosmosRepository<T,K>

Type Parameters

T

the type of the domain class managed by this repository.

K

the type of the id of the domain class managed by this repository.

Implements

public class SimpleReactiveCosmosRepository<T,K>
implements ReactiveCosmosRepository<T,K>

Repository class for simple reactive Cosmos operation

Constructor Summary

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

Initialization with metadata and reactiveCosmosOperations

Method Summary

Modifier and Type Method and Description
Mono<S> save(K id, PartitionKey partitionKey, Class<S> domainType, CosmosPatchOperations patchOperations)

Patches an entity by its id and partition key with CosmosPatchItemRequestOptions

Mono<S> save(K id, PartitionKey partitionKey, Class<S> domainType, CosmosPatchOperations patchOperations, CosmosPatchItemRequestOptions options)

Patches an entity by its id and partition key with CosmosPatchItemRequestOptions

Mono<S> save(S entity)
Flux<S> saveAll(Iterable<S> entities)
Flux<S> saveAll(Publisher<S> entityStream)
Mono<Long> count()
Mono<Void> delete(T entity)
Mono<Void> deleteAll()
Mono<Void> deleteAll(Iterable<? extends T> entities)
Mono<Void> deleteAll(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(Publisher<K> publisher)
Mono<Boolean> existsById(K id)
Mono<Boolean> existsById(Publisher<K> publisher)
Flux<T> findAll()
Flux<T> findAll(PartitionKey partitionKey)

Returns Flux of items in a specific partition

Flux<T> findAll(Sort sort)
Flux<T> findAllById(Iterable<K> ids)
Flux<T> findAllById(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(Publisher<K> publisher)

Methods inherited from java.lang.Object

Constructor Details

SimpleReactiveCosmosRepository

public SimpleReactiveCosmosRepository(CosmosEntityInformation metadata, ReactiveCosmosOperations reactiveCosmosOperations)

Initialization with metadata and reactiveCosmosOperations

Parameters:

metadata - for entityInformation
reactiveCosmosOperations - for cosmosOperations

Method Details

save

public Mono save(K id, PartitionKey partitionKey, Class domainType, CosmosPatchOperations patchOperations)

Patches an entity by its id and partition key with CosmosPatchItemRequestOptions

Parameters:

id
partitionKey
domainType
patchOperations

save

public Mono save(K id, PartitionKey partitionKey, Class domainType, CosmosPatchOperations patchOperations, CosmosPatchItemRequestOptions options)

Patches an entity by its id and partition key with CosmosPatchItemRequestOptions

Parameters:

id
partitionKey
domainType
patchOperations
options

save

public Mono save(S entity)

Parameters:

entity

saveAll

public Flux saveAll(Iterable entities)

Parameters:

entities

saveAll

public Flux saveAll(Publisher entityStream)

Parameters:

entityStream

count

public Mono count()

delete

public Mono delete(T entity)

Parameters:

entity

deleteAll

public Mono deleteAll()

deleteAll

public Mono deleteAll(Iterable entities)

Parameters:

entities

deleteAll

public Mono deleteAll(Publisher entityStream)

Parameters:

entityStream

deleteAllById

public Mono deleteAllById(Iterable ids)

Parameters:

ids

deleteById

public Mono deleteById(K id)

Parameters:

id

deleteById

public Mono deleteById(K id, PartitionKey partitionKey)

Deletes an entity by its id and partition key.

Parameters:

id
partitionKey

deleteById

public Mono deleteById(Publisher publisher)

Parameters:

publisher

existsById

public Mono existsById(K id)

Parameters:

id

existsById

public Mono existsById(Publisher publisher)

Parameters:

publisher

findAll

public Flux findAll()

findAll

public Flux findAll(PartitionKey partitionKey)

Returns Flux of items in a specific partition

Parameters:

partitionKey

findAll

public Flux findAll(Sort sort)

Parameters:

sort

findAllById

public Flux findAllById(Iterable ids)

Parameters:

ids

findAllById

public Flux findAllById(Publisher ids)

Parameters:

ids

findById

public Mono findById(K id)

Parameters:

id

findById

public Mono findById(K id, PartitionKey partitionKey)

Retrieves an entity by its id and partition key.

Parameters:

id
partitionKey

findById

public Mono findById(Publisher publisher)

Parameters:

publisher

Applies to