org.eclipse.jpt.core
Interface JpaDataSource

All Superinterfaces:
org.eclipse.core.runtime.IAdaptable, IResourcePart, JpaNode, Model

public interface JpaDataSource
extends JpaNode

Interface to the 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.

Since:
2.0
Version:
2.3

Field Summary
static java.lang.String CONNECTION_PROFILE_NAME_PROPERTY
          ID string used when connectionProfileName property is changed
static java.lang.String CONNECTION_PROFILE_PROPERTY
          ID string used when connectionProfile property is changed
 
Method Summary
 boolean connectionProfileIsActive()
          Return whether the profile is either connected to a live database session or working off-line (i.e.
 void dispose()
          Dispose the data source.
 ConnectionProfile getConnectionProfile()
          The connection profile is null if the connection profile name is invalid.
 java.lang.String getConnectionProfileName()
          Return the data source's connection profile name.
 Database getDatabase()
          If the connection profile is active, return its database.
<T extends DatabaseObject>
T
selectDatabaseObjectForIdentifier(java.lang.Iterable<T> databaseObjects, java.lang.String identifier)
          Select and return the database object with the specified identifier.
 void setConnectionProfileName(java.lang.String connectionProfileName)
          Set the data source's connection profile name.
 
Methods inherited from interface org.eclipse.jpt.core.JpaNode
getJpaProject, getParent
 
Methods inherited from interface org.eclipse.jpt.utility.model.Model
addChangeListener, addCollectionChangeListener, addListChangeListener, addPropertyChangeListener, addStateChangeListener, addTreeChangeListener, removeChangeListener, removeCollectionChangeListener, removeListChangeListener, removePropertyChangeListener, removeStateChangeListener, removeTreeChangeListener
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 
Methods inherited from interface org.eclipse.jpt.core.IResourcePart
getResource
 

Field Detail

CONNECTION_PROFILE_NAME_PROPERTY

static final java.lang.String CONNECTION_PROFILE_NAME_PROPERTY
ID string used when connectionProfileName property is changed

See Also:
Model.addPropertyChangeListener(String, org.eclipse.jpt.utility.model.listener.PropertyChangeListener), Constant Field Values

CONNECTION_PROFILE_PROPERTY

static final java.lang.String CONNECTION_PROFILE_PROPERTY
ID string used when connectionProfile property is changed

See Also:
Model.addPropertyChangeListener(String, org.eclipse.jpt.utility.model.listener.PropertyChangeListener), Constant Field Values
Method Detail

getConnectionProfileName

java.lang.String getConnectionProfileName()
Return the data source's connection profile name. The connection profile is looked up based on this setting.


setConnectionProfileName

void setConnectionProfileName(java.lang.String connectionProfileName)
Set the data source's connection profile name. The connection profile is looked up based on this setting.


getConnectionProfile

ConnectionProfile getConnectionProfile()
The connection profile is null if the connection profile name is invalid.


connectionProfileIsActive

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


getDatabase

Database getDatabase()
If the connection profile is active, return its database.


selectDatabaseObjectForIdentifier

<T extends DatabaseObject> T selectDatabaseObjectForIdentifier(java.lang.Iterable<T> databaseObjects,
                                                               java.lang.String identifier)
Select and return the database object with the specified identifier.


dispose

void dispose()
Dispose the data source.