Package io.micronaut.data.mongodb.init
Class AbstractMongoCollectionsCreator<Dtbs>
java.lang.Object
io.micronaut.data.mongodb.init.AbstractMongoCollectionsCreator<Dtbs>
- Type Parameters:
Dtbs
- The MongoDB database type
- Direct Known Subclasses:
MongoCollectionsCreator
,MongoReactiveCollectionsCreator
MongoDB's collections creator.
- Since:
- 3.3
- Author:
- Denis Stepanov
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected <M> M
getMongoFactory
(Class<M> mongoFactoryClass, io.micronaut.context.BeanLocator beanLocator, io.micronaut.configuration.mongo.core.AbstractMongoConfiguration mongoConfiguration) Get MongoDB database factory.protected void
initialize
(RuntimeEntityRegistry runtimeEntityRegistry, List<io.micronaut.configuration.mongo.core.AbstractMongoConfiguration> mongoConfigurations, io.micronaut.data.mongodb.init.AbstractMongoCollectionsCreator.DatabaseOperationsProvider<Dtbs> databaseOperationsProvider) Initialize the collections.
-
Constructor Details
-
AbstractMongoCollectionsCreator
public AbstractMongoCollectionsCreator()
-
-
Method Details
-
getMongoFactory
protected <M> M getMongoFactory(Class<M> mongoFactoryClass, io.micronaut.context.BeanLocator beanLocator, io.micronaut.configuration.mongo.core.AbstractMongoConfiguration mongoConfiguration) Get MongoDB database factory.- Type Parameters:
M
- The mongo factory type- Parameters:
mongoFactoryClass
- The factory classbeanLocator
- The bean locatormongoConfiguration
- The configurtion- Returns:
- THe factory instance.
-
initialize
protected void initialize(RuntimeEntityRegistry runtimeEntityRegistry, List<io.micronaut.configuration.mongo.core.AbstractMongoConfiguration> mongoConfigurations, io.micronaut.data.mongodb.init.AbstractMongoCollectionsCreator.DatabaseOperationsProvider<Dtbs> databaseOperationsProvider) Initialize the collections.- Parameters:
runtimeEntityRegistry
- The entity registrymongoConfigurations
- The configurationdatabaseOperationsProvider
- The database provider
-