use of com.khartec.waltz.data.logical_flow.LogicalFlowDao in project waltz by khartec.
the class FlowLineageHarness method main.
public static void main(String[] args) throws ParseException {
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(DIConfiguration.class);
DSLContext dsl = ctx.getBean(DSLContext.class);
LogicalFlowDao flowDao = ctx.getBean(LogicalFlowDao.class);
EntityReference ref1 = mkRef(APPLICATION, 25662);
EntityReference ref2 = mkRef(ACTOR, 10);
EntityReference ref3 = mkRef(APPLICATION, 25612);
findIncomingByRefs(dsl, SetUtilities.fromArray(ref1, ref2, ref3));
}
use of com.khartec.waltz.data.logical_flow.LogicalFlowDao in project waltz by khartec.
the class LogicalFlowHarness method main.
public static void main(String[] args) throws ParseException {
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(DIConfiguration.class);
DSLContext dsl = ctx.getBean(DSLContext.class);
LogicalFlowDao dao = ctx.getBean(LogicalFlowDao.class);
ApplicationIdSelectorFactory factory = ctx.getBean(ApplicationIdSelectorFactory.class);
IdSelectionOptions options = IdSelectionOptions.mkOpts(mkRef(EntityKind.ORG_UNIT, 20), HierarchyQueryScope.CHILDREN);
LogicalFlow app2appFlow = dao.findByFlowId(28940);
LogicalFlow app2actorFlow = dao.findByFlowId(28941);
System.out.println("-- App 2 App");
System.out.println(app2appFlow);
System.out.println("-- App 2 Actor");
System.out.println(app2actorFlow);
List<LogicalFlow> flows = dao.findByEntityReference(mkRef(EntityKind.APPLICATION, 22406));
System.out.println("-- flows");
flows.forEach(System.out::println);
}
use of com.khartec.waltz.data.logical_flow.LogicalFlowDao in project waltz by khartec.
the class DataFlowHarness method main.
public static void main(String[] args) throws ParseException {
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(DIConfiguration.class);
DSLContext dsl = ctx.getBean(DSLContext.class);
LogicalFlowService service = ctx.getBean(LogicalFlowService.class);
LogicalFlowDao dao = ctx.getBean(LogicalFlowDao.class);
LogicalFlowIdSelectorFactory factory = ctx.getBean(LogicalFlowIdSelectorFactory.class);
IdSelectionOptions options = IdSelectionOptions.mkOpts(EntityReference.mkRef(EntityKind.ORG_UNIT, 5000), HierarchyQueryScope.CHILDREN);
Select<Record1<Long>> selector = factory.apply(options);
System.out.println(selector);
List<LogicalFlow> flows = dao.findBySelector(selector);
flows.forEach(System.out::println);
// by data type
EntityReference dataType = EntityReference.mkRef(EntityKind.DATA_TYPE, 6000);
IdSelectionOptions dataTypeOptions = IdSelectionOptions.mkOpts(dataType, HierarchyQueryScope.CHILDREN);
List<LogicalFlow> byDataTypeFlows = service.findBySelector(dataTypeOptions);
byDataTypeFlows.forEach(System.out::println);
System.out.println(byDataTypeFlows.size());
}
Aggregations