CosmosRepository<T,ID> Interface
Type Parameters
- T
domain type.
- ID
id type.
Implements
public interface CosmosRepository<T,ID>
extends org.springframework.data.repository.PagingAndSortingRepository<T,ID>, org.springframework.data.repository.CrudRepository<T,ID>
Extension of PagingAndSortingRepository to provide additional methods to retrieve entities using the pagination and sorting abstraction.
Method Summary
Modifier and Type | Method and Description |
---|---|
abstract S |
save(ID id, PartitionKey partitionKey, Class<S> domainType, CosmosPatchOperations patchOperations)
Patches an entity by its id and partition key with Cosmos |
abstract S |
save(ID id, PartitionKey partitionKey, Class<S> domainType, CosmosPatchOperations patchOperations, CosmosPatchItemRequestOptions options)
Patches an entity by its id and partition key with Cosmos |
abstract void |
deleteById(ID id, PartitionKey partitionKey)
Deletes an entity by its id and partition key. |
abstract Iterable<T> |
findAll(PartitionKey partitionKey)
Returns list of items in a specific partition |
abstract Optional<T> |
findById(ID id, PartitionKey partitionKey)
Retrieves an entity by its id. |
Method Details
save
public abstract S save(ID id, PartitionKey partitionKey, Class domainType, CosmosPatchOperations patchOperations)
Patches an entity by its id and partition key with CosmosPatchItemRequestOptions
Parameters:
Returns:
save
public abstract S save(ID id, PartitionKey partitionKey, Class domainType, CosmosPatchOperations patchOperations, CosmosPatchItemRequestOptions options)
Patches an entity by its id and partition key with CosmosPatchItemRequestOptions
Parameters:
Returns:
deleteById
public abstract void deleteById(ID id, PartitionKey partitionKey)
Deletes an entity by its id and partition key.
Parameters:
findAll
public abstract Iterable
Returns list of items in a specific partition
Parameters:
Returns:
findById
public abstract Optional
Retrieves an entity by its id.
Parameters:
Returns:
Applies to
Azure SDK for Java