Package pack = copyPackage(table);
Hashtable<String, Component> components = new Hashtable<String, Component>();
for (Column column : table.getColumns()) {
String key = getComponentBeanPath(table.getName(), column.getName());
String fullPath = getComponentBeanPropertyPath(table.getName(), column.getName());
Component component = components.get(key);
if (component==null) {
// to set in create New component
component = new ComponentDDLUtils();
component.setPath(key);
component.setName(getBeforeLastInPathElement(fullPath));
//Package pack = table.getPackage();
//pack.setName(pack.getName()+StringUtils.lowerCase(FormatUtils.getJavaName(table.getName())));
component.setPackage(pack);
component.setTable (table);
}
column.setName(getLastInPathElement(fullPath));
component.addColumn(column);
components.put(key, component);
}
return components;
}