DocumentCollection collectionDefinition = new DocumentCollection(); collectionDefinition.setId(collectionId);
public DocumentCollection createCollection(String dbName, String collectionName, RequestOptions collectionOptions) { DocumentCollection collection = new DocumentCollection(); collection.setId(collectionName); if (LOGGER.isDebugEnabled()) { LOGGER.debug("execute createCollection in database {} collection {}", dbName, collectionName); } try { final Resource resource = documentDbFactory.getDocumentClient() .createCollection(getDatabaseLink(dbName), collection, collectionOptions) .getResource(); if (resource instanceof DocumentCollection) { collection = (DocumentCollection) resource; } return collection; } catch (DocumentClientException e) { throw new RuntimeException("createCollection exception", e); } }
String partitionKeyFieldName, IndexingPolicy policy) { DocumentCollection collection = new DocumentCollection(); collection.setId(collectionName);
private DocumentCollection createCollection(@NonNull String dbName, String partitionKeyFieldName, @NonNull DocumentDbEntityInformation information) { DocumentCollection collection = new DocumentCollection(); final String collectionName = information.getCollectionName(); final IndexingPolicy policy = information.getIndexingPolicy();