Package com.azure.cosmos.models
Class PartitionKey
- java.lang.Object
-
- com.azure.cosmos.models.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 item is stored in.
-
-
Field Summary
Fields Modifier and Type Field Description static PartitionKey
NONE
Partition key that represents no partition key.
-
Constructor Summary
Constructors Constructor Description PartitionKey(Object key)
Constructor.
-
Method Summary
All 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
int
hashCode()
String
toString()
Serialize the PartitionKey object to a JSON string.
-
-
-
Field Detail
-
NONE
public static final PartitionKey NONE
Partition key that represents no partition key.
-
-
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
-
toString
public String toString()
Serialize the PartitionKey object to a JSON string.
-
equals
public boolean equals(Object other)
Overrides the Equal operator for object comparisons between two instances ofPartitionKey
-
-