请问jdbc批处理获得的结果集后怎么处理?
[code=Java][/code] 
 public   class   ProductDAOImpl   implements   ProductDAO   { 
 	private   static   final   String   FIND_BY_IDS   =    "select   *   from   d_product   where   id=? "; 
 	public   List <Product>    findById(List <Integer>    ids)   throws   Exception   { 
 		List <Product>    pros   =   null; 
 		Connection   conn   =   DBUtil.openConnection(); 
 		PreparedStatement   prep   =   conn.prepareStatement(FIND_BY_IDS); 
 		for(int   i=0;i <ids.size();i++){//批处理 
 			prep.setInt(1,   ids.get(i)); 
 			prep.addBatch(); 
 		}   
 		/**int[]   rs请问怎么写*/   =   prep.executeBatch(); 
 		while(/**请问怎么写*/)   { 
 			Product   pro   =   new   Product(); 
 			pro.setDangPrice(rs.getDouble( "dang_price ")); 
 			pro.setFixedPrice(rs.getDouble( "fixed_price ")); 
 			pro.setProductName(rs.getString( "product_name ")); 
 			pro.setProductPic(rs.getString( "product_pic ")); 
 			pro.setId(rs.getInt(id));  			 
 		} 
 		return   pros; 
 	} 
 }
------解决方案--------------------
addBatch(),executeBatch();是用来执行DML SQL 语句,不是SELECT,LZ弄错了吧
------解决方案--------------------while(rs.next)
------解决方案--------------------掌握两个函数(其实是两类函数)。首先用循环遍历得到的结果集,即while(result.next())。这个函数遍历结果集中的每一条记录。然后在循环体中用result.getString("字段名")(也可以是其他类的get函数,看你各个字段的类型是什么了)获取每条记录相应字段的值,通常是有相应的JavaBean。具体的楼主查查帮助文档应该能懂了