Package com.signalapp.dao
Class AccessConnection
- java.lang.Object
-
- com.signalapp.dao.AccessConnection
-
public class AccessConnection extends java.lang.ObjectSingleton class that manages the connection to the MS Access database Provides methods to get and close database connections
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidclose()Closes the database connectionstatic java.sql.ConnectiongetConnection()Gets a connection to the database Creates a new connection if one doesn't exist or if the existing one is closed
-
-
-
Method Detail
-
getConnection
public static java.sql.Connection getConnection() throws java.sql.SQLExceptionGets a connection to the database Creates a new connection if one doesn't exist or if the existing one is closed- Returns:
- A Connection object to the database
- Throws:
java.sql.SQLException- if a database error occurs
-
close
public static void close() throws java.sql.SQLExceptionCloses the database connection- Throws:
java.sql.SQLException- if a database error occurs
-
-