## org.eclipse.datatools.connectivity
Class VersionProviderConnection

    java.lang.Object
      org.eclipse.datatools.connectivity.VersionProviderConnection

All Implemented Interfaces:
  IConnection, IServerVersionProvider

Direct Known Subclasses:
  DriverConnectionBase

public abstract class VersionProviderConnection
extends java.lang.Object
implements IConnection, IServerVersionProvider

Use this class a a base class for your versioned connection implementation. You _must_ invoke updateVersionCache() after successfully connecting to the target server. If a connection fails, you _should_ invoke clearConnectionCache() to remove version information from the profile (this will prevent possible bogus data from being displayed in the property page). Version information is stored in the base properties of the profile (i.e. IConnectionProfile.getBaseProperties()). The server version information can be accessed using the keys ConnectionProfileConstants.PROP_SERVER_VERSION and PROP_SERVER_NAME. The technology version can be accessed using property keys created using the createTechnologyNameKey() and createTechnologyVersionKey() methods. (These methods return strings of the form org.eclipse.datatools.connectivity.technology. <tech_name>.name and org.eclipse.datatools.connectivity.technology. <tech_name>.version. Server version information is collected from the connection created by the connection factory that is registered as the ping connection factory for the profile. Because of this, it is important that you use the most relevant connection factory as the ping factory (e.g. the EAServer profile uses the J2EE repository connection factory as its ping factory).

Author:
  rcernich Created on Jun 1, 2005

Constructor Summary
`VersionProviderConnection(IConnectionProfile profile, java.lang.Class factoryClass)`

Method Summary
`java.lang.Class` `getConnectionFactoryClass()`
`IConnectionProfile` `getConnectionProfile()`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.eclipse.datatools.connectivity.IConnection
`close, getConnectException, getRawConnection`

Methods inherited from interface org.eclipse.datatools.connectivity.IServerVersionProvider
`getProviderName, getProviderVersion, getTechnologyName, getTechnologyVersion`

Constructor Detail

### VersionProviderConnection

    public VersionProviderConnection(IConnectionProfile profile,
                                     java.lang.Class factoryClass)

Method Detail

### getConnectionProfile

    public IConnectionProfile getConnectionProfile()

  Specified by:
    `getConnectionProfile` in interface `IConnection`
  Returns:
    the connection profile used to create this connection.

### getConnectionFactoryClass

    public java.lang.Class getConnectionFactoryClass()

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