Example #1
0
 public Copy getSpecificCopy(String title, String format) {
   Movie movie = movieSystem.getMovie(title);
   Copy onecopy = null;
   for (Copy copy : movie.getCopies()) {
     if (copy.getFormat().equals(format) && copy.getStatus().equals(Copy.UNRENT)) {
       onecopy = copy;
     }
   }
   return onecopy;
 }
Example #2
0
 public Movie createMovie(
     String title,
     String year,
     String director,
     String rating,
     String genre,
     String format,
     double cost,
     int quantity) {
   return movieSystem.createMovie(title, year, director, rating, genre, format, cost, quantity);
 }
Example #3
0
 public void collectMovie(String title, String format, String memberNum) {
   for (int i = 0; i < rentings.size(); i++) {
     Renting renting = rentings.get(i);
     if (renting.getMemberNum().equals(memberNum)) {
       Copy copy = renting.getCopy();
       Movie movie = movieSystem.getMovieByCopy(copy.getId());
       if (movie.getTitle().equals(title) && copy.getFormat().equals(format)) {
         rentings.remove(i);
       }
     }
   }
 }
Example #4
0
 public List<Movie> getAllMovies() {
   return movieSystem.getAllMovies();
 }
Example #5
0
  public Movie queryMovieByCopy(Copy copy) {

    return movieSystem.getMovieByCopy(copy.getId());
  }
Example #6
0
  public Movie searchMovie(String keyword, String meta) {

    return movieSystem.search(keyword, meta);
  }