Package src.controller
Class MovieScheduleManager
Object
MovieScheduleManager
Controller for handling all logic related to
MovieSchedule- Version:
- 1.0
- Author:
- Lee Juin
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MovieSchedulecreateMovieSchedule(String movieUUID, ArrayList<String> showingVenuesUUID, ArrayList<ArrayList<Seat>> seatingPlan, ArrayList<DateTime> showingTime) Method to create aMovieScheduleand save to databasestatic MovieSchedulegetMovieScheduleByMovie(Movie movie) Method to retrieve a movie schedule by the queried moviestatic voidresetMovieSchedule(MovieSchedule movieSchedule) Refactored method to reset a movie schedule.static MovieScheduleupdateMovieSchedule(String movieUUID, ArrayList<String> showingVenuesUUID, ArrayList<DateTime> showingTimes) Method to update aMovieSchedule
-
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 aMovieScheduleand save to database- Parameters:
movieUUID- is the unique ID of the movie to be shownshowingVenuesUUID- is the unique ID of all the cinemas showing the movieseatingPlan- is the copy of the seating plan of all the cinemas showing the movieshowingTime- is all the scheduled time to show the movie for each corresponding showing venue- Returns:
- The created
MovieScheduleinstance
-
updateMovieSchedule
public static MovieSchedule updateMovieSchedule(String movieUUID, ArrayList<String> showingVenuesUUID, ArrayList<DateTime> showingTimes) Method to update aMovieSchedule- Parameters:
movieUUID- is the movie of which the schedule needs to be updatedshowingVenuesUUID- is all the showing venues to be added/updatedshowingTimes- is all the showing time corresponding to the venues to be added/updated- Returns:
- The updated
MovieSchedule
-
getMovieScheduleByMovie
Method to retrieve a movie schedule by the queried movie- Parameters:
movie- is the target movie- Returns:
- The
MovieScheduleinstance queried
-
resetMovieSchedule
Refactored method to reset a movie schedule.- Parameters:
movieSchedule- is the movie schedule to be resetted
-