Class DefaultMongoDatabaseNameProvider
- java.lang.Object
-
- io.micronaut.data.mongodb.operations.DefaultMongoDatabaseNameProvider
-
- All Implemented Interfaces:
MongoDatabaseNameProvider
@Internal public final class DefaultMongoDatabaseNameProvider extends java.lang.Object implements MongoDatabaseNameProvider
Internal implementation ofMongoDatabaseNameProvider
.- Since:
- 3.9.0
- Author:
- Denis Stepanov
-
-
Constructor Summary
Constructors Constructor Description DefaultMongoDatabaseNameProvider(io.micronaut.context.BeanContext beanContext, java.lang.String server, RuntimeEntityRegistry runtimeEntityRegistry, java.lang.String defaultDatabaseName, SchemaTenantResolver tenantResolver)
-
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
-
Methods inherited from interface io.micronaut.data.mongodb.operations.MongoDatabaseNameProvider
provide
-
-
-
-
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 interfaceMongoDatabaseNameProvider
- 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 interfaceMongoDatabaseNameProvider
- Parameters:
persistentEntity
- The persistent entityrepositoryClass
- The repository class used- Returns:
- The collection name
-
-