*/
public <T> List<T> queryForList(String sql,
Map<String, Object> vars,
Map<String, Object> params,
final Class<T> classOfT) {
Sql sqlObj = createSqlObj(sql, params);
sqlObj.setCallback(new SqlCallback() {
public Object invoke(Connection conn, ResultSet rs, Sql sql) throws SQLException {
List<T> list = new ArrayList<T>();
while (rs.next()) {
T result = Castors.me().castTo(rs.getObject(1), classOfT);
list.add(result);
}
return list;
}
});
execute(sqlObj, vars, params);
return sqlObj.getList(classOfT);
}