UniqueKeyPolicy Class

public class UniqueKeyPolicy
extends JsonSerializable

Represents the unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service.

Constructor Summary

Constructor Description
UniqueKeyPolicy()
UniqueKeyPolicy(String jsonString)

Constructor.

UniqueKeyPolicy(JSONObject jsonObject)

Constructor.

Method Summary

Modifier and Type Method and Description
java.util.Collection<UniqueKey> getUniqueKeys()

Gets or sets collection of UniqueKey that guarantee uniqueness of documents in collection in the Azure Cosmos DB service.

void setUniqueKeys(Collection<UniqueKey> uniqueKeys)

Methods inherited from JsonSerializable

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

Constructor Details

UniqueKeyPolicy

public UniqueKeyPolicy()

UniqueKeyPolicy

public UniqueKeyPolicy(String jsonString)

Constructor.

Parameters:

jsonString - the json string that represents the Unique Key policy.

UniqueKeyPolicy

public UniqueKeyPolicy(JSONObject jsonObject)

Constructor.

Parameters:

jsonObject - the json object that represents the Unique Ke policy.

Method Details

getUniqueKeys

public Collection getUniqueKeys()

Gets or sets collection of UniqueKey that guarantee uniqueness of documents in collection in the Azure Cosmos DB service.

Returns:

the unique keys.

setUniqueKeys

public void setUniqueKeys(Collection uniqueKeys)

Parameters:

uniqueKeys

Applies to