private void handleFilteredResultSet(JdbcStatement jstat, DBAdapter dba,
String stName, OmniDTO returnTO, ResultSet rs,
Map<String, Object> inputs, Map<String, String> outputs)
throws SQLException {
Cursor cursor = jstat.getCursor(stName, rs);
int cursorWidth = cursor.getDimension();
Set<String> allowedColumns = getAllowedColumns(outputs, cursor);
TableData rt = new TableData();
RowInfo newHeader = getFilteredHeaderInfo(allowedColumns, cursor);
rt.setHeader(newHeader);
returnTO.addTableData(stName, rt);
while(rs.next()) {
ArrayList<Object> cellValues = new ArrayList<Object>();
for (int i = 0; i < cursorWidth; i++) {
if (allowedColumns.contains(cursor.getColumnName(i))) {
cellValues.add(dba.getObjectFromResultSetByType(rs,
cursor.getColumnJavaClassName(i),
cursor.getColumnSqlDataType(i), i + 1));
}
}
if (cellValues.size() > 0)
rt.addRow(new RowData(newHeader, cellValues.toArray()));