public String getColumn(String parentCol) { // return the associated column given the parent column Object key = parentColumns.getKeyForValue(parentCol); String col = (String) columns.get(key); // System.out.println("get Column for" +parentCol); // System.out.println("key = "+key); // System.out.println("col="+col); // System.out.println("ParentColumns = "+parentColumns.toString()); return col; }
/** * @param tableName * @param columnName * @param seq */ public void addForeignKey(String tableName, String columnName, String parentColumn, Integer seq) { ForeignKey tbl = null; if (associatedTables.containsKey(tableName)) { tbl = (ForeignKey) associatedTables.get(tableName); } else { tbl = new ForeignKey(parentTable, tableName); associatedTables.put(tableName, tbl); } tbl.addColumn(columnName, parentColumn, seq); }