public interface ReactiveCosmosOperations
| Modifier and Type | Method and Description |
|---|---|
Mono<Long> |
count(CosmosQuery query,
String containerName)
Count
|
Mono<Long> |
count(SqlQuerySpec querySpec,
String containerName)
Count
|
Mono<Long> |
count(String containerName)
Count
|
Mono<CosmosContainerResponse> |
createContainerIfNotExists(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 query
|
Mono<Void> |
deleteAll(String containerName,
Class<?> domainType)
Delete all items in a container
|
Mono<Void> |
deleteById(String containerName,
Object id,
PartitionKey partitionKey)
Delete an item by id
|
void |
deleteContainer(String containerName)
Delete container
|
<T> Mono<Void> |
deleteEntity(String containerName,
T entity)
Delete using entity
|
Mono<Boolean> |
exists(CosmosQuery query,
Class<?> domainType,
String containerName)
Exists
|
Mono<Boolean> |
existsById(Object id,
Class<?> domainType,
String containerName)
Exists
|
<T> Flux<T> |
find(CosmosQuery query,
Class<T> domainType,
String containerName)
Find items
|
<T> Flux<T> |
findAll(Class<T> domainType)
Find all items in a given container
|
<T> Flux<T> |
findAll(PartitionKey partitionKey,
Class<T> domainType)
Find all items in a given container with partition key
|
<T> Flux<T> |
findAll(String containerName,
Class<T> domainType)
Find all items in a given container
|
<T> Mono<T> |
findById(Object id,
Class<T> domainType)
Find by id
|
<T> Mono<T> |
findById(Object id,
Class<T> domainType,
PartitionKey partitionKey)
Find by id
|
<T> Mono<T> |
findById(String containerName,
Object id,
Class<T> domainType)
Find by id
|
String |
getContainerName(Class<?> domainType)
Get container name
|
Mono<CosmosContainerProperties> |
getContainerProperties(String containerName)
Get properties for specified container
|
MappingCosmosConverter |
getConverter()
To get converter
|
<T> Mono<T> |
insert(String containerName,
Object objectToSave,
PartitionKey partitionKey)
Insert
|
<T> Mono<T> |
insert(String containerName,
T objectToSave)
Insert
|
<T> Mono<T> |
insert(T objectToSave,
PartitionKey partitionKey)
Insert
|
Mono<CosmosContainerProperties> |
replaceContainerProperties(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(String containerName,
T object)
Upsert an item to container with partition key
|
<T> Mono<T> |
upsert(T object)
Upsert an item with partition key
|
String getContainerName(Class<?> domainType)
domainType - the domainTypeMono<CosmosContainerResponse> createContainerIfNotExists(CosmosEntityInformation<?,?> information)
information - the CosmosEntityInformationMono<CosmosContainerProperties> getContainerProperties(String containerName)
containerName - StringMono<CosmosContainerProperties> replaceContainerProperties(String containerName, CosmosContainerProperties properties)
containerName - Stringproperties - CosmosContainerProperties<T> Flux<T> findAll(String containerName, Class<T> domainType)
T - type of domainTypecontainerName - the containerNamedomainType - the domainType<T> Flux<T> findAll(Class<T> domainType)
T - type of domainTypedomainType - the domainType<T> Flux<T> findAll(PartitionKey partitionKey, Class<T> domainType)
T - type of domainTypepartitionKey - partition KeydomainType - the domainType<T> Mono<T> findById(Object id, Class<T> domainType)
T - type of domainTypeid - the iddomainType - the domainType<T> Mono<T> findById(String containerName, Object id, Class<T> domainType)
T - type of domainTypecontainerName - the containernameid - the iddomainType - type class<T> Mono<T> findById(Object id, Class<T> domainType, PartitionKey partitionKey)
T - type of domainTypeid - the iddomainType - type classpartitionKey - partition Key<T> Mono<T> insert(T objectToSave, PartitionKey partitionKey)
T - type of inserted objectToSaveobjectToSave - the object to savepartitionKey - the partition key<T> Mono<T> insert(String containerName, Object objectToSave, PartitionKey partitionKey)
T - type of inserted objectToSavecontainerName - the container nameobjectToSave - the object to savepartitionKey - the partition key<T> Mono<T> insert(String containerName, T objectToSave)
T - type class of domain typecontainerName - must not be nullobjectToSave - must not be null<T> Mono<T> upsert(T object)
T - type class of objectobject - the object to upsert<T> Mono<T> upsert(String containerName, T object)
T - type class of objectcontainerName - the container nameobject - the object to saveMono<Void> deleteById(String containerName, Object id, PartitionKey partitionKey)
containerName - the container nameid - the idpartitionKey - the partition key<T> Mono<Void> deleteEntity(String containerName, T entity)
T - type class of domain typecontainerName - the container nameentity - the entity objectMono<Void> deleteAll(String containerName, Class<?> domainType)
containerName - the container namedomainType - the domainTypevoid deleteContainer(String containerName)
containerName - the container name<T> Flux<T> delete(CosmosQuery query, Class<T> domainType, String containerName)
T - type class of domainTypequery - the document querydomainType - type classcontainerName - the container name<T> Flux<T> find(CosmosQuery query, Class<T> domainType, String containerName)
T - type class of domainTypequery - the document querydomainType - type classcontainerName - the container nameMono<Boolean> exists(CosmosQuery query, Class<?> domainType, String containerName)
query - the document querydomainType - type classcontainerName - the container nameMono<Boolean> existsById(Object id, Class<?> domainType, String containerName)
id - the iddomainType - type classcontainerName - the container nameMono<Long> count(String containerName)
containerName - the container nameMono<Long> count(CosmosQuery query, String containerName)
query - the document querycontainerName - the container nameMono<Long> count(SqlQuerySpec querySpec, String containerName)
querySpec - the document query speccontainerName - the container nameMappingCosmosConverter getConverter()
<T> Flux<T> runQuery(SqlQuerySpec querySpec, Class<?> domainType, Class<T> returnType)
T - the type parameterquerySpec - the query specdomainType - the domain typereturnType - the return type<T> Flux<T> runQuery(SqlQuerySpec querySpec, org.springframework.data.domain.Sort sort, Class<?> domainType, Class<T> returnType)
T - the type parameterquerySpec - the query specsort - the sort orderdomainType - the domain typereturnType - the return typeVisit the Azure for Java Developers site for more Java documentation, including quick starts, tutorials, and code samples.