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));
}
Aggregations