bi.setTableName(tableName);
bi.setViewName(viewName);
Column column = new Column();
column.setTableName(tableName);
Session session = SessionFactory.openSession();
SelectCommand scmd = DAOFactory.getSelectCommand(Column.class);
scmd.setFilter(DAOFactory.getFilter("tableName", SQLOperator.EQUAL,
tableName));
ArrayList tableProperties = session.query(scmd);
bi.setTableProperties(tableProperties);
for (int i = 0; i < tableProperties.size(); i++) {
column = (Column) tableProperties.get(i);
if ("Y".equals(column.getIsPrimaryKey()))
bi.setPrimaryKey(column.getColumnName());
}
scmd = DAOFactory.getSelectCommand(Column.class);
scmd.setFilter(DAOFactory.getFilter("tableName", SQLOperator.EQUAL,
viewName));
ArrayList viewProperties = session.query(scmd);
viewProperties.removeAll(tableProperties);
bi.setViewProperties(viewProperties);
return bi;