Class SimpleReactiveCosmosRepository<T,K extends Serializable>
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.
- All Implemented Interfaces:
ReactiveCosmosRepository<T,,K> org.springframework.data.repository.reactive.ReactiveCrudRepository<T,,K> org.springframework.data.repository.reactive.ReactiveSortingRepository<T,,K> org.springframework.data.repository.Repository<T,K>
public class SimpleReactiveCosmosRepository<T,K extends Serializable>
extends Object
implements ReactiveCosmosRepository<T,K>
Repository class for simple reactive Cosmos operation
-
Constructor Summary
ConstructorsConstructorDescriptionSimpleReactiveCosmosRepository(CosmosEntityInformation<T, K> metadata, ReactiveCosmosOperations reactiveCosmosOperations) Initialization with metadata and reactiveCosmosOperations -
Method Summary
Modifier and TypeMethodDescriptioncount()deleteAllById(Iterable<? extends K> ids) deleteById(K id) deleteById(K id, com.azure.cosmos.models.PartitionKey partitionKey) Deletes an entity by its id and partition key.deleteById(org.reactivestreams.Publisher<K> publisher) existsById(K id) existsById(org.reactivestreams.Publisher<K> publisher) findAll()findAll(com.azure.cosmos.models.PartitionKey partitionKey) Returns Flux of items in a specific partitionfindAll(org.springframework.data.domain.Sort sort) findAllById(Iterable<K> ids) findAllById(org.reactivestreams.Publisher<K> ids) Retrieves an entity by its id and partition key.save(K id, com.azure.cosmos.models.PartitionKey partitionKey, Class<S> domainType, com.azure.cosmos.models.CosmosPatchOperations patchOperations) Patches an entity by its id and partition key with CosmosPatchItemRequestOptionssave(K id, com.azure.cosmos.models.PartitionKey partitionKey, Class<S> domainType, com.azure.cosmos.models.CosmosPatchOperations patchOperations, com.azure.cosmos.models.CosmosPatchItemRequestOptions options) Patches an entity by its id and partition key with CosmosPatchItemRequestOptionssave(S entity) saveAll(org.reactivestreams.Publisher<S> entityStream)
-
Constructor Details
-
SimpleReactiveCosmosRepository
public SimpleReactiveCosmosRepository(CosmosEntityInformation<T, K> metadata, ReactiveCosmosOperations reactiveCosmosOperations) Initialization with metadata and reactiveCosmosOperations- Parameters:
metadata- for entityInformationreactiveCosmosOperations- for cosmosOperations
-
-
Method Details
-
findAll
- Specified by:
findAllin interfaceorg.springframework.data.repository.reactive.ReactiveSortingRepository<T,K extends Serializable>
-
findAll
Description copied from interface:ReactiveCosmosRepositoryReturns Flux of items in a specific partition- Specified by:
findAllin interfaceReactiveCosmosRepository<T,K extends Serializable> - Parameters:
partitionKey- partition key value- Returns:
Fluxof items with partition key value
-
save
- Specified by:
savein interfaceorg.springframework.data.repository.reactive.ReactiveCrudRepository<T,K extends Serializable>
-
save
public <S extends T> Mono<S> save(K id, com.azure.cosmos.models.PartitionKey partitionKey, Class<S> domainType, com.azure.cosmos.models.CosmosPatchOperations patchOperations) Description copied from interface:ReactiveCosmosRepositoryPatches an entity by its id and partition key with CosmosPatchItemRequestOptions- Specified by:
savein interfaceReactiveCosmosRepository<T,K extends Serializable> - Type Parameters:
S- type class of domain type- Parameters:
id- must not be nullpartitionKey- must not be nulldomainType- must not be nullpatchOperations- must not be null, max operations is 10- Returns:
- the patched entity
-
save
public <S extends T> Mono<S> save(K id, com.azure.cosmos.models.PartitionKey partitionKey, Class<S> domainType, com.azure.cosmos.models.CosmosPatchOperations patchOperations, com.azure.cosmos.models.CosmosPatchItemRequestOptions options) Description copied from interface:ReactiveCosmosRepositoryPatches an entity by its id and partition key with CosmosPatchItemRequestOptions- Specified by:
savein interfaceReactiveCosmosRepository<T,K extends Serializable> - Type Parameters:
S- type class of domain type- Parameters:
id- must not be nullpartitionKey- must not be nulldomainType- must not be nullpatchOperations- must not be null, max operations is 10options- Optional CosmosPatchItemRequestOptions, e.g. options.setFilterPredicate("FROM products p WHERE p.used = false");- Returns:
- the patched entity
-
saveAll
- Specified by:
saveAllin interfaceorg.springframework.data.repository.reactive.ReactiveCrudRepository<T,K extends Serializable>
-
saveAll
- Specified by:
saveAllin interfaceorg.springframework.data.repository.reactive.ReactiveCrudRepository<T,K extends Serializable>
-
findById
- Specified by:
findByIdin interfaceorg.springframework.data.repository.reactive.ReactiveCrudRepository<T,K extends Serializable>
-
findById
- Specified by:
findByIdin interfaceorg.springframework.data.repository.reactive.ReactiveCrudRepository<T,K extends Serializable>
-
findById
Description copied from interface:ReactiveCosmosRepositoryRetrieves 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.
-
existsById
- Specified by:
existsByIdin interfaceorg.springframework.data.repository.reactive.ReactiveCrudRepository<T,K extends Serializable>
-
existsById
- Specified by:
existsByIdin interfaceorg.springframework.data.repository.reactive.ReactiveCrudRepository<T,K extends Serializable>
-
findAll
- Specified by:
findAllin interfaceorg.springframework.data.repository.reactive.ReactiveCrudRepository<T,K extends Serializable>
-
findAllById
- Specified by:
findAllByIdin interfaceorg.springframework.data.repository.reactive.ReactiveCrudRepository<T,K extends Serializable>
-
findAllById
- Specified by:
findAllByIdin interfaceorg.springframework.data.repository.reactive.ReactiveCrudRepository<T,K extends Serializable>
-
count
- Specified by:
countin interfaceorg.springframework.data.repository.reactive.ReactiveCrudRepository<T,K extends Serializable>
-
deleteById
- Specified by:
deleteByIdin interfaceorg.springframework.data.repository.reactive.ReactiveCrudRepository<T,K extends Serializable>
-
deleteById
- Specified by:
deleteByIdin interfaceorg.springframework.data.repository.reactive.ReactiveCrudRepository<T,K extends Serializable>
-
deleteById
Description copied from interface:ReactiveCosmosRepositoryDeletes 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.
-
delete
- Specified by:
deletein interfaceorg.springframework.data.repository.reactive.ReactiveCrudRepository<T,K extends Serializable>
-
deleteAllById
- Specified by:
deleteAllByIdin interfaceorg.springframework.data.repository.reactive.ReactiveCrudRepository<T,K extends Serializable>
-
deleteAll
- Specified by:
deleteAllin interfaceorg.springframework.data.repository.reactive.ReactiveCrudRepository<T,K extends Serializable>
-
deleteAll
- Specified by:
deleteAllin interfaceorg.springframework.data.repository.reactive.ReactiveCrudRepository<T,K extends Serializable>
-
deleteAll
- Specified by:
deleteAllin interfaceorg.springframework.data.repository.reactive.ReactiveCrudRepository<T,K extends Serializable>
-