ilog.views.util.data
Class IlvJDBCConnectionParameters

java.lang.Object
  extended by ilog.views.util.data.IlvJDBCConnectionParameters

public class IlvJDBCConnectionParameters
extends Object

A class that holds the parameters of a JDBC connection.

Since:
JViews 6.0

Constructor Summary
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.
 
Method Summary
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.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlvJDBCConnectionParameters

public IlvJDBCConnectionParameters(String url,
                                   String user,
                                   String passwd,
                                   String driver)
Creates a new set of JDBC connection parameters.

Parameters:
url - The database URL.
user - The user name.
passwd - The password.
driver - The name of driver class.

IlvJDBCConnectionParameters

public IlvJDBCConnectionParameters(String url,
                                   String user,
                                   String passwd,
                                   String driver,
                                   String driverURL)
Creates a new set of JDBC connection parameters.

Parameters:
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 found
Method Detail

getURL

public final String getURL()
Returns the database URL.


getUserName

public final String getUserName()
Returns the user name.


getUserPassword

public final String getUserPassword()
Returns the password.


getDriverClassName

public final String getDriverClassName()
Returns the name of the driver class.


getDriverURL

public final String getDriverURL()
Returns the URL string of the driver class.


equals

public boolean equals(Object obj)

Overrides:
equals in class Object

hashCode

public int hashCode()

Overrides:
hashCode in class Object

getConnection

public Connection getConnection()
                         throws Exception
Returns a JDBC connection built with the current parameters.

Throws:
Exception - If an error occurred while building the connection.

serialize

public String serialize(Element element)
Saves the parameters to an DOM element. If the same parameters were already saved in the same element, they are not saved again.

Parameters:
element - The DOM element to save the parameters to.
Returns:
A String that identifies uniquely these parameters among all parameters saved in the same element.

deserialize

public static IlvJDBCConnectionParameters deserialize(Element element,
                                                      String id)
Loads parameters from an DOM element.

Parameters:
element - The DOM element to read the connection from.
id - The identifier of the connection parameters to load.


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.