Search in sources :

Example 1 with ChangeLogSummariesDao

use of org.finos.waltz.data.changelog.ChangeLogSummariesDao in project waltz by khartec.

the class ChangeLogHarness method main.

public static void main(String[] args) {
    AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(DIBaseConfiguration.class);
    ChangeLogSummariesDao dao = ctx.getBean(ChangeLogSummariesDao.class);
    EntityReference ref = mkRef(EntityKind.APPLICATION, 1234L);
    // FunctionUtilities.time("findUnattestedChanges", () -> dao.findUnattestedChanges(ref));
    // FunctionUtilities.time("findUnattestedChanges", () -> dao.findUnattestedChanges(ref));
    // FunctionUtilities.time("findUnattestedChanges", () -> dao.findUnattestedChanges(ref));
    // List<ChangeLog> changes = FunctionUtilities.time("findUnattestedChanges", () -> dao.findUnattestedChanges(ref));
    // System.out.println(changes);
    GenericSelectorFactory factory = new GenericSelectorFactory();
    IdSelectionOptions idSelectionOptions = mkOpts(mkRef(EntityKind.APP_GROUP, 11874), HierarchyQueryScope.EXACT);
    FunctionUtilities.time("test", () -> dao.findCountByParentAndChildKindForDateBySelector(factory.applyForKind(EntityKind.APPLICATION, idSelectionOptions), DateTimeUtilities.toSqlDate(DateTimeUtilities.today()), Optional.of(10)));
    System.out.println("done");
}
Also used : AnnotationConfigApplicationContext(org.springframework.context.annotation.AnnotationConfigApplicationContext) ChangeLogSummariesDao(org.finos.waltz.data.changelog.ChangeLogSummariesDao) EntityReference(org.finos.waltz.model.EntityReference) GenericSelectorFactory(org.finos.waltz.data.GenericSelectorFactory) IdSelectionOptions(org.finos.waltz.model.IdSelectionOptions)

Aggregations

GenericSelectorFactory (org.finos.waltz.data.GenericSelectorFactory)1 ChangeLogSummariesDao (org.finos.waltz.data.changelog.ChangeLogSummariesDao)1 EntityReference (org.finos.waltz.model.EntityReference)1 IdSelectionOptions (org.finos.waltz.model.IdSelectionOptions)1 AnnotationConfigApplicationContext (org.springframework.context.annotation.AnnotationConfigApplicationContext)1