Class DB2024TEAM07_Database

java.lang.Object
com.jdbc.database.DB2024TEAM07_Database

public class DB2024TEAM07_Database extends Object
This class provides a single point of access to the database connection for the E-MATEASY application. It utilizes the Singleton design pattern to ensure only one instance of the database connection is created and shared throughout the application.
  • Field Details

  • Constructor Details

    • DB2024TEAM07_Database

      private DB2024TEAM07_Database()
      Private constructor to prevent object creation from outside the class. This enforces the Singleton design pattern.
  • Method Details

    • getInstance

      public static DB2024TEAM07_Database getInstance()
      Returns the single instance of the DB2024TEAM07_Database object.
      Returns:
      the instance of DB2024TEAM07_Database
    • getConnection

      public Connection getConnection()
      Provides access to the established database connection.
      Returns:
      the Connection object representing the connection to the database