Class ConnectionFactory
java.lang.Object
br.com.pethub.jdbc.ConnectionFactory
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThis method is used to establish a connection to the database.
-
Constructor Details
-
ConnectionFactory
public ConnectionFactory()The constructor method of the ConnectionFactory class. It reads the database configuration from a properties file.
-
-
Method Details
-
getConnection
This method is used to establish a connection to the database.- Returns:
- A Connection object for interacting with the database.
-