@NoRepositoryBean
public interface CosmosRepository<T,ID extends Serializable>
extends org.springframework.data.repository.PagingAndSortingRepository<T,ID>
PagingAndSortingRepository to provide additional methods to retrieve entities using the
pagination and sorting abstraction.| Modifier and Type | Method and Description |
|---|---|
void |
deleteById(ID id,
PartitionKey partitionKey)
Deletes an entity by its id and partition key.
|
Iterable<T> |
findAll(PartitionKey partitionKey)
Returns list of items in a specific partition
|
Optional<T> |
findById(ID id,
PartitionKey partitionKey)
Retrieves an entity by its id.
|
Optional<T> findById(ID id, PartitionKey partitionKey)
id - must not be null.partitionKey - partition key value of entity, must not be null.IllegalArgumentException - if id is null.void deleteById(ID id, PartitionKey partitionKey)
id - must not be null.partitionKey - partition key value of the entity, must not be null.IllegalArgumentException - in case the given id is null.Iterable<T> findAll(PartitionKey partitionKey)
partitionKey - partition key valueVisit the Azure for Java Developers site for more Java documentation, including quick starts, tutorials, and code samples.