List

List
toArray(T[] a)
public Integer[] queryForInts(String sql, Object[] args) throws Exception {
	List<Integer> list=queryForList(sql,args,new RowMapper<Integer>(){

		public Integer mapRow(ResultSet rs, int index) throws SQLException {
			return rs.getInt(1);
		}
		
	});
	if(list==null)return null;
	return list.toArray(new Integer[]{});
}




你可能感兴趣的:(List)