Interface ReactiveCosmosOperations
- All Known Implementing Classes:
ReactiveCosmosTemplate
public interface ReactiveCosmosOperations
Operation class of reactive cosmos
-
Method Summary
Modifier and TypeMethodDescriptioncount(SqlQuerySpec querySpec, String containerName) Countcount(CosmosQuery query, String containerName) CountCountcreateContainerIfNotExists(CosmosEntityInformation<?, ?> information) Creates a container if it doesn't already exist<T> Flux<T>delete(CosmosQuery query, Class<T> domainType, String containerName) Delete items matching queryDelete all items in a containerdeleteById(String containerName, Object id, PartitionKey partitionKey) Delete an item by idvoiddeleteContainer(String containerName) Delete containerdeleteEntity(String containerName, T entity) Delete using entityexists(CosmosQuery query, Class<?> domainType, String containerName) ExistsexistsById(Object id, Class<?> domainType, String containerName) Exists<T> Flux<T>find(CosmosQuery query, Class<T> domainType, String containerName) Find items<T> Flux<T>findAll(PartitionKey partitionKey, Class<T> domainType) Find all items in a given container with partition key<T> Flux<T>Find all items in a given container<T> Flux<T>Find all items in a given container<T> Mono<T>Find by id<T> Mono<T>findById(Object id, Class<T> domainType, PartitionKey partitionKey) Find by id<T> Mono<T>Find by idgetContainerName(Class<?> domainType) Get container namegetContainerProperties(String containerName) Get properties for specified containerTo get converter<T> Mono<T>Insert<T> Mono<T>insert(String containerName, T objectToSave, PartitionKey partitionKey) Insert<T> Mono<T>insert(T objectToSave, PartitionKey partitionKey) InsertreplaceContainerProperties(String containerName, CosmosContainerProperties properties) Replace container properties for the specified container<T> Flux<T>runQuery(SqlQuerySpec querySpec, Class<?> domainType, Class<T> returnType) Run the query.<T> Flux<T>runQuery(SqlQuerySpec querySpec, org.springframework.data.domain.Sort sort, Class<?> domainType, Class<T> returnType) Run the query.<T> Mono<T>Upsert an item to container with partition key<T> Mono<T>upsert(T object) Upsert an item with partition key
-
Method Details
-
getContainerName
Get container name- Parameters:
domainType- the domainType- Returns:
- container name
-
createContainerIfNotExists
Creates a container if it doesn't already exist- Parameters:
information- the CosmosEntityInformation- Returns:
- Mono of CosmosContainerResponse
-
getContainerProperties
Get properties for specified container- Parameters:
containerName- String- Returns:
- CosmosContainerProperties
-
replaceContainerProperties
Mono<CosmosContainerProperties> replaceContainerProperties(String containerName, CosmosContainerProperties properties) Replace container properties for the specified container- Parameters:
containerName- Stringproperties- CosmosContainerProperties- Returns:
- CosmosContainerProperties
-
findAll
Find all items in a given container- Type Parameters:
T- type of domainType- Parameters:
containerName- the containerNamedomainType- the domainType- Returns:
- Flux of results
-
findAll
Find all items in a given container- Type Parameters:
T- type of domainType- Parameters:
domainType- the domainType- Returns:
- Flux of results
-
findAll
Find all items in a given container with partition key- Type Parameters:
T- type of domainType- Parameters:
partitionKey- partition KeydomainType- the domainType- Returns:
- Flux of results
-
findById
Find by id- Type Parameters:
T- type of domainType- Parameters:
id- the iddomainType- the domainType- Returns:
- Mono of result
-
findById
Find by id- Type Parameters:
T- type of domainType- Parameters:
containerName- the containernameid- the iddomainType- type class- Returns:
- Mono of result
-
findById
Find by id- Type Parameters:
T- type of domainType- Parameters:
id- the iddomainType- type classpartitionKey- partition Key- Returns:
- Mono of result
-
insert
Insert- Type Parameters:
T- type of inserted objectToSave- Parameters:
objectToSave- the object to savepartitionKey- the partition key- Returns:
- Mono of result
-
insert
Insert- Type Parameters:
T- type of inserted objectToSave- Parameters:
containerName- the container nameobjectToSave- the object to savepartitionKey- the partition key- Returns:
- Mono of result
-
insert
Insert- Type Parameters:
T- type class of domain type- Parameters:
containerName- must not be nullobjectToSave- must not be null- Returns:
- Mono of result
-
upsert
Upsert an item with partition key- Type Parameters:
T- type class of object- Parameters:
object- the object to upsert- Returns:
- Mono of result
-
upsert
Upsert an item to container with partition key- Type Parameters:
T- type class of object- Parameters:
containerName- the container nameobject- the object to save- Returns:
- Mono of result
-
deleteById
Delete an item by id- Parameters:
containerName- the container nameid- the idpartitionKey- the partition key- Returns:
- void Mono
-
deleteEntity
Delete using entity- Type Parameters:
T- type class of domain type- Parameters:
containerName- the container nameentity- the entity object- Returns:
- void Mono
-
deleteAll
Delete all items in a container- Parameters:
containerName- the container namedomainType- the domainType- Returns:
- void Mono
-
deleteContainer
Delete container- Parameters:
containerName- the container name
-
delete
Delete items matching query- Type Parameters:
T- type class of domainType- Parameters:
query- the document querydomainType- type classcontainerName- the container name- Returns:
- Flux of results
-
find
Find items- Type Parameters:
T- type class of domainType- Parameters:
query- the document querydomainType- type classcontainerName- the container name- Returns:
- Flux of results
-
exists
Exists- Parameters:
query- the document querydomainType- type classcontainerName- the container name- Returns:
- Mono of result
-
existsById
Exists- Parameters:
id- the iddomainType- type classcontainerName- the container name- Returns:
- Mono of result
-
count
Count- Parameters:
containerName- the container name- Returns:
- Mono of result
-
count
Count- Parameters:
query- the document querycontainerName- the container name- Returns:
- Mono of result
-
count
Count- Parameters:
querySpec- the document query speccontainerName- the container name- Returns:
- Mono of result
-
getConverter
MappingCosmosConverter getConverter()To get converter- Returns:
- MappingCosmosConverter
-
runQuery
Run the query.- Type Parameters:
T- the type parameter- Parameters:
querySpec- the query specdomainType- the domain typereturnType- the return type- Returns:
- the flux
-
runQuery
<T> Flux<T> runQuery(SqlQuerySpec querySpec, org.springframework.data.domain.Sort sort, Class<?> domainType, Class<T> returnType) Run the query.- Type Parameters:
T- the type parameter- Parameters:
querySpec- the query specsort- the sort orderdomainType- the domain typereturnType- the return type- Returns:
- the flux
-