public List<CommentInfo> listAll() throws Exception { List<CommentInfo> lst = new ArrayList<CommentInfo>(); String sql = "select * from Comment"; ResultSet rs = this.db.getSQLResult(sql); while (rs.next()) { CommentInfo info = new CommentInfo(); info.id = rs.getInt("Id"); info.name = rs.getString("Name"); info.date = rs.getString("Date"); info.comment = rs.getString("Comment"); lst.add(info); } return lst; }