@Test @Transactional public void formatBackwardNodeIntegrateQuery(){ IntegrationQueryDto subSystemDesignQuery = new IntegrationQueryDto() .withCiTypeId(2) .withAttrs(Lists.newArrayList(15,22)) .withAttrKeyNames(Lists.newArrayList("subsys_design.guid","subsys_design.key_name")) .withParentRs(new Relationship(27,false)); IntegrationQueryDto systemDesignQuery = new IntegrationQueryDto() .withCiTypeId(1) .withAttrs(Lists.newArrayList(1,8,11)) .withAttrKeyNames(Lists.newArrayList("system_design.guid","system_design.key_name","system_design.code")) .withChildren(Lists.newArrayList(subSystemDesignQuery)); AdhocIntegrationQueryDto adhocQuery = new AdhocIntegrationQueryDto(systemDesignQuery, new QueryRequest().withResultColumns(Lists.newArrayList("subsys_design.key_name"))); String expression = routeQueryExpressionFormatter.format(adhocQuery); assertThat(expression, equalTo("system_design~(system_design)subsys_design:[key_name]")); }
public String format(AdhocIntegrationQueryDto adhocIntegrationQuery){ IntegrationQueryDto integrationQuery = adhocIntegrationQuery.getCriteria(); List<String> resultColumns = adhocIntegrationQuery.getQueryRequest().getResultColumns(); List<Filter> filters = adhocIntegrationQuery.getQueryRequest().getFilters(); return format(integrationQuery,filters,resultColumns); }
RouteQueryExpressionFormatter { public String format(AdhocIntegrationQueryDto adhocIntegrationQuery){ IntegrationQueryDto integrationQuery = adhocIntegrationQuery.getCriteria(); List<String> resultColumns = adhocIntegrationQuery.getQueryRequest().getResultColumns(); List<Filter> filters = adhocIntegrationQuery.getQueryRequest().getFilters(); return format(integrationQuery,filters,resultColumns); } }
RouteQueryExpressionFormatter { public String format(AdhocIntegrationQueryDto adhocIntegrationQuery){ IntegrationQueryDto integrationQuery = adhocIntegrationQuery.getCriteria(); List<String> resultColumns = adhocIntegrationQuery.getQueryRequest().getResultColumns(); List<Filter> filters = adhocIntegrationQuery.getQueryRequest().getFilters(); return format(integrationQuery,filters,resultColumns); } RouteQueryExpressionFormatter(Map<Integer, DynamicEntityMeta> entityMap); }
RouteQueryExpressionFormatter { public String format(AdhocIntegrationQueryDto adhocIntegrationQuery){ IntegrationQueryDto integrationQuery = adhocIntegrationQuery.getCriteria(); List<String> resultColumns = adhocIntegrationQuery.getQueryRequest().getResultColumns(); List<Filter> filters = adhocIntegrationQuery.getQueryRequest().getFilters(); return format(integrationQuery,filters,resultColumns); } RouteQueryExpressionFormatter(Map<Integer, DynamicEntityMeta> entityMap); String format(AdhocIntegrationQueryDto adhocIntegrationQuery); }
RouteQueryExpressionFormatter { public String format(AdhocIntegrationQueryDto adhocIntegrationQuery){ IntegrationQueryDto integrationQuery = adhocIntegrationQuery.getCriteria(); List<String> resultColumns = adhocIntegrationQuery.getQueryRequest().getResultColumns(); List<Filter> filters = adhocIntegrationQuery.getQueryRequest().getFilters(); return format(integrationQuery,filters,resultColumns); } RouteQueryExpressionFormatter(Map<Integer, DynamicEntityMeta> entityMap); String format(AdhocIntegrationQueryDto adhocIntegrationQuery);  }