List<Tuple> tuples = new ArrayList<Tuple>();
if (rs != null)
{
while (rs.next())
{
WritableTuple tuple = new CaseInsensitiveKeyValueTuple();
for (int i = 1; i <= colcount; i++)
{
tuple.set(rs.getMetaData().getColumnLabel(i), rs.getObject(i));
}
tuples.add(tuple);
}
}
rs.close();