it.eng.spagobi.tools.datasource.dao
Interface IDataSourceDAO

All Known Implementing Classes:
DataSourceDAOHibImpl

public interface IDataSourceDAO

Defines the interfaces for all methods needed to insert, modify and deleting an engine.


Method Summary
 void eraseDataSource(it.eng.spagobi.tools.datasource.bo.IDataSource aDataSource)
          Implements the query to erase a data source.
 boolean hasBIEngineAssociated(java.lang.String dsId)
          Tells if a data source is associated to any BI Engines.
 boolean hasBIObjAssociated(java.lang.String dsId)
          Tells if a data source is associated to any BI Object.
 void insertDataSource(it.eng.spagobi.tools.datasource.bo.IDataSource aDataSource)
          Implements the query to insert a data source.
 java.util.List loadAllDataSources()
          Loads all detail information for all data sources.
 it.eng.spagobi.tools.datasource.bo.DataSource loadDataSourceByID(java.lang.Integer dsID)
          Loads all detail information for a data source identified by its dsID.
 it.eng.spagobi.tools.datasource.bo.IDataSource loadDataSourceByLabel(java.lang.String label)
          Loads all detail information for data source whose label is equal to label.
 void modifyDataSource(it.eng.spagobi.tools.datasource.bo.IDataSource aDataSource)
          Implements the query to modify a data source.
 

Method Detail

loadDataSourceByID

it.eng.spagobi.tools.datasource.bo.DataSource loadDataSourceByID(java.lang.Integer dsID)
                                                                 throws it.eng.spago.error.EMFUserError
Loads all detail information for a data source identified by its dsID. All these information, achived by a query to the DB, are stored into a datasource object, which is returned.

Parameters:
dsID - The id for the datasource to load
Returns:
A datasource object containing all loaded information
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

loadDataSourceByLabel

it.eng.spagobi.tools.datasource.bo.IDataSource loadDataSourceByLabel(java.lang.String label)
                                                                     throws it.eng.spago.error.EMFUserError
Loads all detail information for data source whose label is equal to label.

Parameters:
label - The label for the data source to load
Returns:
An datasource object containing all loaded information
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

loadAllDataSources

java.util.List loadAllDataSources()
                                  throws it.eng.spago.error.EMFUserError
Loads all detail information for all data sources. For each of them, detail information is stored into a datasource object. After that, all data sources are stored into a List, which is returned.

Returns:
A list containing all datasource objects
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

modifyDataSource

void modifyDataSource(it.eng.spagobi.tools.datasource.bo.IDataSource aDataSource)
                      throws it.eng.spago.error.EMFUserError
Implements the query to modify a data source. All information needed is stored into the input datasource object.

Parameters:
aDataSource - The object containing all modify information
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

insertDataSource

void insertDataSource(it.eng.spagobi.tools.datasource.bo.IDataSource aDataSource)
                      throws it.eng.spago.error.EMFUserError
Implements the query to insert a data source. All information needed is stored into the input datasource object.

Parameters:
aDataSource - The object containing all insert information
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

eraseDataSource

void eraseDataSource(it.eng.spagobi.tools.datasource.bo.IDataSource aDataSource)
                     throws it.eng.spago.error.EMFUserError
Implements the query to erase a data source. All information needed is stored into the input datasource object.

Parameters:
aDataSource - The object containing all delete information
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

hasBIEngineAssociated

boolean hasBIEngineAssociated(java.lang.String dsId)
                              throws it.eng.spago.error.EMFUserError
Tells if a data source is associated to any BI Engines. It is useful because a data source cannot be deleted if it is used by one or more BI Engines.

Parameters:
dsId - The datasource identifier
Returns:
True if the datasource is used by one or more objects, else false
Throws:
it.eng.spago.error.EMFUserError - If any exception occurred

hasBIObjAssociated

boolean hasBIObjAssociated(java.lang.String dsId)
                           throws it.eng.spago.error.EMFUserError
Tells if a data source is associated to any BI Object. It is useful because a data source cannot be deleted if it is used by one or more BI Objects.

Parameters:
dsId - The datasource identifier
Returns:
True if the datasource is used by one or more objects, else false
Throws:
it.eng.spago.error.EMFUserError - If any exception occurred