public List<Producto> obtenerResultados(ResultSet rs) throws SQLException { List<Producto> resultados = new ArrayList<>(); while (rs.next()) { Producto cli = new Producto(); cli.setIdProducto(rs.getInt("idProducto")); cli.setNombre(rs.getString("nombre")); cli.setImagen(rs.getString("imagen")); cli.setPrecio(rs.getInt("precio")); cli.setDescripsion(rs.getString("descripcion")); cli.setExistencias(rs.getInt("existencias")); cli.setDimensiones(rs.getInt("dimesiones")); cli.setPeso(rs.getString("peso")); cli.setIdTienda(rs.getInt("idTienda")); resultados.add(cli); } return resultados; }