Uses of Class
org.springframework.data.mongodb.core.CollectionOptions
Packages that use CollectionOptions
-
Uses of CollectionOptions in org.springframework.data.mongodb.core
Methods in org.springframework.data.mongodb.core that return CollectionOptionsModifier 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.encrypted
(CollectionOptions.EncryptedFieldsOptions encryptedFieldsOptions) Set theCollectionOptions.EncryptedFieldsOptions
for collections using queryable encryption.static CollectionOptions
CollectionOptions.encryptedCollection
(Function<CollectionOptions.EncryptedFieldsOptions, CollectionOptions.EncryptedFieldsOptions> optionsFunction) Create newCollectionOptions
building encryption options in a fluent style.static CollectionOptions
CollectionOptions.encryptedCollection
(CollectionOptions.EncryptedFieldsOptions encryptedFieldsOptions) Create newCollectionOptions
with the givenencryptedFields
.static CollectionOptions
CollectionOptions.encryptedCollection
(MongoJsonSchema schema) Create newCollectionOptions
reading encryption options from the givenMongoJsonSchema
.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.static CollectionOptions
CollectionOptions.timeSeries
(String timeField, Function<CollectionOptions.TimeSeriesOptions, CollectionOptions.TimeSeriesOptions> options) 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
.Methods in org.springframework.data.mongodb.core with parameters of type CollectionOptionsModifier 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> 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.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> Mono<com.mongodb.reactivestreams.client.MongoCollection<org.bson.Document>>
ReactiveMongoTemplate.createCollection
(Class<T> entityClass, CollectionOptions collectionOptions) Mono<com.mongodb.reactivestreams.client.MongoCollection<org.bson.Document>>
ReactiveMongoTemplate.createCollection
(String collectionName, CollectionOptions collectionOptions)