public class DatabaseConnectionInformation extends Object
Constructor and Description |
---|
DatabaseConnectionInformation(String driver,
String url,
String username,
String password)
Constructor.
|
DatabaseConnectionInformation(String driver,
String url,
String username,
String password,
String validationQuery)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
getDriver()
Get database driver classname.
|
String |
getPassword()
Get the connection password.
|
String |
getUrl()
Get the connection URL.
|
String |
getUsername()
Get the connection username.
|
String |
getValidationQuery()
Get the validation query for this connection.
|
DatabaseConnectionInformation |
setDriver(String driver)
Set database driver classname.
|
DatabaseConnectionInformation |
setPassword(String password)
Set the connection password.
|
DatabaseConnectionInformation |
setUrl(String url)
Set the connection URL.
|
DatabaseConnectionInformation |
setUsername(String username)
set the connection username.
|
DatabaseConnectionInformation |
setValidationQuery(String validationQuery)
Set the validation query for this connection.
|
public DatabaseConnectionInformation(String driver, String url, String username, String password)
driver
- the java driver name (ie "com.mysql.jdbc.Driver")url
- the jdbc connection url (ie "jdbc:mysql://hostname:port/dbname")username
- the connection username (or null)password
- the connection password (or null)public DatabaseConnectionInformation(String driver, String url, String username, String password, String validationQuery)
driver
- the java driver name (ie "com.mysql.jdbc.Driver")url
- the jdbc connection url (ie "jdbc:mysql://hostname:port/dbname")username
- the connection username (or null)password
- the connection password (or null)validationQuery
- a query to run that validation a connection is established. (ie select 1)public String getDriver()
public DatabaseConnectionInformation setDriver(String driver)
driver
- the java driver name (ie "com.mysql.jdbc.Driver")public String getUrl()
public DatabaseConnectionInformation setUrl(String url)
url
- the jdbc connection urlpublic String getUsername()
public DatabaseConnectionInformation setUsername(String username)
username
- the connection usernamepublic String getPassword()
public DatabaseConnectionInformation setPassword(String password)
password
- the connection password.public String getValidationQuery()
public DatabaseConnectionInformation setValidationQuery(String validationQuery)
validationQuery
- the validation query for this connection.Copyright © 2018 Department of Veterans Affairs. All Rights Reserved.