private static List<Column> getCustomColumns(TableConfig table) throws Exception {
List<Column> result = new ArrayList<Column>();
Table t = table.getTable();
for(ColumnConfig mc : table.getColumns()) {
Column c = t.getColumnByName(mc.getName());
if(c == null) {
c = new Column(null, JdbcType.UNDEFINED.TYPE_CODE, "UNDEFINED",
mc.getName(), -1, -1, false,false,false,false,
"",mc.getColumnAlias());
}
c.setJavaType(mc.getJavatype());
if(StringHelper.isNotBlank(mc.getColumnAlias())) {
c.setColumnAlias(mc.getColumnAlias()); // FIXME custom column的 alias 现在的处理方式不好,应该不使用StringHelper.isNotBlank()判断
}
result.add(c);
}
return result;
}