use of com.qlangtech.tis.sql.parser.tuple.creator.impl.TaskNodeTraversesCreatorVisitor in project tis by qlangtech.
the class TestValChainListTupleMap method generateCode.
public void generateCode() throws Exception {
TableTupleCreator totalpaySummaryTuple = this.parseSqlTaskNode(totalpay_summary);
TaskNodeTraversesCreatorVisitor visitor = new TaskNodeTraversesCreatorVisitor(TestERRules.getTotalpayErRules());
totalpaySummaryTuple.accept(visitor);
Map<IEntityNameGetter, List<IValChain>> tabTriggers = visitor.getTabTriggerLinker();
for (Map.Entry<IEntityNameGetter, List<IValChain>> e : tabTriggers.entrySet()) {
System.out.println(e.getKey().getEntityName());
if ("payinfo".equals(e.getKey().getEntityName().getTabName()) || "card".equals(e.getKey().getEntityName().getTabName())) {
System.out.println("====================================================");
System.out.println(e.getKey().getEntityName().getTabName());
for (IValChain chain : e.getValue()) {
System.out.println(Joiner.on("->").join(chain.mapChainValve((r) -> {
return r.getIdentityName();
}).iterator()));
}
}
}
}
use of com.qlangtech.tis.sql.parser.tuple.creator.impl.TaskNodeTraversesCreatorVisitor in project tis by qlangtech.
the class DataFlowAppSource method getTabTriggerLinker.
// @Override
public Map<IEntityNameGetter, List<IValChain>> getTabTriggerLinker() {
try {
SqlTaskNodeMeta.SqlDataFlowTopology topology = SqlTaskNodeMeta.getSqlDataFlowTopology(dataflowName);
TableTupleCreator finalTableNode = topology.parseFinalSqlTaskNode();
ERRules erR = getErRules();
TaskNodeTraversesCreatorVisitor visitor = new TaskNodeTraversesCreatorVisitor(erR);
finalTableNode.accept(visitor);
Map<IEntityNameGetter, List<IValChain>> tabTriggers = visitor.getTabTriggerLinker();
return tabTriggers;
} catch (Exception e) {
throw new RuntimeException(e);
}
}
Aggregations