public String generateQuery(TableNode node) { StringBuffer select = new StringBuffer("SELECT"); select.append(token); // generate select clause select.append(getSelectClause(node.getName())); select.append(token); return select.append("FROM ").append(node.getName()).toString(); }
public void addAssociation(TableAssociation ass) { String indexKey = null; TableNode src = ass.getSource(); TableNode target = ass.getTarget(); String index1 = src.getName().split("_")[0]; String index2 = target.getName().split("_")[0]; if (index1.equals(index2)) { indexKey = index1; if (index1.length() > 12) indexKey = index1.substring(0, 11); } else { indexKey = "MIXED"; } kettleDao.addAssociation(ass, indexKey); }