Package ch.ivyteam.db.jdbc
Class DatabaseConnectionConfiguration
- java.lang.Object
-
- ch.ivyteam.db.jdbc.DatabaseConnectionConfiguration
-
- All Implemented Interfaces:
Serializable
,Cloneable
public class DatabaseConnectionConfiguration extends Object implements Serializable, Cloneable
Holds the configuration of a jdbc database connection. This class is only a data container. Therefore do not add active functions here.- Since:
- 27.01.2006
- See Also:
- Serialized Form
- API:
- This is a public API.
-
-
Constructor Summary
Constructors Constructor Description DatabaseConnectionConfiguration()
DatabaseConnectionConfiguration(String connectionUrl, String driverName)
DatabaseConnectionConfiguration(String connectionUrl, String driverName, String userName, String password)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearProperties()
Clears the db propertiesboolean
equals(Object object)
String
getConnectionUrl()
Gets the connection urlString
getDriverName()
Gets the driver nameString
getPassword()
Gets the passwordProperties
getProperties()
Gets the propertiesString
getProperty(String propertyName)
Gets a propertyIterator<String>
getPropertyNames()
Gets an iterator with the db property namesString
getUserName()
Gets the user nameint
hashCode()
void
setConnectionUrl(String connectionUrl)
Set the connection urlvoid
setDriverName(String driverName)
Set the driver namevoid
setPassword(String password)
Set the passwordvoid
setProperty(String propertyName, String propertyValue)
Sets a DB connection property.void
setUserName(String userName)
Set the db user name.String
toString()
-
-
-
Constructor Detail
-
DatabaseConnectionConfiguration
public DatabaseConnectionConfiguration()
- API:
- This public API is available in Java.
-
DatabaseConnectionConfiguration
public DatabaseConnectionConfiguration(String connectionUrl, String driverName)
- API:
- This public API is available in Java.
-
DatabaseConnectionConfiguration
public DatabaseConnectionConfiguration(String connectionUrl, String driverName, String userName, String password)
- Parameters:
connectionUrl
- The connection urldriverName
- The driver nameuserName
- The user namepassword
- The password- API:
- This public API is available in Java.
-
-
Method Detail
-
getDriverName
public String getDriverName()
Gets the driver name- Returns:
- driver name
- API:
- This public API is available in Java.
-
setDriverName
public void setDriverName(String driverName)
Set the driver name- Parameters:
driverName
- The db driver name.- API:
- This public API is available in Java.
-
getConnectionUrl
public String getConnectionUrl()
Gets the connection url- Returns:
- connection url
- API:
- This public API is available in Java.
-
setConnectionUrl
public void setConnectionUrl(String connectionUrl)
Set the connection url- Parameters:
connectionUrl
- The connection url- API:
- This public API is available in Java.
-
getUserName
public String getUserName()
Gets the user name- Returns:
- user name
- API:
- This public API is available in Java.
-
setUserName
public void setUserName(String userName)
Set the db user name.- Parameters:
userName
- The db user name- API:
- This public API is available in Java.
-
getPassword
public String getPassword()
Gets the password- Returns:
- password
- API:
- This public API is available in Java.
-
setPassword
public void setPassword(String password)
Set the password- Parameters:
password
- The password- API:
- This public API is available in Java.
-
equals
public boolean equals(Object object)
- API:
- This public API is available in Java.
-
hashCode
public int hashCode()
- API:
- This public API is available in Java.
-
getProperty
public String getProperty(String propertyName)
Gets a property- Parameters:
propertyName
- Name of the property- Returns:
- property value
- API:
- This public API is available in Java.
-
setProperty
public void setProperty(String propertyName, String propertyValue)
Sets a DB connection property. If name and/or value is null the property is not set into the configuration.- Parameters:
propertyName
- the property namepropertyValue
- the property value- API:
- This public API is available in Java.
-
getPropertyNames
public Iterator<String> getPropertyNames()
Gets an iterator with the db property names- Returns:
- iterator with the db property names
- API:
- This public API is available in Java.
-
clearProperties
public void clearProperties()
Clears the db properties- API:
- This public API is available in Java.
-
getProperties
public Properties getProperties()
Gets the properties- Returns:
- properties
- API:
- This public API is available in Java.
-
toString
public String toString()
- API:
- This public API is available in Java.
-
-