Class MovieScheduleManager

Object
MovieScheduleManager

public class MovieScheduleManager extends Object
Controller for handling all logic related to MovieSchedule
Version:
1.0
Author:
Lee Juin
  • Constructor Details

    • MovieScheduleManager

      public MovieScheduleManager()
      Constructor
  • Method Details

    • createMovieSchedule

      public static MovieSchedule createMovieSchedule(String movieUUID, ArrayList<String> showingVenuesUUID, ArrayList<ArrayList<Seat>> seatingPlan, ArrayList<DateTime> showingTime)
      Method to create a MovieSchedule and save to database
      Parameters:
      movieUUID - is the unique ID of the movie to be shown
      showingVenuesUUID - is the unique ID of all the cinemas showing the movie
      seatingPlan - is the copy of the seating plan of all the cinemas showing the movie
      showingTime - is all the scheduled time to show the movie for each corresponding showing venue
      Returns:
      The created MovieSchedule instance
    • updateMovieSchedule

      public static MovieSchedule updateMovieSchedule(String movieUUID, ArrayList<String> showingVenuesUUID, ArrayList<DateTime> showingTimes)
      Method to update a MovieSchedule
      Parameters:
      movieUUID - is the movie of which the schedule needs to be updated
      showingVenuesUUID - is all the showing venues to be added/updated
      showingTimes - is all the showing time corresponding to the venues to be added/updated
      Returns:
      The updated MovieSchedule
    • getMovieScheduleByMovie

      public static MovieSchedule getMovieScheduleByMovie(Movie movie)
      Method to retrieve a movie schedule by the queried movie
      Parameters:
      movie - is the target movie
      Returns:
      The MovieSchedule instance queried
    • resetMovieSchedule

      public static void resetMovieSchedule(MovieSchedule movieSchedule)
      Refactored method to reset a movie schedule.
      Parameters:
      movieSchedule - is the movie schedule to be resetted