Search in sources :

Example 1 with ReportGridDao

use of org.finos.waltz.data.report_grid.ReportGridDao in project waltz by khartec.

the class ReportGridHarness method main.

public static void main(String[] args) {
    AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(DIBaseConfiguration.class);
    ReportGridDao dao = ctx.getBean(ReportGridDao.class);
    System.out.println("Starting....");
    EntityReference cib = mkRef(EntityKind.APP_GROUP, 11261);
    EntityReference infra = mkRef(EntityKind.ORG_UNIT, 6811);
    EntityReference justWaltz = mkRef(EntityKind.APPLICATION, 20506);
    EntityReference justWaltzGroup = mkRef(EntityKind.APP_GROUP, 433);
    EntityReference orgUnit = mkRef(EntityKind.ORG_UNIT, 95);
    EntityReference everythingGroup = mkRef(EntityKind.APP_GROUP, 20827);
    EntityReference flowDiagram = mkRef(EntityKind.FLOW_DIAGRAM, 1);
    EntityReference mgr = mkRef(EntityKind.PERSON, 1);
    Select<Record1<Long>> selector = new ApplicationIdSelectorFactory().apply(mkOpts(infra));
    System.out.println("Made selector");
    Set<ReportGridCell> a = FunctionUtilities.time("getCellData", () -> dao.findCellDataByGridId(3, selector));
    Set<ReportGridCell> b = FunctionUtilities.time("getCellData", () -> dao.findCellDataByGridId(3, selector));
    Set<ReportGridCell> c = FunctionUtilities.time("getCellData", () -> dao.findCellDataByGridId(3, selector));
    Set<ReportGridCell> data = FunctionUtilities.time("getCellData", () -> dao.findCellDataByGridId(3, selector));
    System.out.println(data.size());
    System.out.println(first(data));
}
Also used : ReportGridCell(org.finos.waltz.model.report_grid.ReportGridCell) AnnotationConfigApplicationContext(org.springframework.context.annotation.AnnotationConfigApplicationContext) ApplicationIdSelectorFactory(org.finos.waltz.data.application.ApplicationIdSelectorFactory) ReportGridDao(org.finos.waltz.data.report_grid.ReportGridDao) EntityReference(org.finos.waltz.model.EntityReference) Record1(org.jooq.Record1)

Aggregations

ApplicationIdSelectorFactory (org.finos.waltz.data.application.ApplicationIdSelectorFactory)1 ReportGridDao (org.finos.waltz.data.report_grid.ReportGridDao)1 EntityReference (org.finos.waltz.model.EntityReference)1 ReportGridCell (org.finos.waltz.model.report_grid.ReportGridCell)1 Record1 (org.jooq.Record1)1 AnnotationConfigApplicationContext (org.springframework.context.annotation.AnnotationConfigApplicationContext)1