PartitionKeyRange Class

public class PartitionKeyRange
extends Resource

Represent a partition key range in the Azure Cosmos DB database service.

Field Summary

Modifier and Type Field and Description
static final java.lang.String MASTER_PARTITION_KEY_RANGE_ID
static final java.lang.String MAXIMUM_EXCLUSIVE_EFFECTIVE_PARTITION_KEY
static final java.lang.String MINIMUM_INCLUSIVE_EFFECTIVE_PARTITION_KEY

Constructor Summary

Constructor Description
PartitionKeyRange()

Initialize a partition key range object.

PartitionKeyRange(String jsonString)

Initialize a partition key range object from json string.

PartitionKeyRange(String id, String minInclusive, String maxExclusive)
PartitionKeyRange(JSONObject jsonObject)

Initialize a partition key range object from json object.

Method Summary

Modifier and Type Method and Description
boolean equals(Object obj)
java.lang.String getMaxExclusive()
java.lang.String getMinInclusive()
java.util.Collection<java.lang.String> getParents()

Used internally to indicate the ID of the parent range

int hashCode()
void setMaxExclusive(String maxExclusive)
void setMinInclusive(String minInclusive)
com.microsoft.azure.documentdb.internal.routing.Range<java.lang.String> toRange()

Methods inherited from JsonSerializable

Methods inherited from Resource

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Field Details

MASTER_PARTITION_KEY_RANGE_ID

public static final String MASTER_PARTITION_KEY_RANGE_ID

MAXIMUM_EXCLUSIVE_EFFECTIVE_PARTITION_KEY

public static final String MAXIMUM_EXCLUSIVE_EFFECTIVE_PARTITION_KEY

MINIMUM_INCLUSIVE_EFFECTIVE_PARTITION_KEY

public static final String MINIMUM_INCLUSIVE_EFFECTIVE_PARTITION_KEY

Constructor Details

PartitionKeyRange

public PartitionKeyRange()

Initialize a partition key range object.

PartitionKeyRange

public PartitionKeyRange(String jsonString)

Initialize a partition key range object from json string.

Parameters:

jsonString - the json string that represents the partition key range object.

PartitionKeyRange

public PartitionKeyRange(String id, String minInclusive, String maxExclusive)

Parameters:

id
minInclusive
maxExclusive

PartitionKeyRange

public PartitionKeyRange(JSONObject jsonObject)

Initialize a partition key range object from json object.

Parameters:

jsonObject - the json object that represents the partition key range object.

Method Details

equals

public boolean equals(Object obj)

Overrides:

PartitionKeyRange.equals(Object obj)

Parameters:

obj

getMaxExclusive

public String getMaxExclusive()

getMinInclusive

public String getMinInclusive()

getParents

public Collection getParents()

Used internally to indicate the ID of the parent range

Returns:

a list partition key range ID

hashCode

public int hashCode()

Overrides:

PartitionKeyRange.hashCode()

setMaxExclusive

public void setMaxExclusive(String maxExclusive)

Parameters:

maxExclusive

setMinInclusive

public void setMinInclusive(String minInclusive)

Parameters:

minInclusive

toRange

public Range toRange()

Applies to