Class MongoConfig

java.lang.Object
com.leumanuel.woozydata.config.MongoConfig

public class MongoConfig extends Object
Configuration class for MongoDB connection management. Handles the creation and management of MongoDB client connections.
Version:
1.0
Author:
Leu A. Manuel
  • Constructor Details

    • MongoConfig

      public MongoConfig(String connectionString, String dbName)
      Creates a new MongoDB configuration.
      Parameters:
      connectionString - MongoDB connection string
      dbName - Database name to connect to
  • Method Details

    • getDatabase

      public com.mongodb.client.MongoDatabase getDatabase()
      Gets the configured MongoDB database instance.
      Returns:
      MongoDatabase instance
    • close

      public void close()
      Closes the MongoDB client connection. Should be called when the connection is no longer needed.