Dali Provisional API
Release 3.2

org.eclipse.jpt.jpa.core
Interface JpaDataSource

All Superinterfaces:
IAdaptable, JpaModel, Model

public interface JpaDataSource
extends JpaModel

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

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.jpt.jpa.core.JpaModel
JpaModel.JpaVersionIsCompatibleWith
 
Field Summary
static String CONNECTION_PROFILE_NAME_PROPERTY
          ID string used when connectionProfileName property is changed
static 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. it has access to meta-data).
 void dispose()
          Dispose the data source.
 ConnectionProfile getConnectionProfile()
          The connection profile is null if the connection profile name is invalid.
 String getConnectionProfileName()
          Return the data source's connection profile name.
 Database getDatabase()
          If the connection profile is active, return its database.
 Table selectTableForIdentifier(Iterable<Table> tables, String identifier)
          Select and return the table with the specified identifier.
 void setConnectionProfileName(String connectionProfileName)
          Set the data source's connection profile name.
 
Methods inherited from interface org.eclipse.jpt.jpa.core.JpaModel
getJpaPlatform, getJpaProject, getJpaProjectManager, getParent, getResource, stateChanged
 
Methods inherited from interface org.eclipse.jpt.common.utility.model.Model
addChangeListener, addCollectionChangeListener, addListChangeListener, addPropertyChangeListener, addStateChangeListener, removeChangeListener, removeCollectionChangeListener, removeListChangeListener, removePropertyChangeListener, removeStateChangeListener
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Field Detail

CONNECTION_PROFILE_NAME_PROPERTY

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

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

CONNECTION_PROFILE_PROPERTY

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

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

getConnectionProfileName

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


setConnectionProfileName

void setConnectionProfileName(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.


selectTableForIdentifier

Table selectTableForIdentifier(Iterable<Table> tables,
                               String identifier)
Select and return the table with the specified identifier. We need this unusual method because the JPA spec does not allow columns or join columns to specify a schema and/or catalog (which is only a problem when an entity has two tables from different schemata but with the same name).

See Also:
TypeMapping.resolveDbTable(String)

dispose

void dispose()
Dispose the data source.


Dali Provisional API
Release 3.2

Copyright (c) 2012 Oracle. All rights reserved.