Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package pt.webdetails.cda.dataaccess;
 
 import  org.apache.commons.logging.Log;
 import  org.apache.commons.logging.LogFactory;
 import  org.dom4j.Element;
 import  org.pentaho.reporting.engine.classic.core.DataFactory;
 import  org.pentaho.reporting.engine.classic.extensions.datasources.olap4j.AbstractNamedMDXDataFactory;
 import  org.pentaho.reporting.engine.classic.extensions.datasources.olap4j.BandedMDXDataFactory;
Implementation of a DataAccess that will get data from a SQL database

User: pedro Date: Feb 3, 2010 Time: 12:18:05 PM

public class Olap4JDataAccess extends PREDataAccess {
  private static final Log logger = LogFactory.getLog(Olap4JDataAccess.class);
  public Olap4JDataAccess(final Element element) {
    super(element);
  }
  public Olap4JDataAccess() {
  }
  protected AbstractNamedMDXDataFactory createDataFactory() throws UnknownConnectionExceptionInvalidConnectionException {
    return new BandedMDXDataFactory(connection.getInitializedConnectionProvider());
  }
    .debug("Creating BandedMDXDataFactory");
    final AbstractNamedMDXDataFactory mdxDataFactory = createDataFactory();
    mdxDataFactory.setQuery("query"getQuery());
    mdxDataFactory.setJdbcPasswordField(connection.getPasswordField());
    mdxDataFactory.setJdbcUserField(connection.getUserField());
    mdxDataFactory.setRoleField(connection.getRoleField());
    return mdxDataFactory;
  }
  public String getType() {
    return "olap4J";
  }
    return .;
  }
New to GrepCode? Check out our FAQ X