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.core.modules.misc.datafactory.sql.SQLReportDataFactory;
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 SqlDataAccess extends PREDataAccess {
  private static final Log logger = LogFactory.getLog(SqlDataAccess.class);
  private static final String TYPE = "sql";
  public SqlDataAccess(final Element element) {
    super(element);
  }
  public SqlDataAccess() {
  }
  
  

Parameters:
id
name
connectionId
query
  public SqlDataAccess(String idString nameString connectionIdString query){
  	super(id,nameconnectionIdquery);
  }
  public String getType()
  {
    return ;
  }
    .debug("Creating SQLReportDataFactory");
    final SQLReportDataFactory reportDataFactory = new SQLReportDataFactory(connection.getInitializedConnectionProvider());
    reportDataFactory.setUserField(connection.getUserField());
    reportDataFactory.setPasswordField(connection.getPasswordField());
    reportDataFactory.setQuery("query"getQuery());
    return reportDataFactory;
  }
New to GrepCode? Check out our FAQ X