org.pentaho.platform.engine.services.connection
Class PentahoConnectionFactory

java.lang.Object
  extended by org.pentaho.platform.engine.services.connection.PentahoConnectionFactory

public class PentahoConnectionFactory
extends Object

Author:
wseyler TODO To change the template for this generated type comment go to Window - Preferences - Java - Code Style - Code Templates

Constructor Summary
PentahoConnectionFactory()
           
 
Method Summary
static IPentahoConnection getConnection(String datasourceType, IPentahoSession session, ILogger logger)
           
static IPentahoConnection getConnection(String datasourceType, Properties properties, IPentahoSession session, ILogger logger)
           
static IPentahoConnection getConnection(String datasourceType, String connectStr, IPentahoSession session, ILogger logger)
           
static IPentahoConnection getConnection(String datasourceType, String driver, String location, String userName, String password, IPentahoSession session, ILogger logger)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PentahoConnectionFactory

public PentahoConnectionFactory()
Method Detail

getConnection

public static IPentahoConnection getConnection(String datasourceType,
                                               IPentahoSession session,
                                               ILogger logger)
Parameters:
datasourceType - valid type is defined as SQL_DATASOURCE or MDX_DATASOURCE
Returns:
a connection object that can be queried against.

getConnection

public static IPentahoConnection getConnection(String datasourceType,
                                               String connectStr,
                                               IPentahoSession session,
                                               ILogger logger)
Parameters:
datasourceType - valid type is defined as SQL_DATASOURCE or MDX_DATASOURCE
connectStr - - In the case of SQL_DATASOURCE, the name of the JNDI connection to use. Or in the case of MDX_DATASOURCE a properly formatted connection String.
Returns:
a connection object that can be queried against.

getConnection

public static IPentahoConnection getConnection(String datasourceType,
                                               String driver,
                                               String location,
                                               String userName,
                                               String password,
                                               IPentahoSession session,
                                               ILogger logger)
Parameters:
datasourceType - valid types are defined as SQL_DATASOURCE, MDX_DATASOURCE and XML_DATASOURCE
location - - A string specfic to the location and type of datasource. For an SQL instance it would be the URL string required by the implementing driver.
userName -
password -
Returns:
a connection object that can be queried against.

getConnection

public static IPentahoConnection getConnection(String datasourceType,
                                               Properties properties,
                                               IPentahoSession session,
                                               ILogger logger)
Parameters:
datasourceType -
properties - can be null
session - can be null
logger -
Returns: