org.eclipse.jpt.db
Interface ConnectionProfile

All Superinterfaces:
java.lang.Comparable<ConnectionProfile>, DatabaseObject

public interface ConnectionProfile
extends DatabaseObject, 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.
 java.lang.String getDriverClassName()
          Return the driver class name.
 java.lang.String getDriverDefinitionID()
          Return the ID of the associated Driver definition.
 java.lang.String getDriverJarList()
          Return the jar list for the associated Driver as a comma-delimited string.
 java.lang.String getDriverName()
          Return the name of the associated Driver definition.
 java.lang.String getInstanceID()
          Return the connection profile's static ID.
 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 isDisconnected()
          Return whether the profile is not connected to a live database session (i.e.
 boolean isInactive()
          Return whether the profile is neither connected to a live database session nor working off-line (i.e.
 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 org.eclipse.jpt.db.DatabaseObject
getConnectionProfile, getIdentifier, getIdentifier, getName
 
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

getDatabase

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

Specified by:
getDatabase in interface DatabaseObject

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 ID of the associated Driver definition.


getDriverJarList

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


getDriverName

java.lang.String getDriverName()
Return the name of the associated Driver definition.


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(), isWorkingOffline()

isInactive

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

See Also:
isActive()

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()

isDisconnected

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

See Also:
isConnected()

connect

void connect()
Connect to the database.

See Also:
disconnect()

disconnect

void disconnect()
Disconnect from the database.

See Also:
connect()

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.


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.