Package com.javaeye.jert.domain

Examples of com.javaeye.jert.domain.ReportDefinition


    private static final String sql = "select * from user where name = #name#";

    public void testSingleExportImport() {
        ExportImportService service = getService();
        String xml = service.exportToXml(getReportDefintion());
        ReportDefinition rd = service.importFromXml(xml)[0];
        assertReportDefinition(rd);
    }
View Full Code Here


    private ExportImportService getService() {
        return new ExportImportServiceXStreamImpl();
    }

    private ReportDefinition getReportDefintion() {
        ReportDefinition rd = new ReportDefinition();
        rd.setName(name);
        rd.setSql(sql);
        rd.setQueryType(QueryBuilder.QUERY_TYPE_SIMPLE_PARAMETER);
        rd.setupDefaultParameterDefinition();
        return rd;
    }
View Full Code Here

*/
public class ReportDefinitionServiceDefaultImpl extends AbstractService implements ReportDefinitionService {
    private ConnectionManager connectionManager;
   
    public ReportDefinition getReportDefinition(Long id) {
        ReportDefinition rd = (ReportDefinition) loadById(ReportDefinition.class, id);
        //TODO: how to fix these code?
        if(rd == null) return null;
        rd.getDatabase().setConnectionManager(connectionManager);
        return rd;
    }
View Full Code Here

        xstream.alias("reportdefinition", ReportDefinition.class);
        xstream.alias("parameterdefinition", ParameterDefinition.class);
    }

    public String exportToXml(ReportDefinition rd) {
        return xstream.toXML(new ReportDefinition(rd));
    }
View Full Code Here

    }

    public String exportAllToXml(Database database) {
        List rds = new ArrayList(database.getReportDefinitions().size());
        for (Iterator iter = database.getReportDefinitions().iterator(); iter.hasNext();) {
            ReportDefinition rd = (ReportDefinition) iter.next();
            rds.add(new ReportDefinition(rd));
        }
        return xstream.toXML(rds);
    }
View Full Code Here

TOP

Related Classes of com.javaeye.jert.domain.ReportDefinition

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.