### YamlMime:JavaType
uid: "com.microsoft.azure.documentdb.PartitionKeyDefinition"
fullName: "com.microsoft.azure.documentdb.PartitionKeyDefinition"
name: "PartitionKeyDefinition"
nameWithType: "PartitionKeyDefinition"
summary: "Represents a partition key definition in the Azure Cosmos DB database service."
inheritances:
- ""
- ""
inheritedClassMethods:
- classRef: ""
methodsRef:
- "getCollection(java.lang.String,java.lang.Class)?alt=com.microsoft.azure.documentdb.JsonSerializable.getCollection&text=getCollection\" data-throw-if-not-resolved=\"False\" />"
- "getObject(java.lang.String,java.lang.Class)?alt=com.microsoft.azure.documentdb.JsonSerializable.getObject&text=getObject\" data-throw-if-not-resolved=\"False\" />"
- "set(java.lang.String,T)?alt=com.microsoft.azure.documentdb.JsonSerializable.set&text=set\" data-throw-if-not-resolved=\"False\" />"
- "toObject(java.lang.Class)?alt=com.microsoft.azure.documentdb.JsonSerializable.toObject&text=toObject\" data-throw-if-not-resolved=\"False\" />"
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- ")?alt=com.microsoft.azure.documentdb.JsonSerializable.getObjectByPath&text=getObjectByPath\" data-throw-if-not-resolved=\"False\" />"
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- classRef: ""
methodsRef:
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- ""
syntax: "public final class **PartitionKeyDefinition** extends "
constructors:
- uid: "com.microsoft.azure.documentdb.PartitionKeyDefinition.PartitionKeyDefinition()"
fullName: "com.microsoft.azure.documentdb.PartitionKeyDefinition.PartitionKeyDefinition()"
name: "PartitionKeyDefinition()"
nameWithType: "PartitionKeyDefinition.PartitionKeyDefinition()"
summary: "Constructor."
syntax: "public PartitionKeyDefinition()"
desc: "Constructor. Creates a new instance of the PartitionKeyDefinition object."
- uid: "com.microsoft.azure.documentdb.PartitionKeyDefinition.PartitionKeyDefinition(java.lang.String)"
fullName: "com.microsoft.azure.documentdb.PartitionKeyDefinition.PartitionKeyDefinition(String jsonString)"
name: "PartitionKeyDefinition(String jsonString)"
nameWithType: "PartitionKeyDefinition.PartitionKeyDefinition(String jsonString)"
summary: "Constructor."
parameters:
- description: "the JSON string that represents the partition key definition."
name: "jsonString"
type: ""
syntax: "public PartitionKeyDefinition(String jsonString)"
desc: "Constructor. Creates a new instance of the PartitionKeyDefinition object from a JSON string."
- uid: "com.microsoft.azure.documentdb.PartitionKeyDefinition.PartitionKeyDefinition(org.json.JSONObject)"
fullName: "com.microsoft.azure.documentdb.PartitionKeyDefinition.PartitionKeyDefinition(JSONObject jsonObject)"
name: "PartitionKeyDefinition(JSONObject jsonObject)"
nameWithType: "PartitionKeyDefinition.PartitionKeyDefinition(JSONObject jsonObject)"
summary: "Constructor."
parameters:
- description: "the JSON object that represents the partition key definition."
name: "jsonObject"
type: ""
syntax: "public PartitionKeyDefinition(JSONObject jsonObject)"
desc: "Constructor. Creates a new instance of the PartitionKeyDefinition object from a JSON object."
methods:
- uid: "com.microsoft.azure.documentdb.PartitionKeyDefinition.getKind()"
fullName: "com.microsoft.azure.documentdb.PartitionKeyDefinition.getKind()"
name: "getKind()"
nameWithType: "PartitionKeyDefinition.getKind()"
summary: "Sets the partition algorithm used to calculate the partition id given a partition key."
syntax: "public PartitionKind getKind()"
desc: "Sets the partition algorithm used to calculate the partition id given a partition key."
returns:
description: "the partition algorithm."
type: ""
- uid: "com.microsoft.azure.documentdb.PartitionKeyDefinition.getPaths()"
fullName: "com.microsoft.azure.documentdb.PartitionKeyDefinition.getPaths()"
name: "getPaths()"
nameWithType: "PartitionKeyDefinition.getPaths()"
summary: "Gets the document property paths for the partition key."
syntax: "public Collection getPaths()"
desc: "Gets the document property paths for the partition key."
returns:
description: "the paths to the document properties that form the partition key."
type: "<>"
- uid: "com.microsoft.azure.documentdb.PartitionKeyDefinition.getVersion()"
fullName: "com.microsoft.azure.documentdb.PartitionKeyDefinition.getVersion()"
name: "getVersion()"
nameWithType: "PartitionKeyDefinition.getVersion()"
syntax: "public PartitionKeyDefinitionVersion getVersion()"
returns:
type: ""
- uid: "com.microsoft.azure.documentdb.PartitionKeyDefinition.setKind(com.microsoft.azure.documentdb.PartitionKind)"
fullName: "com.microsoft.azure.documentdb.PartitionKeyDefinition.setKind(PartitionKind kind)"
name: "setKind(PartitionKind kind)"
nameWithType: "PartitionKeyDefinition.setKind(PartitionKind kind)"
summary: "Sets the partition algorithm used to calculate the partition id given a partition key."
parameters:
- description: "the partition algorithm."
name: "kind"
type: ""
syntax: "public void setKind(PartitionKind kind)"
desc: "Sets the partition algorithm used to calculate the partition id given a partition key."
- uid: "com.microsoft.azure.documentdb.PartitionKeyDefinition.setPaths(java.util.Collection)"
fullName: "com.microsoft.azure.documentdb.PartitionKeyDefinition.setPaths(Collection paths)"
name: "setPaths(Collection paths)"
nameWithType: "PartitionKeyDefinition.setPaths(Collection paths)"
summary: "Sets the document property paths for the partition key."
parameters:
- description: "the paths to document properties that form the partition key."
name: "paths"
type: "<>"
syntax: "public void setPaths(Collection paths)"
desc: "Sets the document property paths for the partition key."
- uid: "com.microsoft.azure.documentdb.PartitionKeyDefinition.setVersion(com.microsoft.azure.documentdb.PartitionKeyDefinitionVersion)"
fullName: "com.microsoft.azure.documentdb.PartitionKeyDefinition.setVersion(PartitionKeyDefinitionVersion version)"
name: "setVersion(PartitionKeyDefinitionVersion version)"
nameWithType: "PartitionKeyDefinition.setVersion(PartitionKeyDefinitionVersion version)"
parameters:
- name: "version"
type: ""
syntax: "public void setVersion(PartitionKeyDefinitionVersion version)"
type: "class"
desc: "Represents a partition key definition in the Azure Cosmos DB database service. A partition key definition specifies which document property is used as the partition key in a collection that has multiple partitions."
metadata: {}
package: "com.microsoft.azure.documentdb"
artifact: com.microsoft.azure:azure-documentdb:2.4.7