Search in sources :

Example 1 with DataTypeUsage

use of com.khartec.waltz.model.data_type_usage.DataTypeUsage 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(com.khartec.waltz.model.data_type_usage.DataTypeUsage) DSLContext(org.jooq.DSLContext) DataTypeUsageDao(com.khartec.waltz.data.data_type_usage.DataTypeUsageDao) DataTypeUsageService(com.khartec.waltz.service.usage_info.DataTypeUsageService)

Aggregations

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