Interface MongoDatabaseNameProvider

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default java.lang.String provide​(io.micronaut.data.model.PersistentEntity persistentEntity)
      Provides the database name based on the persistent entity and the repository class.
      java.lang.String provide​(io.micronaut.data.model.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.
    • Method Detail

      • provide

        @NonNull
        java.lang.String provide​(@NonNull
                                 io.micronaut.data.model.PersistentEntity persistentEntity,
                                 @Nullable
                                 java.lang.Class<?> repositoryClass)
        Provides the database name based on the persistent entity and the repository class.
        Parameters:
        persistentEntity - The persistent entity
        repositoryClass - The repository class used
        Returns:
        The collection name
      • provide

        @NonNull
        java.lang.String provide​(@NonNull
                                 java.lang.Class<?> type)
        Provides the database name based on the persistent entity type.
        Parameters:
        type - The entity type
        Returns:
        The collection name
      • provide

        @NonNull
        default java.lang.String provide​(@NonNull
                                         io.micronaut.data.model.PersistentEntity persistentEntity)
        Provides the database name based on the persistent entity and the repository class.
        Parameters:
        persistentEntity - The persistent entity
        Returns:
        The collection name