org.eclipse.jpt.db
Interface ConnectionProfile

All Superinterfaces:
java.lang.Comparable<ConnectionProfile>

public interface ConnectionProfile
extends java.lang.Comparable<ConnectionProfile>

Database connection profile Provisional API: This interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves. This interface is not intended to be implemented by clients.


Field Summary
static java.lang.String CONNECTION_PROFILE_TYPE
           
static java.lang.String DATABASE_SAVE_PWD_PROP_ID
           
static java.lang.String DRIVER_DEFINITION_PROP_ID
           
static java.lang.String DRIVER_DEFINITION_TYPE_PROP_ID
           
static java.lang.String DRIVER_JAR_LIST_PROP_ID
           
 
Method Summary
 void addConnectionListener(ConnectionListener listener)
          Add the specified connection listener to the connection profile.
 boolean canWorkOffline()
          Return whether the connection profile supports working offline and data has been saved for working offline.
 void connect()
          Connect to the database.
 void disconnect()
          Disconnect from the database.
 Database getDatabase()
          Return the connection profile's database.
 java.lang.String getDatabaseName()
          Return the default database name.
 java.lang.String getDatabaseProduct()
          Return the database product name.
 java.lang.String getDatabaseVendor()
          Return the database vendor.
 java.lang.String getDatabaseVersion()
          Return the database version.
 Catalog getDefaultCatalog()
          Return the connection profile's "default" catalog.
 Schema getDefaultSchema()
          Return the connection profile's default schema.
 java.lang.String getDriverClassName()
          Return the driver class name.
 java.lang.String getDriverDefinitionID()
          Return the driver definition ID.
 java.lang.String getDriverJarList()
          Return the jar list for the driver instance as a comma-delimited string.
 java.lang.String getInstanceID()
          Return the connection profile's static ID.
 java.lang.String getName()
          Return the connection profile's name.
 java.lang.String getProviderID()
          Return ID of the provider managing the DTP profile.
 java.lang.String getUrl()
          Return the default connection URL.
 java.lang.String getUserName()
          Return the default user name.
 java.lang.String getUserPassword()
          Return the default user password.
 boolean isActive()
          Return whether the profile is either connected to a live database session or working off-line (i.e.
 boolean isConnected()
          Return whether the profile is connected to a live database session (i.e.
 boolean isNull()
          Return whether the connection profile is a "null" connection profile.
 boolean isWorkingOffline()
          Return whether the profile is working off-line (i.e.
 void removeConnectionListener(ConnectionListener listener)
          Remove the specified connection listener from the connection profile.
 org.eclipse.core.runtime.IStatus saveWorkOfflineData()
          Save the state of the connection profile for working in an offline mode.
 boolean supportsWorkOfflineMode()
          Return whether the connection factories associated with the connection profile's provider support working offline.
 org.eclipse.core.runtime.IStatus workOffline()
          Begin working off-line.
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

CONNECTION_PROFILE_TYPE

static final java.lang.String CONNECTION_PROFILE_TYPE
See Also:
Constant Field Values

DRIVER_DEFINITION_PROP_ID

static final java.lang.String DRIVER_DEFINITION_PROP_ID
See Also:
Constant Field Values

DRIVER_DEFINITION_TYPE_PROP_ID

static final java.lang.String DRIVER_DEFINITION_TYPE_PROP_ID
See Also:
Constant Field Values

DRIVER_JAR_LIST_PROP_ID

static final java.lang.String DRIVER_JAR_LIST_PROP_ID
See Also:
Constant Field Values

DATABASE_SAVE_PWD_PROP_ID

static final java.lang.String DATABASE_SAVE_PWD_PROP_ID
See Also:
Constant Field Values
Method Detail

getName

java.lang.String getName()
Return the connection profile's name.


getDatabase

Database getDatabase()
Return the connection profile's database. Return a "null" database if the connection profile is inactive.


getDefaultCatalog

Catalog getDefaultCatalog()
Return the connection profile's "default" catalog. Return null if the connection profile's database does not support catalogs.


getDefaultSchema

Schema getDefaultSchema()
Return the connection profile's default schema. In most cases the default schema's name will match the user name. It may be null.


getProviderID

java.lang.String getProviderID()
Return ID of the provider managing the DTP profile.


getInstanceID

java.lang.String getInstanceID()
Return the connection profile's static ID.


getDatabaseName

java.lang.String getDatabaseName()
Return the default database name.


getDatabaseProduct

java.lang.String getDatabaseProduct()
Return the database product name.


getDatabaseVendor

java.lang.String getDatabaseVendor()
Return the database vendor.


getDatabaseVersion

java.lang.String getDatabaseVersion()
Return the database version.


getDriverClassName

java.lang.String getDriverClassName()
Return the driver class name.


getUrl

java.lang.String getUrl()
Return the default connection URL.


getUserName

java.lang.String getUserName()
Return the default user name.


getUserPassword

java.lang.String getUserPassword()
Return the default user password.


getDriverDefinitionID

java.lang.String getDriverDefinitionID()
Return the driver definition ID.


getDriverJarList

java.lang.String getDriverJarList()
Return the jar list for the driver instance as a comma-delimited string.


isActive

boolean isActive()
Return whether the profile is either connected to a live database session or working off-line (i.e. it has access to meta-data).

See Also:
isConnected(), isWorkingOfflin()

isConnected

boolean isConnected()
Return whether the profile is connected to a live database session (i.e. the meta-data comes from the database), as opposed to working off-line.

See Also:
isActive()

connect

void connect()
Connect to the database.


disconnect

void disconnect()
Disconnect from the database.


isWorkingOffline

boolean isWorkingOffline()
Return whether the profile is working off-line (i.e. the meta-data comes from a local cache), as opposed to connected to a live database session.

See Also:
isActive()

supportsWorkOfflineMode

boolean supportsWorkOfflineMode()
Return whether the connection factories associated with the connection profile's provider support working offline.


saveWorkOfflineData

org.eclipse.core.runtime.IStatus saveWorkOfflineData()
Save the state of the connection profile for working in an offline mode. If the connection profile does not support working in an offline mode, no exception is thrown and the method will return immediately.


canWorkOffline

boolean canWorkOffline()
Return whether the connection profile supports working offline and data has been saved for working offline.


workOffline

org.eclipse.core.runtime.IStatus workOffline()
Begin working off-line.


isNull

boolean isNull()
Return whether the connection profile is a "null" connection profile.


addConnectionListener

void addConnectionListener(ConnectionListener listener)
Add the specified connection listener to the connection profile.


removeConnectionListener

void removeConnectionListener(ConnectionListener listener)
Remove the specified connection listener from the connection profile.