DocumentCollection 类

定义

Represents a document collection in the Azure Cosmos DB database service. A collection is a named logical container for documents.

A database may contain zero or more named collections and each collection consists of zero or more JSON documents. Being schema-free, the documents in a collection do not need to share the same structure or fields. Since collections are application resources, they can be authorized using either the master key or resource keys.

public class DocumentCollection extends Resource
继承
java.lang.Object
Serializable
DocumentCollection

继承成员

构造函数

DocumentCollection()

Initialize a document collection object.

DocumentCollection(JSONObject jsonObject)

Initialize a document collection object from json object.

DocumentCollection(String jsonString)

Initialize a document collection object from json string.

方法

equals(Object obj)
getCollectionPartitionStatistics()

Gets the collection's partition key statistics for each physical partition in the collection.

getConflictsLink()

Gets the self-link for conflicts in a collection.

getDefaultTimeToLive()

Gets the collection's default time-to-live value.

getDocumentsLink()

Gets the self-link for documents in a collection.

getIndexingPolicy()

Gets the indexing policy.

getPartitionKey()

Gets the collection's partition key definition.

getStoredProceduresLink()

Gets the self-link for stored procedures in a collection.

getTriggersLink()

Gets the self-link for triggers in a collection.

getUniqueKeyPolicy()

Sets the Uni that guarantees uniqueness of documents in collection in the Azure Cosmos DB service.

getUserDefinedFunctionsLink()

Gets the self-link for user defined functions in a collection.

hashCode()
setDefaultTimeToLive(Integer timeToLive)

Sets the collection's default time-to-live value.

The default time-to-live value on a collection is an optional property. If set, the documents within the collection expires after the specified number of seconds since their last write time. The value of this property should be one of the following:

null - indicates evaluation of time-to-live is disabled and documents within the collection will never expire, regardless whether individual documents have their time-to-live set.

nonzero positive integer - indicates the default time-to-live value for all documents within the collection. This value can be overridden by individual documents' time-to-live value.

-1 - indicates by default all documents within the collection never expire. This value can be overridden by individual documents' time-to-live value.

setIndexingPolicy(IndexingPolicy indexingPolicy)

Sets the indexing policy.

setPartitionKey(PartitionKeyDefinition partitionKey)

Sets the collection's partition key definition.

setUniqueKeyPolicy(UniqueKeyPolicy uniqueKeyPolicy)

适用于