String foreignColumn = namingStrategy.normalizeColumnName(foreignKeys.getString(FK_FOREIGN_COLUMN_NAME));
if (name == null || name.isEmpty()) {
name = tableName + "_" + parentTableName + "_FK";
}
ForeignKeyData data = foreignKeyData.get(name);
if (data == null) {
data = new ForeignKeyData(name, parentSchemaName, parentTableName,
createType(parentSchemaName, parentTableName));
foreignKeyData.put(name, data);
}
data.add(foreignColumn, parentColumnName);
}
return foreignKeyData;
}finally{
foreignKeys.close();
}