Class PartitionKeyMetaData


  • public class PartitionKeyMetaData
    extends java.lang.Object
    Meta-data for the PartitionKey.
    Author:
    Daniel Sagenschneider
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static PartitionKeyMetaData DEFAULT
      Default PartitionKeyMetaData being the identifier of the entity.
      static java.util.function.Function<java.lang.Object,​com.azure.cosmos.models.PartitionKey> DEFAULT_FACTORY
      Default PartitionKey factory that uses the entity's identifier.
    • Constructor Summary

      Constructors 
      Constructor Description
      PartitionKeyMetaData​(java.lang.String path, java.util.function.Function<java.lang.Object,​com.azure.cosmos.models.PartitionKey> factory)
      Instantiate.
    • Field Detail

      • DEFAULT_FACTORY

        public static final java.util.function.Function<java.lang.Object,​com.azure.cosmos.models.PartitionKey> DEFAULT_FACTORY
        Default PartitionKey factory that uses the entity's identifier.
    • Constructor Detail

      • PartitionKeyMetaData

        public PartitionKeyMetaData​(java.lang.String path,
                                    java.util.function.Function<java.lang.Object,​com.azure.cosmos.models.PartitionKey> factory)
        Instantiate.
        Parameters:
        path - PartitionKey path.
        factory - Factory to create PartitionKey from entity.
    • Method Detail

      • getPath

        public java.lang.String getPath()
        Obtains the PartitionKey path.
        Returns:
        PartitionKey path.
      • getFactory

        public java.util.function.Function<java.lang.Object,​com.azure.cosmos.models.PartitionKey> getFactory()
        Obtains the factory to create PartitionKey from entity.
        Returns:
        Factory to create PartitionKey from entity.