org.eclipse.datatools.connectivity.db.generic
Class JDBCConnectionFactory

java.lang.Object
  extended byorg.eclipse.datatools.connectivity.db.generic.JDBCConnectionFactory
All Implemented Interfaces:
IConnectionFactory

public class JDBCConnectionFactory
extends java.lang.Object
implements IConnectionFactory

org.eclipse.datatools.connectivity.IConnectionFactory for creating java.sql.Connection connections. To use this class in a custom DB connection profile, you must make sure your profile contains the following properties from org.eclipse.datatools.connectivity.db.generic.IDBConnectionProfileConstants: DRIVER_CLASS_PROP_ID, URL_PROP_ID, as well as org.eclipse.datatools.connectivity.ConnectionProfileConstants.PROP_DRIVER_DEFINITION_ID. The following properties from org.eclipse.datatools.connectivity.db.generic.IDBConnectionProfileConstants are optional: USERNAME_PROP_ID, PASSWORD_PROP_ID, CONNECTION_PROPERTIES_PROP_ID

Author:
rcernich Created on Oct 17, 2005

Constructor Summary
JDBCConnectionFactory()
           
 
Method Summary
 IConnection createConnection(IConnectionProfile profile)
          This method creates a connection to a server based on the properties specified by the connection profile.
 IConnection createConnection(IConnectionProfile profile, java.lang.String uid, java.lang.String pwd)
          This method creates a connection to a server based on the properties specified by the connection profile.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JDBCConnectionFactory

public JDBCConnectionFactory()
Method Detail

createConnection

public IConnection createConnection(IConnectionProfile profile)
Description copied from interface: IConnectionFactory
This method creates a connection to a server based on the properties specified by the connection profile. This method uses the user id and password specified in the profile.

Specified by:
createConnection in interface IConnectionFactory
Parameters:
profile - the profile to connect to.
Returns:
a connection if successful

createConnection

public IConnection createConnection(IConnectionProfile profile,
                                    java.lang.String uid,
                                    java.lang.String pwd)
Description copied from interface: IConnectionFactory
This method creates a connection to a server based on the properties specified by the connection profile. This method uses the user id and password specified in the method call.

Specified by:
createConnection in interface IConnectionFactory
Parameters:
profile - the profile to connect to.
uid - the user id to use
pwd - the password to use
Returns:
a connection if successful


Copyright © 2006 Actuate, IBM Corporation, Sybase, Inc. and others. All rights reserved.