info.joseluismartin.db
Class DbConnection
java.lang.Object
info.joseluismartin.db.DbConnection
public class DbConnection
- extends Object
- Author:
- Jose Luis Martin - (jlm@joseluismartin.info)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DRIVER
public static final String DRIVER
- See Also:
- Constant Field Values
URL
public static final String URL
- See Also:
- Constant Field Values
USERNAME
public static final String USERNAME
- See Also:
- Constant Field Values
PASSWORD
public static final String PASSWORD
- See Also:
- Constant Field Values
FILE_NAME
public static final String FILE_NAME
- See Also:
- Constant Field Values
DbConnection
public DbConnection()
test
public boolean test()
getDatabase
public Database getDatabase()
- Returns:
- the database
setDatabase
public void setDatabase(Database database)
- Parameters:
database
- the database to set
getHost
public String getHost()
- Returns:
- the host
setHost
public void setHost(String host)
- Parameters:
host
- the host to set
getPort
public String getPort()
- Returns:
- the port
setPort
public void setPort(String port)
- Parameters:
port
- the port to set
getDbName
public String getDbName()
- Returns:
- the name
setDbName
public void setDbName(String dbName)
- Parameters:
dbName
- the database name to set
getUser
public String getUser()
- Returns:
- the user
setUser
public void setUser(String user)
- Parameters:
user
- the user to set
getPassword
public String getPassword()
- Returns:
- the password
setPassword
public void setPassword(String password)
- Parameters:
password
- the password to set
buildUrl
public String buildUrl()
- Returns:
- JDBC url connection string
getUrl
public String getUrl()
- Returns:
- the url
setUrl
public void setUrl(String url)
- Parameters:
url
- the url to set
setDriver
public void setDriver(String driver)
- Parameters:
driver
-
getDriver
public String getDriver()
fromProperties
public void fromProperties(Properties prop)
toProperties
public Properties toProperties()
- Returns:
- connection properties
Copyright © 2013 JDAL. All Rights Reserved.