CosmosContainer.<T>readItem Method
Definition
Overloads
<T>readItem(String itemId, PartitionKey partitionKey, CosmosItemRequestOptions options, Class<T> itemType) |
Reads an item in the current container while specifying additional options. |
<T>readItem(String itemId, PartitionKey partitionKey, Class<T> itemType) |
Reads an item in the current container. |
<T>readItem(String itemId, PartitionKey partitionKey, CosmosItemRequestOptions options, Class<T> itemType)
Reads an item in the current container while specifying additional options.
public CosmosItemResponse<T> <T>readItem(String itemId, PartitionKey partitionKey, CosmosItemRequestOptions options, Class<T> itemType)
Parameters
- itemId
- java.lang.String
the item id.
- partitionKey
- PartitionKey
the partition key.
- options
- CosmosItemRequestOptions
the options.
- itemType
- java.lang.Class<T>
the class type of item.
Returns
the Cosmos item response.
<T>readItem(String itemId, PartitionKey partitionKey, Class<T> itemType)
Reads an item in the current container.
public CosmosItemResponse<T> <T>readItem(String itemId, PartitionKey partitionKey, Class<T> itemType)
Parameters
- itemId
- java.lang.String
the item id.
- partitionKey
- PartitionKey
the partition key.
- itemType
- java.lang.Class<T>
the class type of item.
Returns
the Cosmos item response.