public class CosmosEncryptionContainer extends Object
Modifier and Type | Method and Description |
---|---|
<T> CosmosItemResponse<T> |
createItem(T item,
PartitionKey partitionKey,
CosmosItemRequestOptions requestOptions)
create item and encrypts the requested fields
|
CosmosItemResponse<Object> |
deleteItem(String itemId,
PartitionKey partitionKey,
CosmosItemRequestOptions requestOptions)
Deletes the item.
|
CosmosContainer |
getCosmosContainer()
Gets the CosmosContainer
|
<T> CosmosPagedIterable<T> |
queryChangeFeed(CosmosChangeFeedRequestOptions options,
Class<T> classType)
Query for items in the change feed of the current container using the
CosmosChangeFeedRequestOptions . |
<T> CosmosPagedIterable<T> |
queryItems(SqlQuerySpec query,
CosmosQueryRequestOptions options,
Class<T> classType)
Query for items in the current container using a
SqlQuerySpec . |
<T> CosmosPagedIterable<T> |
queryItems(String query,
CosmosQueryRequestOptions options,
Class<T> classType)
Query for items in the current container using a string.
|
<T> CosmosPagedIterable<T> |
queryItemsOnEncryptedProperties(SqlQuerySpecWithEncryption sqlQuerySpecWithEncryption,
CosmosQueryRequestOptions options,
Class<T> classType)
Query for items in the current container using a
SqlQuerySpecWithEncryption . |
<T> CosmosItemResponse<T> |
readItem(String id,
PartitionKey partitionKey,
CosmosItemRequestOptions requestOptions,
Class<T> classType)
Reads item and decrypt the encrypted fields
|
<T> CosmosItemResponse<T> |
replaceItem(T item,
String itemId,
PartitionKey partitionKey,
CosmosItemRequestOptions requestOptions)
replaces item and encrypts the requested fields
|
<T> CosmosItemResponse<T> |
upsertItem(T item,
PartitionKey partitionKey,
CosmosItemRequestOptions requestOptions)
upserts item and encrypts the requested fields
|
public <T> CosmosItemResponse<T> createItem(T item, PartitionKey partitionKey, CosmosItemRequestOptions requestOptions)
T
- serialization class typeitem
- the Cosmos item represented as a POJO or Cosmos item object.partitionKey
- the partition key.requestOptions
- request optionpublic CosmosItemResponse<Object> deleteItem(String itemId, PartitionKey partitionKey, CosmosItemRequestOptions requestOptions)
itemId
- id of the item.partitionKey
- partitionKey of the item.requestOptions
- the request options.public <T> CosmosItemResponse<T> upsertItem(T item, PartitionKey partitionKey, CosmosItemRequestOptions requestOptions)
T
- serialization class typeitem
- the Cosmos item represented as a POJO or Cosmos item object.partitionKey
- the partition key.requestOptions
- request optionpublic <T> CosmosItemResponse<T> replaceItem(T item, String itemId, PartitionKey partitionKey, CosmosItemRequestOptions requestOptions)
T
- serialization class typeitem
- the Cosmos item represented as a POJO or Cosmos item object.itemId
- the item id.partitionKey
- the partition key.requestOptions
- request optionpublic <T> CosmosItemResponse<T> readItem(String id, PartitionKey partitionKey, CosmosItemRequestOptions requestOptions, Class<T> classType)
T
- typeid
- item idpartitionKey
- the partition key.requestOptions
- request optionsclassType
- deserialization class typepublic <T> CosmosPagedIterable<T> queryItems(String query, CosmosQueryRequestOptions options, Class<T> classType)
T
- the type parameter.query
- the query text.options
- the query request options.classType
- the class type.CosmosPagedIterable
.public <T> CosmosPagedIterable<T> queryItems(SqlQuerySpec query, CosmosQueryRequestOptions options, Class<T> classType)
SqlQuerySpec
.T
- the type parameter.query
- the query.options
- the query request options.classType
- the class type.CosmosPagedIterable
.public <T> CosmosPagedIterable<T> queryItemsOnEncryptedProperties(SqlQuerySpecWithEncryption sqlQuerySpecWithEncryption, CosmosQueryRequestOptions options, Class<T> classType)
SqlQuerySpecWithEncryption
.T
- the type parameter.sqlQuerySpecWithEncryption
- the sqlQuerySpecWithEncryption.options
- the query request options.classType
- the class type.CosmosPagedIterable
.@Beta(value=V1, warningText="Preview API - subject to change in non-backwards compatible way") public <T> CosmosPagedIterable<T> queryChangeFeed(CosmosChangeFeedRequestOptions options, Class<T> classType)
CosmosChangeFeedRequestOptions
.
The next page can be retrieved by calling queryChangeFeed again with a new instance of
CosmosChangeFeedRequestOptions
created from the continuation token of the previously returned
FeedResponse
instance.
T
- the type parameter.options
- the change feed request options.classType
- the class type.CosmosPagedFlux
containing one feed response pagepublic CosmosContainer getCosmosContainer()
Copyright © 2021 Microsoft Corporation. All rights reserved.