it.eng.spagobi.commons.utilities
Class DataSourceUtilities
java.lang.Object
it.eng.spagobi.commons.utilities.DataSourceUtilities
public class DataSourceUtilities
- extends java.lang.Object
Method Summary |
java.sql.Connection |
getConnection(it.eng.spago.security.IEngUserProfile profile,
java.lang.String dsLabel)
use this method in service implementation. |
java.sql.Connection |
getConnection(it.eng.spago.base.RequestContainer requestContainer,
java.lang.String dsLabel)
This method, based on the data sources table, gets a
database connection and return it. |
it.eng.spago.dbaccess.sql.DataConnection |
getDataConnection(java.sql.Connection con)
Creates a ago DataConnection object starting from a sql connection. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DataSourceUtilities
public DataSourceUtilities()
getConnection
public java.sql.Connection getConnection(it.eng.spago.base.RequestContainer requestContainer,
java.lang.String dsLabel)
- This method, based on the data sources table, gets a
database connection and return it.
- Parameters:
dsLabel
- the ds label
- Returns:
- the database connection
N.B. You MUST use this method only when RequestContainer is OK.
getConnection
public java.sql.Connection getConnection(it.eng.spago.security.IEngUserProfile profile,
java.lang.String dsLabel)
- use this method in service implementation. If RequestContainer isn't correct.
- Parameters:
profile
- dsLabel
-
- Returns:
getDataConnection
public it.eng.spago.dbaccess.sql.DataConnection getDataConnection(java.sql.Connection con)
throws it.eng.spago.error.EMFInternalError
- Creates a ago DataConnection object starting from a sql connection.
- Parameters:
con
- Connection to the export database
- Returns:
- The Spago DataConnection Object
- Throws:
it.eng.spago.error.EMFInternalError
- the EMF internal error