コード例 #1
0
 @Override
 public MoviePlanBean getMoviePlanBean(String movieId) {
   // TODO Auto-generated method stub
   MoviePlanBean moviePlanBean = new MoviePlanBean();
   int id = Integer.parseInt(movieId);
   Movie movie = movieDao.getMovieById(id);
   List<Plan> plans = planDao.getPlansByMovieId(id);
   moviePlanBean.setMovie(movie);
   moviePlanBean.setPlans(plans);
   moviePlanBean.setHasEnd();
   return moviePlanBean;
 }
コード例 #2
0
 @Override
 public ArrayList<MoviePlanBean> getMoviePlanBeans() {
   // TODO Auto-generated method stub
   List<Movie> movies = movieDao.getAllMovies();
   ArrayList<MoviePlanBean> moviePlanBeans = new ArrayList<MoviePlanBean>();
   for (Movie movie : movies) {
     int id = movie.getId();
     List<Plan> plans = planDao.getPlansByMovieId(id);
     MoviePlanBean moviePlanBean = new MoviePlanBean();
     moviePlanBean.setMovie(movie);
     moviePlanBean.setPlans(plans);
     moviePlanBean.setHasEnd();
     moviePlanBeans.add(moviePlanBean);
   }
   return moviePlanBeans;
 }