PartitionKeyBuilder Class
- java.
lang. Object - com.
azure. cosmos. models. PartitionKeyBuilder
- com.
public final class PartitionKeyBuilder
Builder for partition keys.
Constructor Summary
| Constructor | Description |
|---|---|
| PartitionKeyBuilder() |
Constructor. |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
Partition |
add(boolean value)
Adds partition value of type boolean |
|
Partition |
add(double value)
Adds partition value of type double |
|
Partition |
add(String value)
Adds partition value of type string |
|
Partition |
addNoneValue()
Deprecated
Partition
Adds a None Partition Key value to the path. |
|
Partition |
addNullValue()
Deprecated
Null value should only be used with Partition
Adds a null partition key value |
|
Partition |
build()
Builds a new instance of the type Partition |
Methods inherited from java.lang.Object
Constructor Details
PartitionKeyBuilder
public PartitionKeyBuilder()
Constructor. CREATE a new instance of the PartitionKeyBuilder object.
Method Details
add
public PartitionKeyBuilder add(boolean value)
Adds partition value of type boolean
Parameters:
Returns:
add
public PartitionKeyBuilder add(double value)
Adds partition value of type double
Parameters:
Returns:
add
public PartitionKeyBuilder add(String value)
Adds partition value of type string
Parameters:
Returns:
addNoneValue
@Deprecated
public PartitionKeyBuilder addNoneValue()
Deprecated
Adds a None Partition Key value to the path. An error will be raised if used with other paths.
Returns:
addNullValue
@Deprecated
public PartitionKeyBuilder addNullValue()
Deprecated
Adds a null partition key value
Returns:
build
public PartitionKey build()
Builds a new instance of the type PartitionKey with the specified Partition Key values.
Returns: