public class CosmosContainerSettings extends Resource
A database may contain zero or more named containers and each container consists of zero or more JSON items. Being schema-free, the items in a container do not need to share the same structure or fields. Since containers are application resources, they can be authorized using either the master key or resource keys.
| Constructor and Description |
|---|
CosmosContainerSettings(String id,
PartitionKeyDefinition partitionKeyDefinition)
Constructor
|
CosmosContainerSettings(String id,
String partitionKeyPath)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
IndexingPolicy |
getIndexingPolicy()
Gets the container's indexing policy.
|
PartitionKeyDefinition |
getPartitionKey()
Gets the containers's partition key definition.
|
UniqueKeyPolicy |
getUniqueKeyPolicy()
Gets the containers unique key policy
|
void |
setIndexingPolicy(IndexingPolicy indexingPolicy)
Sets the container's indexing policy
|
void |
setPartitionKey(PartitionKeyDefinition partitionKeyDefinition)
Sets the containers's partition key definition.
|
void |
setUniqueKeyPolicy(UniqueKeyPolicy uniqueKeyPolicy)
Sets the Containers unique key policy
|
getETag, getId, getResourceId, getSelfLink, getTimestamp, setId, setResourceIdget, getBoolean, getCollection, getCollection, getDouble, getHashMap, getInt, getList, getLogger, getLong, getMapper, getObject, getObject, getObjectByPath, getString, has, remove, set, toJson, toJson, toObject, toStringpublic CosmosContainerSettings(String id, String partitionKeyPath)
id - id of the ContainerpartitionKeyPath - partition key pathpublic CosmosContainerSettings(String id, PartitionKeyDefinition partitionKeyDefinition)
id - id of the containerpartitionKeyDefinition - the (@link PartitionKeyDefinition)public IndexingPolicy getIndexingPolicy()
public void setIndexingPolicy(IndexingPolicy indexingPolicy)
indexingPolicy - public UniqueKeyPolicy getUniqueKeyPolicy()
public void setUniqueKeyPolicy(UniqueKeyPolicy uniqueKeyPolicy)
uniqueKeyPolicy - the unique key policypublic PartitionKeyDefinition getPartitionKey()
public void setPartitionKey(PartitionKeyDefinition partitionKeyDefinition)
partitionKeyDefinition - the partition key definition.Copyright © 2019. All rights reserved.