Package com.azure.cosmos.models
Class PartitionKeyBuilder
java.lang.Object
com.azure.cosmos.models.PartitionKeyBuilder
@Beta(value=V4_16_0,
warningText="Preview API - subject to change in non-backwards compatible way")
public final class PartitionKeyBuilder
extends Object
Builder for partition keys.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionadd
(boolean value) Adds partition value of type booleanadd
(double value) Adds partition value of type doubleAdds partition value of type stringAdds a None Partition KeyAdds a null partition key valuebuild()
Builds a new instance of the type PartitionKey with the specified Partition Key values.
-
Constructor Details
-
PartitionKeyBuilder
@Beta(value=V4_16_0, warningText="Preview API - subject to change in non-backwards compatible way") public PartitionKeyBuilder()Constructor. CREATE a new instance of the PartitionKeyBuilder object.
-
-
Method Details
-
add
@Beta(value=V4_16_0, warningText="Preview API - subject to change in non-backwards compatible way") public PartitionKeyBuilder add(String value) Adds partition value of type string- Parameters:
value
- The value of type string to be used as partition key- Returns:
- The current PartitionKeyBuilder object
-
add
@Beta(value=V4_16_0, warningText="Preview API - subject to change in non-backwards compatible way") public PartitionKeyBuilder add(double value) Adds partition value of type double- Parameters:
value
- The value of type double to be used as partition key- Returns:
- The current PartitionKeyBuilder object
-
add
@Beta(value=V4_16_0, warningText="Preview API - subject to change in non-backwards compatible way") public PartitionKeyBuilder add(boolean value) Adds partition value of type boolean- Parameters:
value
- The value of type boolean to be used as partition key- Returns:
- The current PartitionKeyBuilder object
-
addNullValue
@Beta(value=V4_16_0, warningText="Preview API - subject to change in non-backwards compatible way") public PartitionKeyBuilder addNullValue()Adds a null partition key value- Returns:
- The current PartitionKeyBuilder object
-
addNoneValue
@Beta(value=V4_16_0, warningText="Preview API - subject to change in non-backwards compatible way") public PartitionKeyBuilder addNoneValue()Adds a None Partition Key- Returns:
- The current PartitionKeyBuilder object
-
build
@Beta(value=V4_16_0, warningText="Preview API - subject to change in non-backwards compatible way") public PartitionKey build()Builds a new instance of the type PartitionKey with the specified Partition Key values.- Returns:
- PartitionKey object
-