Uses of Class
org.springframework.data.mongodb.core.CollectionOptions
-
Uses of CollectionOptions in org.springframework.data.mongodb.core
Modifier and TypeMethodDescriptionCollectionOptions.capped()
Create newCollectionOptions
with already given settings and capped set to true.CollectionOptions.changeStream
(CollectionOptions.CollectionChangeStreamOptions changeStreamOptions) Create newCollectionOptions
with the givenCollectionOptions.TimeSeriesOptions
.Create newCollectionOptions
with already given settings andcollation
set to given value.CollectionOptions.disableValidation()
Create newCollectionOptions
with already given settings andvalidationLevel
set toValidationLevel.OFF
.static CollectionOptions
CollectionOptions.emitChangedRevisions()
Quick way to set upCollectionOptions
for emitting (pre & post) change events.static CollectionOptions
CollectionOptions.empty()
Create new emptyCollectionOptions
.CollectionOptions.failOnValidationError()
Create newCollectionOptions
with already given settings andvalidationAction
set toValidationAction.ERROR
.static CollectionOptions
Create newCollectionOptions
by just providing theCollation
to use.CollectionOptions.maxDocuments
(long maxDocuments) Create newCollectionOptions
with already given settings andmaxDocuments
set to given value.CollectionOptions.moderateValidation()
Create newCollectionOptions
with already given settings andvalidationLevel
set toValidationLevel.MODERATE
.CollectionOptions.schema
(MongoJsonSchema schema) Create newCollectionOptions
with already given settings andvalidationOptions
set to givenMongoJsonSchema
.CollectionOptions.schemaValidationAction
(com.mongodb.client.model.ValidationAction validationAction) Create newCollectionOptions
with already given settings andvalidationAction
set givenValidationAction
.CollectionOptions.schemaValidationLevel
(com.mongodb.client.model.ValidationLevel validationLevel) Create newCollectionOptions
with already given settings andvalidationLevel
set givenValidationLevel
.CollectionOptions.size
(long size) Create newCollectionOptions
with already given settings andsize
set to given value.CollectionOptions.strictValidation()
Create newCollectionOptions
with already given settings andvalidationLevel
set toValidationLevel.STRICT
.static CollectionOptions
CollectionOptions.timeSeries
(String timeField) Quick way to set upCollectionOptions
for a Time Series collection.CollectionOptions.timeSeries
(CollectionOptions.TimeSeriesOptions timeSeriesOptions) Create newCollectionOptions
with the givenCollectionOptions.TimeSeriesOptions
.CollectionOptions.validation
(CollectionOptions.ValidationOptions validationOptions) Create newCollectionOptions
with the givenCollectionOptions.ValidationOptions
.Create newCollectionOptions
with already given settings andvalidationOptions
set to givenValidator
.CollectionOptions.warnOnValidationError()
Create newCollectionOptions
with already given settings andvalidationAction
set toValidationAction.WARN
.Modifier and TypeMethodDescriptionprotected com.mongodb.client.model.CreateCollectionOptions
ReactiveMongoTemplate.convertToCreateCollectionOptions
(CollectionOptions collectionOptions) protected com.mongodb.client.model.CreateCollectionOptions
ReactiveMongoTemplate.convertToCreateCollectionOptions
(CollectionOptions collectionOptions, Class<?> entityType) protected org.bson.Document
MongoTemplate.convertToDocument
(CollectionOptions collectionOptions, Class<?> targetType) Convert givenCollectionOptions
to a document and take the domain type information into account when creating a mapped schema for validation.<T> com.mongodb.client.MongoCollection<org.bson.Document>
MongoOperations.createCollection
(Class<T> entityClass, CollectionOptions collectionOptions) Create a collection with a name based on the provided entity class using the options.com.mongodb.client.MongoCollection<org.bson.Document>
MongoOperations.createCollection
(String collectionName, CollectionOptions collectionOptions) Create a collection with the provided name and options.<T> com.mongodb.client.MongoCollection<org.bson.Document>
MongoTemplate.createCollection
(Class<T> entityClass, CollectionOptions collectionOptions) com.mongodb.client.MongoCollection<org.bson.Document>
MongoTemplate.createCollection
(String collectionName, CollectionOptions collectionOptions) <T> reactor.core.publisher.Mono<com.mongodb.reactivestreams.client.MongoCollection<org.bson.Document>>
ReactiveMongoOperations.createCollection
(Class<T> entityClass, CollectionOptions collectionOptions) Create a collection with a name based on the provided entity class using the options.reactor.core.publisher.Mono<com.mongodb.reactivestreams.client.MongoCollection<org.bson.Document>>
ReactiveMongoOperations.createCollection
(String collectionName, CollectionOptions collectionOptions) Create a collection with the provided name and options.<T> reactor.core.publisher.Mono<com.mongodb.reactivestreams.client.MongoCollection<org.bson.Document>>
ReactiveMongoTemplate.createCollection
(Class<T> entityClass, CollectionOptions collectionOptions) reactor.core.publisher.Mono<com.mongodb.reactivestreams.client.MongoCollection<org.bson.Document>>
ReactiveMongoTemplate.createCollection
(String collectionName, CollectionOptions collectionOptions)