Package com.javaeye.jert.domain

Examples of com.javaeye.jert.domain.DrillDownColumn


        rd2.setDatabase(db);
        rd2.setName("test report two");
        rd2.setSql("select * from user");
        rd2.setQueryType(QueryBuilder.QUERY_TYPE_STATIC);
        rs.createReportDefinition(rd2);
        DrillDownColumn ddc=new DrillDownColumn();
        ddc.setName("name");
        ddc.setParametersIndex(2);
        rd.addDrillDownColumn(ddc);
        rd2.addAssociatedDrillDownColumn(ddc);
        ddcService.createDrillDownColumn(ddc);
        assertEquals(rd.getDrillDownColumns().size(),1);
        //getting the stored entity from session is redundant ?
        DrillDownColumn stored=ddcService.getDrillDownColumn(ddc.getId());
        assertEquals(ddc.getId(),stored.getId());
        assertEquals(stored.getName(),"name");
        assertEquals(stored.getParametersIndex(),2);
        assertEquals(stored.getReportDefinition().getId(),rd.getId());
        assertEquals(stored.getToReportDefinition().getId(),rd2.getId());
        stored.setName("changed name");
        ddcService.updateDrillDownColumn(stored);
        assertEquals(stored.getName(),"changed name");
        //test for cascade delete all associated DrillDownColumns
        this.closeSession();
        this.openSession();
        rs=(ReportDefinitionService)context.getBean("reportDefinitionService");
        rd2=rs.getReportDefinition(rd2.getId());
View Full Code Here


    public void deleteReportDefinition(ReportDefinition rd) {
        Database db = rd.getDatabase();
        db.removeReportDefinition(rd);
        //TODO How to Automatically Update the PersistenceCollection from the Second Cache?
        for(Iterator it=rd.getAssociatedDrillDownColumns().iterator();it.hasNext();){
            DrillDownColumn drillDownColumn=(DrillDownColumn)it.next();
            drillDownColumn.getReportDefinition().removeDrillDownColumn(drillDownColumn);
        }
        delete(rd);
    }
View Full Code Here

TOP

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

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.