Class 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.
    • 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.
        Overrides:
        toString in class Object
        Returns:
        the string representation of this PartitionKey object.
      • 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 of PartitionKey
        Overrides:
        equals in class Object
        Parameters:
        other - The object to compare with.
        Returns:
        True if two object instance are considered equal.