info.joseluismartin.db
Class DbConnection

java.lang.Object
  extended by info.joseluismartin.db.DbConnection

public class DbConnection
extends Object

Author:
Jose Luis Martin - (jlm@joseluismartin.info)

Field Summary
static String DRIVER
           
static String FILE_NAME
           
static String PASSWORD
           
static String URL
           
static String USERNAME
           
 
Constructor Summary
DbConnection()
           
 
Method Summary
 String buildUrl()
           
 void fromProperties(Properties prop)
           
 Database getDatabase()
           
 String getDbName()
           
 String getDriver()
           
 String getHost()
           
 String getPassword()
           
 String getPort()
           
 String getUrl()
           
 String getUser()
           
 void setDatabase(Database database)
           
 void setDbName(String dbName)
           
 void setDriver(String driver)
           
 void setHost(String host)
           
 void setPassword(String password)
           
 void setPort(String port)
           
 void setUrl(String url)
           
 void setUser(String user)
           
 boolean test()
           
 Properties toProperties()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

DbConnection

public DbConnection()
Method Detail

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.