return FormatUtils.getJavaName(reference.getAlias());
}
public static void setReferenceColumnAlias(Column column, String name, String newName) {
Database database = column.getTable().getDatabase();
Table table = TableUtils.getTable(database, column.getTable().getName());
if (table==null) {
log.error("> table : "+column.getTable().getName()+", column : "+column.getName()+" not found");
return;
}
for (net.sf.minuteProject.configuration.bean.model.data.Reference ref : table.getParents()) {
if (name.equals(ref.getLocalColumn().getName()))
ref.getLocalColumn().setAlias(newName);
}
for (net.sf.minuteProject.configuration.bean.model.data.Reference ref : table.getChildren()) {
if (name.equals(ref.getLocalColumn().getName()))
ref.getLocalColumn().setAlias(newName);
}
}