Search in sources :

Example 1 with DataTypeUsageDao

use of org.finos.waltz.data.data_type_usage.DataTypeUsageDao in project waltz by khartec.

the class DataTypeUsageHarness method main.

public static void main(String[] args) {
    AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(DIConfiguration.class);
    DSLContext dsl = ctx.getBean(DSLContext.class);
    DataTypeUsageDao dao = ctx.getBean(DataTypeUsageDao.class);
    DataTypeUsageService svc = ctx.getBean(DataTypeUsageService.class);
    long st = System.currentTimeMillis();
    dao.recalculateForAllApplications();
    List<DataTypeUsage> dtUsages = svc.findForDataTypeSelector(mkOpts(mkRef(EntityKind.DATA_TYPE, 3000), HierarchyQueryScope.CHILDREN));
    System.out.println("Data Type usages: " + dtUsages.size());
    List<DataTypeUsage> actorUsages = svc.findForEntity(mkRef(EntityKind.ACTOR, 16L));
    System.out.println("Actor usages: " + actorUsages.size());
    System.out.println("Took " + (System.currentTimeMillis() - st));
}
Also used : AnnotationConfigApplicationContext(org.springframework.context.annotation.AnnotationConfigApplicationContext) DataTypeUsage(org.finos.waltz.model.data_type_usage.DataTypeUsage) DSLContext(org.jooq.DSLContext) DataTypeUsageDao(org.finos.waltz.data.data_type_usage.DataTypeUsageDao) DataTypeUsageService(org.finos.waltz.service.usage_info.DataTypeUsageService)

Aggregations

DataTypeUsageDao (org.finos.waltz.data.data_type_usage.DataTypeUsageDao)1 DataTypeUsage (org.finos.waltz.model.data_type_usage.DataTypeUsage)1 DataTypeUsageService (org.finos.waltz.service.usage_info.DataTypeUsageService)1 DSLContext (org.jooq.DSLContext)1 AnnotationConfigApplicationContext (org.springframework.context.annotation.AnnotationConfigApplicationContext)1