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

@Context @Internal public class AbstractMongoCollectionsCreator<Dtbs> extends Object
MongoDB's collections creator.
Since:
3.3
Author:
Denis Stepanov
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected <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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 class
      beanLocator - The bean locator
      mongoConfiguration - 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 registry
      mongoConfigurations - The configuration
      databaseOperationsProvider - The database provider