Interface ReactiveCosmosOperations

All Known Implementing Classes:
ReactiveCosmosTemplate

public interface ReactiveCosmosOperations
Operation class of reactive cosmos
  • Method Details

    • getContainerName

      String getContainerName(Class<?> domainType)
      Get container name
      Parameters:
      domainType - the domainType
      Returns:
      container name
    • createContainerIfNotExists

      Mono<CosmosContainerResponse> createContainerIfNotExists(CosmosEntityInformation<?,?> information)
      Creates a container if it doesn't already exist
      Parameters:
      information - the CosmosEntityInformation
      Returns:
      Mono of CosmosContainerResponse
    • getContainerProperties

      Mono<CosmosContainerProperties> getContainerProperties(String containerName)
      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 - String
      properties - CosmosContainerProperties
      Returns:
      CosmosContainerProperties
    • findAll

      <T> Flux<T> findAll(String containerName, Class<T> domainType)
      Find all items in a given container
      Type Parameters:
      T - type of domainType
      Parameters:
      containerName - the containerName
      domainType - the domainType
      Returns:
      Flux of results
    • findAll

      <T> Flux<T> findAll(Class<T> domainType)
      Find all items in a given container
      Type Parameters:
      T - type of domainType
      Parameters:
      domainType - the domainType
      Returns:
      Flux of results
    • findAll

      <T> Flux<T> findAll(PartitionKey partitionKey, Class<T> domainType)
      Find all items in a given container with partition key
      Type Parameters:
      T - type of domainType
      Parameters:
      partitionKey - partition Key
      domainType - the domainType
      Returns:
      Flux of results
    • findById

      <T> Mono<T> findById(Object id, Class<T> domainType)
      Find by id
      Type Parameters:
      T - type of domainType
      Parameters:
      id - the id
      domainType - the domainType
      Returns:
      Mono of result
    • findById

      <T> Mono<T> findById(String containerName, Object id, Class<T> domainType)
      Find by id
      Type Parameters:
      T - type of domainType
      Parameters:
      containerName - the containername
      id - the id
      domainType - type class
      Returns:
      Mono of result
    • findById

      <T> Mono<T> findById(Object id, Class<T> domainType, PartitionKey partitionKey)
      Find by id
      Type Parameters:
      T - type of domainType
      Parameters:
      id - the id
      domainType - type class
      partitionKey - partition Key
      Returns:
      Mono of result
    • insert

      <T> Mono<T> insert(T objectToSave, PartitionKey partitionKey)
      Insert
      Type Parameters:
      T - type of inserted objectToSave
      Parameters:
      objectToSave - the object to save
      partitionKey - the partition key
      Returns:
      Mono of result
    • insert

      <T> Mono<T> insert(String containerName, T objectToSave, PartitionKey partitionKey)
      Insert
      Type Parameters:
      T - type of inserted objectToSave
      Parameters:
      containerName - the container name
      objectToSave - the object to save
      partitionKey - the partition key
      Returns:
      Mono of result
    • insert

      <T> Mono<T> insert(String containerName, T objectToSave)
      Insert
      Type Parameters:
      T - type class of domain type
      Parameters:
      containerName - must not be null
      objectToSave - must not be null
      Returns:
      Mono of result
    • upsert

      <T> Mono<T> upsert(T object)
      Upsert an item with partition key
      Type Parameters:
      T - type class of object
      Parameters:
      object - the object to upsert
      Returns:
      Mono of result
    • upsert

      <T> Mono<T> upsert(String containerName, T object)
      Upsert an item to container with partition key
      Type Parameters:
      T - type class of object
      Parameters:
      containerName - the container name
      object - the object to save
      Returns:
      Mono of result
    • deleteById

      Mono<Void> deleteById(String containerName, Object id, PartitionKey partitionKey)
      Delete an item by id
      Parameters:
      containerName - the container name
      id - the id
      partitionKey - the partition key
      Returns:
      void Mono
    • deleteEntity

      <T> Mono<Void> deleteEntity(String containerName, T entity)
      Delete using entity
      Type Parameters:
      T - type class of domain type
      Parameters:
      containerName - the container name
      entity - the entity object
      Returns:
      void Mono
    • deleteAll

      Mono<Void> deleteAll(String containerName, Class<?> domainType)
      Delete all items in a container
      Parameters:
      containerName - the container name
      domainType - the domainType
      Returns:
      void Mono
    • deleteContainer

      void deleteContainer(String containerName)
      Delete container
      Parameters:
      containerName - the container name
    • delete

      <T> Flux<T> delete(CosmosQuery query, Class<T> domainType, String containerName)
      Delete items matching query
      Type Parameters:
      T - type class of domainType
      Parameters:
      query - the document query
      domainType - type class
      containerName - the container name
      Returns:
      Flux of results
    • find

      <T> Flux<T> find(CosmosQuery query, Class<T> domainType, String containerName)
      Find items
      Type Parameters:
      T - type class of domainType
      Parameters:
      query - the document query
      domainType - type class
      containerName - the container name
      Returns:
      Flux of results
    • exists

      Mono<Boolean> exists(CosmosQuery query, Class<?> domainType, String containerName)
      Exists
      Parameters:
      query - the document query
      domainType - type class
      containerName - the container name
      Returns:
      Mono of result
    • existsById

      Mono<Boolean> existsById(Object id, Class<?> domainType, String containerName)
      Exists
      Parameters:
      id - the id
      domainType - type class
      containerName - the container name
      Returns:
      Mono of result
    • count

      Mono<Long> count(String containerName)
      Count
      Parameters:
      containerName - the container name
      Returns:
      Mono of result
    • count

      Mono<Long> count(CosmosQuery query, String containerName)
      Count
      Parameters:
      query - the document query
      containerName - the container name
      Returns:
      Mono of result
    • count

      Mono<Long> count(SqlQuerySpec querySpec, String containerName)
      Count
      Parameters:
      querySpec - the document query spec
      containerName - the container name
      Returns:
      Mono of result
    • getConverter

      MappingCosmosConverter getConverter()
      To get converter
      Returns:
      MappingCosmosConverter
    • runQuery

      <T> Flux<T> runQuery(SqlQuerySpec querySpec, Class<?> domainType, Class<T> returnType)
      Run the query.
      Type Parameters:
      T - the type parameter
      Parameters:
      querySpec - the query spec
      domainType - the domain type
      returnType - 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 spec
      sort - the sort order
      domainType - the domain type
      returnType - the return type
      Returns:
      the flux