public class DatabaseHelper extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
closeConnection(Connection connection)
Close the given connection .
|
static void |
testDatabaseConnection()
Tries to connect to the global database.
|
static void |
testDatabaseConnection(String driverClassName,
String url,
String login,
String password)
Tries to connect to the named database.
|
public static void closeConnection(Connection connection)
connection - SQL Connectionpublic static void testDatabaseConnection()
throws DatabaseConnectionException
DatabaseConnectionException - in case the connection cannot be establishedpublic static void testDatabaseConnection(String driverClassName, String url, String login, String password) throws DatabaseConnectionException
driverClassName - name of the driver classurl - the URL to the databaselogin - the login name to use for the connectionpassword - the password the password to use for the connectionDatabaseConnectionException - in case the connection cannot be establishedCopyright © 2019 Communote team. All rights reserved.