Class DefaultMongoDatabaseNameProvider

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String provide​(PersistentEntity persistentEntity, java.lang.Class<?> repositoryClass)
      Provides the database name based on the persistent entity and the repository class.
      java.lang.String provide​(java.lang.Class<?> type)
      Provides the database name based on the persistent entity type.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultMongoDatabaseNameProvider

        public DefaultMongoDatabaseNameProvider​(io.micronaut.context.BeanContext beanContext,
                                                @Nullable
                                                java.lang.String server,
                                                RuntimeEntityRegistry runtimeEntityRegistry,
                                                @Nullable
                                                java.lang.String defaultDatabaseName,
                                                @Nullable
                                                SchemaTenantResolver tenantResolver)
    • Method Detail

      • provide

        public java.lang.String provide​(java.lang.Class<?> type)
        Description copied from interface: MongoDatabaseNameProvider
        Provides the database name based on the persistent entity type.
        Specified by:
        provide in interface MongoDatabaseNameProvider
        Parameters:
        type - The entity type
        Returns:
        The collection name
      • provide

        public java.lang.String provide​(PersistentEntity persistentEntity,
                                        java.lang.Class<?> repositoryClass)
        Description copied from interface: MongoDatabaseNameProvider
        Provides the database name based on the persistent entity and the repository class.
        Specified by:
        provide in interface MongoDatabaseNameProvider
        Parameters:
        persistentEntity - The persistent entity
        repositoryClass - The repository class used
        Returns:
        The collection name