1 28 package net.sf.jasperreports.olap; 29 30 import java.util.Map ; 31 32 import mondrian.olap.Connection; 33 import net.sf.jasperreports.engine.JRDataset; 34 import net.sf.jasperreports.engine.JRException; 35 import net.sf.jasperreports.engine.query.JRQueryExecuter; 36 import net.sf.jasperreports.engine.query.JRQueryExecuterFactory; 37 38 39 43 public class JRMondrianQueryExecuterFactory implements JRQueryExecuterFactory 44 { 45 48 public final static String PARAMETER_MONDRIAN_CONNECTION = "MONDRIAN_CONNECTION"; 49 50 private final static Object [] MONDRIAN_BUILTIN_PARAMETERS = { 51 PARAMETER_MONDRIAN_CONNECTION, Connection.class, 52 }; 53 54 public Object [] getBuiltinParameters() 55 { 56 return MONDRIAN_BUILTIN_PARAMETERS; 57 } 58 59 public JRQueryExecuter createQueryExecuter(JRDataset dataset, Map parameters) throws JRException 60 { 61 return new JRMondrianQueryExecuter(dataset, parameters); 62 } 63 64 public boolean supportsQueryParameterType(String className) 65 { 66 return true; 67 } 68 } 69 | Popular Tags |