public class IlvJDBCConnectionParameters extends Object
Constructor and Description |
---|
IlvJDBCConnectionParameters(String url,
String user,
String passwd,
String driver)
Creates a new set of JDBC connection parameters.
|
IlvJDBCConnectionParameters(String url,
String user,
String passwd,
String driver,
String driverURL)
Creates a new set of JDBC connection parameters.
|
Modifier and Type | Method and Description |
---|---|
static IlvJDBCConnectionParameters |
deserialize(Element element,
String id)
Loads parameters from an DOM element.
|
boolean |
equals(Object obj) |
Connection |
getConnection()
Returns a JDBC connection built with the current parameters.
|
String |
getDriverClassName()
Returns the name of the driver class.
|
String |
getDriverURL()
Returns the URL string of the driver class.
|
String |
getURL()
Returns the database URL.
|
String |
getUserName()
Returns the user name.
|
String |
getUserPassword()
Returns the password.
|
int |
hashCode() |
String |
serialize(Element element)
Saves the parameters to an DOM element.
|
public IlvJDBCConnectionParameters(String url, String user, String passwd, String driver)
url
- The database URL.user
- The user name.passwd
- The password.driver
- The name of driver class.public IlvJDBCConnectionParameters(String url, String user, String passwd, String driver, String driverURL)
url
- The database URL.user
- The user name.passwd
- The password.driver
- The name of driver class.driverURL
- The URL at which the driver archive can be foundpublic final String getURL()
public final String getUserName()
public final String getUserPassword()
public final String getDriverClassName()
public final String getDriverURL()
public Connection getConnection() throws Exception
Exception
- If an error occurred while building the connection.public String serialize(Element element)
element
- The DOM element to save the parameters to.public static IlvJDBCConnectionParameters deserialize(Element element, String id)
element
- The DOM element to read the connection from.id
- The identifier of the connection parameters to load.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.