use of org.finos.waltz.service.changelog.ChangeLogService in project waltz by khartec.
the class ChangeLogSummariesHarness method main.
public static void main(String[] args) {
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(DIConfiguration.class);
ChangeLogService svc = ctx.getBean(ChangeLogService.class);
DSLContext dsl = ctx.getBean(DSLContext.class);
if (false) {
// enable this if you want to randomize your changelog dates (i.e. for testing)
dsl.update(CHANGE_LOG).set(CHANGE_LOG.CREATED_AT, DSL.timestampSub(DSL.now(), CHANGE_LOG.ID.plus(CHANGE_LOG.PARENT_ID).mod(360), DatePart.DAY)).execute();
}
IdSelectionOptions opts = mkOpts(mkRef(EntityKind.ORG_UNIT, 20), HierarchyQueryScope.CHILDREN);
List<DateTally> res = time("findCountByDateForParentKindBySelector", () -> svc.findCountByDateForParentKindBySelector(EntityKind.APPLICATION, opts, Optional.empty()));
System.out.println(res);
}
Aggregations