@Override
	public ArrayList<Movie> getAllMovies(ResultSet rsetMovie)
			throws SQLException {
		ArrayList<Movie> movies = new ArrayList<Movie>();

		try {
			// for every album do...
			while (rsetMovie.next()) {
				ResultSet rsetGenre;
				ResultSet rsetDirector;
				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 stDirector = 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 = ?;");
				Movie movie = RowConverter.convertRowToMovie(rsetMovie);

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

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

				stDirector.setInt(1, movie.getId());
				rsetDirector = stDirector.executeQuery();

				while (rsetDirector.next())
					movie.addDirector(rsetDirector.getString("Name"));

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

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

				// finally, get reviews..
				stReview.setInt(1, movie.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"));
					movie.addReview(review);
				}

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

				movies.add(movie);

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

		return movies;
	}