org.eclipse.datatools.connectivity.sqm.core
Class SQMConnectionFactory
java.lang.Object
org.eclipse.datatools.connectivity.sqm.internal.core.connection.ConnectionFactory
org.eclipse.datatools.connectivity.sqm.core.SQMConnectionFactory
- All Implemented Interfaces:
- IConnectionFactory, IOfflineConnectionFactory
public class SQMConnectionFactory
- extends org.eclipse.datatools.connectivity.sqm.internal.core.connection.ConnectionFactory
org.eclipse.datatools.connectivity.IConnectionFactory
for
creating
org.eclipse.datatools.connectivity.sqm.core.connection.ConnectionInfo
connections.
To use this class in a custom DB connection profile, you must make sure your
profile contains a java.sql.Connection
connection factory, as
well as a
org.eclipse.datatools.connectivity.ConnectionProfileConstants.PROP_DRIVER_DEFINITION_ID
property. Additionally, the driver specified must contain the following
properties from
org.eclipse.datatools.connectivity.db.generic.IDBDriverDefinitionConstants
:
DATABASE_VENDOR_PROP_ID, DATABASE_VERSION_PROP_ID, DATABASE_NAME_PROP_ID.
- Author:
- ledunnel
Methods inherited from class org.eclipse.datatools.connectivity.sqm.internal.core.connection.ConnectionFactory |
canWorkOffline, createConnection, createOfflineConnection |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SQMConnectionFactory
public SQMConnectionFactory()
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
- Overrides:
createConnection
in class org.eclipse.datatools.connectivity.sqm.internal.core.connection.ConnectionFactory
- 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
- Overrides:
createConnection
in class org.eclipse.datatools.connectivity.sqm.internal.core.connection.ConnectionFactory
- Parameters:
profile
- the profile to connect to.uid
- the user id to usepwd
- the password to use
- Returns:
- a connection if successful