public class CosmosContainer extends Object
Modifier and Type | Method and Description |
---|---|
<T> CosmosItemResponse<T> |
createItem(T item)
Create item cosmos sync item response.
|
<T> CosmosItemResponse<T> |
createItem(T item,
CosmosItemRequestOptions options)
Create a cosmos item.
|
<T> CosmosItemResponse<T> |
createItem(T item,
PartitionKey partitionKey,
CosmosItemRequestOptions options)
Create a cosmos item synchronously.
|
CosmosContainerResponse |
delete()
Delete cosmos sync container response.
|
CosmosContainerResponse |
delete(CosmosContainerRequestOptions options)
Delete cosmos sync container response.
|
CosmosItemResponse |
deleteItem(String itemId,
PartitionKey partitionKey,
CosmosItemRequestOptions options)
Delete cosmos sync item response.
|
String |
getId()
Id string.
|
CosmosScripts |
getScripts()
Gets the cosmos sync scripts.
|
<T> CosmosContinuablePagedIterable<T> |
queryItems(SqlQuerySpec querySpec,
FeedOptions options,
Class<T> klass)
Query items
CosmosContinuablePagedIterable . |
<T> CosmosContinuablePagedIterable<T> |
queryItems(String query,
FeedOptions options,
Class<T> klass)
Query items
CosmosContinuablePagedIterable . |
CosmosContainerResponse |
read()
Read cosmos sync container response.
|
CosmosContainerResponse |
read(CosmosContainerRequestOptions options)
Read cosmos sync container response.
|
<T> CosmosContinuablePagedIterable<T> |
readAllItems(FeedOptions options,
Class<T> klass)
Read all items
CosmosContinuablePagedIterable . |
<T> CosmosItemResponse<T> |
readItem(String itemId,
PartitionKey partitionKey,
Class<T> itemType)
Read cosmos sync item response.
|
<T> CosmosItemResponse<T> |
readItem(String itemId,
PartitionKey partitionKey,
CosmosItemRequestOptions options,
Class<T> itemType)
Read cosmos sync item response.
|
Integer |
readProvisionedThroughput()
Read provisioned throughput integer.
|
CosmosContainerResponse |
replace(CosmosContainerProperties containerProperties)
Replace cosmos sync container response.
|
CosmosContainerResponse |
replace(CosmosContainerProperties containerProperties,
CosmosContainerRequestOptions options)
Replace cosmos sync container response.
|
<T> CosmosItemResponse<T> |
replaceItem(T item,
String itemId,
PartitionKey partitionKey,
CosmosItemRequestOptions options)
Replace cosmos sync item response.
|
Integer |
replaceProvisionedThroughput(int requestUnitsPerSecond)
Replace provisioned throughput integer.
|
<T> CosmosItemResponse<T> |
upsertItem(Object item,
CosmosItemRequestOptions options)
Upsert item cosmos sync item response.
|
<T> CosmosItemResponse<T> |
upsertItem(T item)
Upsert item cosmos sync item response.
|
public String getId()
public CosmosContainerResponse read() throws CosmosClientException
CosmosClientException
- the cosmos client exceptionpublic CosmosContainerResponse read(CosmosContainerRequestOptions options) throws CosmosClientException
options
- the optionsCosmosClientException
- the cosmos client exceptionpublic CosmosContainerResponse delete(CosmosContainerRequestOptions options) throws CosmosClientException
options
- the optionsCosmosClientException
- the cosmos client exceptionpublic CosmosContainerResponse delete() throws CosmosClientException
CosmosClientException
- the cosmos client exceptionpublic CosmosContainerResponse replace(CosmosContainerProperties containerProperties) throws CosmosClientException
containerProperties
- the container propertiesCosmosClientException
- the cosmos client exceptionpublic CosmosContainerResponse replace(CosmosContainerProperties containerProperties, CosmosContainerRequestOptions options) throws CosmosClientException
containerProperties
- the container propertiesoptions
- the optionsCosmosClientException
- the cosmos client exceptionpublic Integer readProvisionedThroughput() throws CosmosClientException
CosmosClientException
- the cosmos client exceptionpublic Integer replaceProvisionedThroughput(int requestUnitsPerSecond) throws CosmosClientException
requestUnitsPerSecond
- the request units per secondCosmosClientException
- the cosmos client exceptionpublic <T> CosmosItemResponse<T> createItem(T item) throws CosmosClientException
item
- the itemCosmosClientException
- the cosmos client exceptionpublic <T> CosmosItemResponse<T> createItem(T item, PartitionKey partitionKey, CosmosItemRequestOptions options) throws CosmosClientException
T
- the type parameteritem
- the itempartitionKey
- the partition keyoptions
- the optionsCosmosClientException
- the cosmos client exceptionpublic <T> CosmosItemResponse<T> createItem(T item, CosmosItemRequestOptions options) throws CosmosClientException
T
- the type parameteritem
- the itemoptions
- the optionsCosmosClientException
- the cosmos client exceptionpublic <T> CosmosItemResponse<T> upsertItem(T item) throws CosmosClientException
item
- the itemCosmosClientException
- the cosmos client exceptionpublic <T> CosmosItemResponse<T> upsertItem(Object item, CosmosItemRequestOptions options) throws CosmosClientException
item
- the itemoptions
- the optionsCosmosClientException
- the cosmos client exceptionpublic <T> CosmosContinuablePagedIterable<T> readAllItems(FeedOptions options, Class<T> klass)
CosmosContinuablePagedIterable
.T
- the type parameteroptions
- the optionsklass
- the klassCosmosContinuablePagedIterable
public <T> CosmosContinuablePagedIterable<T> queryItems(String query, FeedOptions options, Class<T> klass)
CosmosContinuablePagedIterable
.T
- the type parameterquery
- the queryoptions
- the optionsklass
- the class typeCosmosContinuablePagedIterable
public <T> CosmosContinuablePagedIterable<T> queryItems(SqlQuerySpec querySpec, FeedOptions options, Class<T> klass)
CosmosContinuablePagedIterable
.T
- the type parameterquerySpec
- the query specoptions
- the optionsklass
- the class typeCosmosContinuablePagedIterable
public <T> CosmosItemResponse<T> readItem(String itemId, PartitionKey partitionKey, Class<T> itemType) throws CosmosClientException
itemId
- the item idpartitionKey
- the partition keyCosmosClientException
- the cosmos client exceptionpublic <T> CosmosItemResponse<T> readItem(String itemId, PartitionKey partitionKey, CosmosItemRequestOptions options, Class<T> itemType) throws CosmosClientException
options
- the optionsCosmosClientException
- the cosmos client exceptionpublic <T> CosmosItemResponse<T> replaceItem(T item, String itemId, PartitionKey partitionKey, CosmosItemRequestOptions options) throws CosmosClientException
T
- the type parameteritem
- the itemitemId
- the item idpartitionKey
- the partition keyoptions
- the optionsCosmosClientException
- the cosmos client exceptionpublic CosmosItemResponse deleteItem(String itemId, PartitionKey partitionKey, CosmosItemRequestOptions options) throws CosmosClientException
options
- the optionsCosmosClientException
- the cosmos client exceptionpublic CosmosScripts getScripts()
Copyright © 2020 Microsoft Corporation. All rights reserved.