Dali Provisional API
Release 3.2

org.eclipse.jpt.jpa.db
Interface ConnectionProfile

All Superinterfaces:
DatabaseObject

public interface ConnectionProfile
extends DatabaseObject

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.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.jpt.jpa.db.DatabaseObject
DatabaseObject.DefaultComparator, DatabaseObject.IdentifierTransformer, DatabaseObject.NameTransformer
 
Field Summary
static String CONNECTION_PROFILE_TYPE
           
static String DATABASE_SAVE_PWD_PROP_ID
           
static String DRIVER_DEFINITION_PROP_ID
           
static String DRIVER_DEFINITION_TYPE_PROP_ID
           
static String DRIVER_JAR_LIST_PROP_ID
           
 
Fields inherited from interface org.eclipse.jpt.jpa.db.DatabaseObject
DEFAULT_COMPARATOR, IDENTIFIER_TRANSFORMER, NAME_TRANSFORMER
 
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.
 String getDatabaseName()
          Return the default database name.
 String getDatabaseProduct()
          Return the database product name.
 String getDatabaseVendor()
          Return the database vendor.
 String getDatabaseVersion()
          Return the database version.
 String getDriverClassName()
          Return the driver class name.
 String getDriverDefinitionID()
          Return the ID of the associated Driver definition.
 String getDriverJarList()
          Return the jar list for the associated Driver as a comma-delimited string.
 String getDriverName()
          Return the name of the associated Driver definition.
 String getInstanceID()
          Return the connection profile's static ID.
 Connection getJDBCConnection()
          Return the JDBC connection.
 String getProviderID()
          Return ID of the provider managing the DTP profile.
 String getURL()
          Return the default connection URL.
 String getUserName()
          Return the default user name.
 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. it has access to meta-data).
 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.
 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.
 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).
 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.
 void removeConnectionListener(ConnectionListener listener)
          Remove the specified connection listener from the connection profile.
 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.
 boolean treatIdentifiersAsDelimited()
          Return whether all identifiers are to be treated as though they were delimited.
 IStatus workOffline()
          Begin working off-line.
 
Methods inherited from interface org.eclipse.jpt.jpa.db.DatabaseObject
getConnectionProfile, getIdentifier, getIdentifier, getName, refresh
 

Field Detail

CONNECTION_PROFILE_TYPE

static final String CONNECTION_PROFILE_TYPE
See Also:
Constant Field Values

DRIVER_DEFINITION_PROP_ID

static final String DRIVER_DEFINITION_PROP_ID
See Also:
Constant Field Values

DRIVER_DEFINITION_TYPE_PROP_ID

static final String DRIVER_DEFINITION_TYPE_PROP_ID
See Also:
Constant Field Values

DRIVER_JAR_LIST_PROP_ID

static final String DRIVER_JAR_LIST_PROP_ID
See Also:
Constant Field Values

DATABASE_SAVE_PWD_PROP_ID

static final 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

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


getInstanceID

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


getDatabaseName

String getDatabaseName()
Return the default database name.


getDatabaseProduct

String getDatabaseProduct()
Return the database product name.


getDatabaseVendor

String getDatabaseVendor()
Return the database vendor.


getDatabaseVersion

String getDatabaseVersion()
Return the database version.


getDriverClassName

String getDriverClassName()
Return the driver class name.


getURL

String getURL()
Return the default connection URL.


getUserName

String getUserName()
Return the default user name.


getUserPassword

String getUserPassword()
Return the default user password.


getDriverDefinitionID

String getDriverDefinitionID()
Return the ID of the associated Driver definition.


getDriverJarList

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


getDriverName

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


treatIdentifiersAsDelimited

boolean treatIdentifiersAsDelimited()
Return whether all identifiers are to be treated as though they were delimited. This is determined by the client-supplied database identifier adapter.


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

getJDBCConnection

Connection getJDBCConnection()
Return the JDBC connection.


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

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

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.


Dali Provisional API
Release 3.2

Copyright (c) 2012 Oracle. All rights reserved.