Package com.azure.data.cosmos
Class PartitionKey
- java.lang.Object
-
- com.azure.data.cosmos.PartitionKey
-
public class PartitionKey extends Object
Represents a partition key value in the Azure Cosmos DB database service. A partition key identifies the partition where the document is stored in.
-
-
Field Summary
Fields Modifier and Type Field Description static PartitionKey
None
-
Constructor Summary
Constructors Constructor Description PartitionKey(Object key)
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object other)
Overrides the Equal operator for object comparisons between two instances ofPartitionKey
static PartitionKey
fromJsonString(String jsonString)
Create a new instance of the PartitionKey object from a serialized JSON partition key.com.azure.data.cosmos.internal.routing.PartitionKeyInternal
getInternalPartitionKey()
String
toString()
Serialize the PartitionKey object to a JSON string.
-
-
-
Field Detail
-
None
public static PartitionKey None
-
-
Constructor Detail
-
PartitionKey
public PartitionKey(Object key)
Constructor. CREATE a new instance of the PartitionKey object.- Parameters:
key
- the value of the partition key.
-
-
Method Detail
-
fromJsonString
public static PartitionKey fromJsonString(String jsonString)
Create a new instance of the PartitionKey object from a serialized JSON partition key.- Parameters:
jsonString
- the JSON string representation of this PartitionKey object.- Returns:
- the PartitionKey instance.
-
toString
public String toString()
Serialize the PartitionKey object to a JSON string.
-
getInternalPartitionKey
public com.azure.data.cosmos.internal.routing.PartitionKeyInternal getInternalPartitionKey()
-
equals
public boolean equals(Object other)
Overrides the Equal operator for object comparisons between two instances ofPartitionKey
-
-