@Override
	public ArrayList<Album> getAllAlbums(ResultSet rsetAlbum)
			throws SQLException {
		ArrayList<Album> albums = new ArrayList<Album>();

		try {
			// for every album do...
			while (rsetAlbum.next()) {
				ResultSet rsetGenre;
				ResultSet rsetArtist;
				ResultSet rsetRating;
				ResultSet rsetReview;
				ResultSet rsetUser;
				ResultSet rsetId = null;
				Statement stId = connection.createStatement();
				PreparedStatement stUser = connection
						.prepareStatement("select Name from Account where Id = ?;");
				PreparedStatement stGenre = connection
						.prepareStatement("select Name from Genre where Id = ?;");
				PreparedStatement stArtist = connection
						.prepareStatement("select Name from Contributor inner join Creator where Media_Id = ? and Creator.id = Contributor.Creator_Id;");
				PreparedStatement stRating = connection
						.prepareStatement("select avg(Rating) from Rating where Media_Id = ?;");
				PreparedStatement stReview = connection
						.prepareStatement("select Title, Text, Account_Id from Review where Media_Id = ?;");
				Album album = RowConverter.convertRowToAlbum(rsetAlbum);

				stGenre.setInt(1, rsetAlbum.getInt("Genre_Id"));
				rsetGenre = stGenre.executeQuery();

				rsetGenre.first();
				album.setGenre(rsetGenre.getString("Name"));

				stArtist.setInt(1, album.getId());
				rsetArtist = stArtist.executeQuery();

				while (rsetArtist.next())
					album.AddArtist(rsetArtist.getString("Name"));

				// get the rating.
				stRating.setInt(1, album.getId());
				rsetRating = stRating.executeQuery();

				while (rsetRating.next())
					album.setRating(rsetRating.getFloat(1));

				// finally, get reviews..
				stReview.setInt(1, album.getId());
				rsetReview = stReview.executeQuery();

				while (rsetReview.next()) {
					Review review = RowConverter.convertRowToReview(rsetReview);

					stUser.setInt(1, rsetReview.getInt("Account_Id"));
					rsetUser = stUser.executeQuery();
					rsetUser.first();
					review.setUser(rsetUser.getString("Name"));
					album.addReview(review);
				}

				// ops, need user too..
				stUser.setInt(1, rsetAlbum.getInt("Account_Id"));
				rsetUser = stUser.executeQuery();
				rsetUser.first();
				album.setUser(rsetUser.getString("Name"));

				albums.add(album);

				// ha-ha
				listClose(new Statement[] { stId, stUser, stGenre, stArtist,
						stRating, stReview }, new ResultSet[] { rsetGenre,
						rsetArtist, rsetRating, rsetReview, rsetUser, rsetId });
			}
		} finally {
			closeResultSet(rsetAlbum);
		}

		return albums;
	}