UniqueKeyPolicy Class

  • java.lang.Object

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.

Method Summary

Modifier and Type Method and Description
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)

Inherited Members

Constructor Details

UniqueKeyPolicy

public UniqueKeyPolicy()

UniqueKeyPolicy

public UniqueKeyPolicy(String jsonString)

Constructor.

Parameters:

jsonString - the json string that represents the Unique Key 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