Class 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
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static org.pentaho.commons.connection.IPentahoConnection getConnection​(String datasourceType, String driver, String location, String userName, String password, org.pentaho.platform.api.engine.IPentahoSession session, org.pentaho.platform.api.engine.ILogger logger)  
      static org.pentaho.commons.connection.IPentahoConnection getConnection​(String datasourceType, String connectStr, org.pentaho.platform.api.engine.IPentahoSession session, org.pentaho.platform.api.engine.ILogger logger)  
      static org.pentaho.commons.connection.IPentahoConnection getConnection​(String datasourceType, Properties properties, org.pentaho.platform.api.engine.IPentahoSession session, org.pentaho.platform.api.engine.ILogger logger)  
      static org.pentaho.commons.connection.IPentahoConnection getConnection​(String datasourceType, org.pentaho.platform.api.engine.IPentahoSession session, org.pentaho.platform.api.engine.ILogger logger)  
    • Constructor Detail

      • PentahoConnectionFactory

        public PentahoConnectionFactory()
    • Method Detail

      • getConnection

        public static org.pentaho.commons.connection.IPentahoConnection getConnection​(String datasourceType,
                                                                                      org.pentaho.platform.api.engine.IPentahoSession session,
                                                                                      org.pentaho.platform.api.engine.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 org.pentaho.commons.connection.IPentahoConnection getConnection​(String datasourceType,
                                                                                      String connectStr,
                                                                                      org.pentaho.platform.api.engine.IPentahoSession session,
                                                                                      org.pentaho.platform.api.engine.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 org.pentaho.commons.connection.IPentahoConnection getConnection​(String datasourceType,
                                                                                      String driver,
                                                                                      String location,
                                                                                      String userName,
                                                                                      String password,
                                                                                      org.pentaho.platform.api.engine.IPentahoSession session,
                                                                                      org.pentaho.platform.api.engine.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 org.pentaho.commons.connection.IPentahoConnection getConnection​(String datasourceType,
                                                                                      Properties properties,
                                                                                      org.pentaho.platform.api.engine.IPentahoSession session,
                                                                                      org.pentaho.platform.api.engine.ILogger logger)
        Parameters:
        datasourceType -
        properties - can be null
        session - can be null
        logger -
        Returns: