public void visitMovies(MovieVisitor visitor) { for (MovieDTO m : movieService.getAllMovies()) { visitor.visit( m.getId(), m.getTitle(), m.getReleaseDate(), m.isRented(), m.getPriceCategory()); } }
public void updateMovie(Long movieId, String movieTitle, Date date, String category) { MovieDTO movie = getMovie(movieId); movie = new MovieDTO(movieId, movieTitle, movie.isRented(), date, category); movieService.saveOrUpdateMovie(movie); invalidateCache(); }