MongoUserCredentialsRepository

@Singleton
@Requires(env = ["prod"])
class MongoUserCredentialsRepository(repository: MongoCrudUserCredentialsRepository, documentFactory: UserCredentialsDocumentFactory = UserCredentialsDocumentFactory.default) : UserCredentialsRepository

Production implementation of the UserCredentialsRepository interface using MongoDB.

This class provides methods for managing UserCredentials entities in a MongoDB database. It uses the MongoCrudUserCredentialsRepository for database operations and the UserCredentialsDocumentFactory for converting between domain models and MongoDB documents.

Annotations:

  • @Singleton: Marks this class as a singleton bean in the Micronaut application context.

  • @Requires(env = "prod"): Ensures this implementation is only active in the "prod" environment.

Constructors

Link copied to clipboard
constructor(repository: MongoCrudUserCredentialsRepository, documentFactory: UserCredentialsDocumentFactory = UserCredentialsDocumentFactory.default)

Functions

Link copied to clipboard
open override fun delete(entity: UserCredentials)

Deletes a UserCredentials entity from the MongoDB database.

Link copied to clipboard
open override fun findById(id: UserId): UserCredentials?

Finds a UserCredentials entity by its unique identifier.

Link copied to clipboard
open override fun save(entity: UserCredentials)

Saves a new UserCredentials entity to the MongoDB database.

Link copied to clipboard
open override fun update(entity: UserCredentials)

Updates an existing UserCredentials entity in the MongoDB database.