Class DBConnectionTester
java.lang.Object
org.eclipse.lemminx.customservice.synapse.db.DBConnectionTester
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongenerateConnectionUrl(String dbType, String host, String port, String dbName) static ConnectiongetConnection(String connectionUrl, String username, String password, String className) booleantestDBConnection(String dbType, String username, String password, String host, String port, String dbName, String url, String className) Test the database connection with the given parameters.
-
Constructor Details
-
DBConnectionTester
public DBConnectionTester()
-
-
Method Details
-
testDBConnection
public boolean testDBConnection(String dbType, String username, String password, String host, String port, String dbName, String url, String className) Test the database connection with the given parameters.- Parameters:
dbType- Database typeusername- Usernamepassword- Passwordhost- Hostport- PortdbName- Database name- Returns:
- True if the connection is successful, false otherwise
-
getConnection
public static Connection getConnection(String connectionUrl, String username, String password, String className) -
generateConnectionUrl
-