public class DatabaseConnection
Database Connection
Constructor and description |
---|
DatabaseConnection
(String connectionUrl) Database Connection with user and password included in URL |
DatabaseConnection
(String connectionUrl, String driverClassName) |
DatabaseConnection
(String connectionUrl, String user, String password) Database Connection |
DatabaseConnection
(String connectionUrl, String user, String password, String driverClassName) |
Type Params | Return Type | Name and description |
---|---|---|
|
public void |
close() Close connection, avoid closing if null and hide any SQLExceptions that occur. |
|
public Connection |
getConnection() Obtain a connection using the given connection URL with fulfill properties (user and password should be included) |
|
public Properties |
getConnectionProperties() |
|
public String |
getConnectionUrl() |
|
public TestDataInfo |
getDBDataInfo() |
|
public String |
getDriverClassName() |
|
public String |
getPassword() |
|
public String |
getUserName() |
|
public boolean |
isAlive() |
|
public static TestDataInfo |
newDBDataInfo(Connection connection) |
|
public void |
setConnectionProperties(Properties connectionProperties) |
Database Connection with user and password included in URL
connectionUrl
- JDBC connection URLDatabase Connection
connectionUrl
- JDBC connection URLuser
- the name of the userpassword
- the plain text passwordClose connection, avoid closing if null and hide any SQLExceptions that occur.
Obtain a connection using the given connection URL with fulfill properties (user and password should be included)