Class ConnectionFactory

java.lang.Object
br.com.pethub.jdbc.ConnectionFactory

public class ConnectionFactory extends Object
This class is responsible for creating and managing the database connection. It reads the database configuration from a properties file and uses it to establish a connection.
  • Constructor Details

    • ConnectionFactory

      public ConnectionFactory()
      The constructor method of the ConnectionFactory class. It reads the database configuration from a properties file.
  • Method Details

    • getConnection

      public Connection getConnection()
      This method is used to establish a connection to the database.
      Returns:
      A Connection object for interacting with the database.