PartitionKeyDefinition Class
- java.
lang. Object - com.
azure. cosmos. models. PartitionKeyDefinition
- com.
public final class PartitionKeyDefinition
Represents a partition key definition in the Azure Cosmos DB database service. A partition key definition specifies which item property is used as the partition key in a container that has multiple partitions.
Constructor Summary
Constructor | Description |
---|---|
PartitionKeyDefinition() |
Constructor. |
Method Summary
Modifier and Type | Method and Description |
---|---|
Partition |
getKind()
Sets the partition algorithm used to calculate the partition id given a partition key. |
List<String> |
getPaths()
Gets the item property paths for the partition key. |
Partition |
getVersion()
Gets version. |
Partition |
setKind(PartitionKind kind)
Sets the partition algorithm used to calculate the partition id given a partition key. |
Partition |
setPaths(List<String> paths)
Sets the item property paths for the partition key. |
Partition |
setVersion(PartitionKeyDefinitionVersion version)
Sets version. |
Methods inherited from java.lang.Object
Constructor Details
PartitionKeyDefinition
public PartitionKeyDefinition()
Constructor. Creates a new instance of the PartitionKeyDefinition object.
Method Details
getKind
public PartitionKind getKind()
Sets the partition algorithm used to calculate the partition id given a partition key.
Returns:
getPaths
public List
Gets the item property paths for the partition key.
Returns:
getVersion
public PartitionKeyDefinitionVersion getVersion()
Gets version.
Returns:
setKind
public PartitionKeyDefinition setKind(PartitionKind kind)
Sets the partition algorithm used to calculate the partition id given a partition key.
Parameters:
Returns:
setPaths
public PartitionKeyDefinition setPaths(List
Sets the item property paths for the partition key.
Parameters:
Returns:
setVersion
public PartitionKeyDefinition setVersion(PartitionKeyDefinitionVersion version)
Sets version.
Parameters:
Returns:
Applies to
Azure SDK for Java