public class DataSourceConfig extends Object
| Constructor and Description |
|---|
DataSourceConfig(String dsn,
String username,
String password,
String tablePrefix)
Create a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
Connection |
getConnection()
Create a new connection.
|
String |
getDsn()
Get the DSN.
|
String |
getPassword()
Get the password.
|
String |
getTablePrefix()
Get the table prefix.
|
String |
getUsername()
Get the username.
|
DataSourceConfig |
setDsn(String dsn)
Create a new instance with a new DSN.
|
DataSourceConfig |
setPassword(String password)
Create a new instance with a new password.
|
DataSourceConfig |
setTablePrefix(String tablePrefix)
Create a new instance with a new table prefix.
|
DataSourceConfig |
setUsername(String username)
Create a new instance with a new username.
|
public String getDsn()
public String getUsername()
public String getPassword()
public String getTablePrefix()
public DataSourceConfig setDsn(String dsn)
dsn - a new DSN stringpublic DataSourceConfig setUsername(String username)
username - a new usernamepublic DataSourceConfig setPassword(String password)
password - a new passwordpublic DataSourceConfig setTablePrefix(String tablePrefix)
tablePrefix - the new table prefixpublic Connection getConnection() throws SQLException
SQLException - raised if the connection cannot be instantiatedCopyright © 2015. All Rights Reserved.