@Override public XJoinChain withName(String value) { setName(value); return this; }
@Override public XJoinChain withName(String value) { setName(value); return this; }
/** * Create XJoinChain from cube join chain */ public static XJoinChain getXJoinChainFromJoinChain(JoinChain jc) { XJoinChain xjc = XCF.createXJoinChain(); xjc.setName(jc.getName()); xjc.setDescription(jc.getDescription()); xjc.setDisplayString(jc.getDisplayString()); xjc.setDestTable(jc.getDestTable()); xjc.setPaths(new XJoinPaths()); for (JoinChain.Path path : jc.getPaths()) { xjc.getPaths().getPath().add(xJoinPathFromJoinPath(path)); } return xjc; }
/** * Create XJoinChain from cube join chain */ public static XJoinChain getXJoinChainFromJoinChain(JoinChain jc) { XJoinChain xjc = XCF.createXJoinChain(); xjc.setName(jc.getName()); xjc.setDescription(jc.getDescription()); xjc.setDisplayString(jc.getDisplayString()); xjc.setDestTable(jc.getDestTable()); xjc.setPaths(new XJoinPaths()); for (JoinChain.Path path : jc.getPaths()) { xjc.getPaths().getPath().add(xJoinPathFromJoinPath(path)); } return xjc; }
private void testJoinChains(LensDimensionCommands command) { XJoinChains chains = new XJoinChains(); XJoinChain chain1 = new XJoinChain(); chain1.setPaths(new XJoinPaths()); XJoinPath path = new XJoinPath(); path.setEdges(new XJoinEdges()); XJoinEdge edge1 = new XJoinEdge(); XTableReference ref1 = new XTableReference(); ref1.setTable("test_dim"); ref1.setColumn("d2id"); XTableReference ref2 = new XTableReference(); ref2.setTable("test_detail"); ref2.setColumn("id"); edge1.setFrom(ref1); edge1.setTo(ref2); path.getEdges().getEdge().add(edge1); chain1.setName("dim2chain"); chain1.getPaths().getPath().add(path); chain1.setDestTable("test_detail"); chains.getJoinChain().add(chain1); assertEquals(command.showJoinChains("test_dim"), new XJoinChainTable(chains).toString()); }
edge1.setTo(ref2); path.getEdges().getEdge().add(edge1); chain1.setName("testdetailchain"); chain1.getPaths().getPath().add(path); chain1.setDestTable("test_detail"); edge2.setTo(ref4); path2.getEdges().getEdge().add(edge2); chain2.setName("testdimchain"); chain2.getPaths().getPath().add(path2); chain2.setDestTable("test_dim");
xj1.setName("chain1"); xj1.setDescription("first chain"); xj1.setDisplayString("Chain-1");