Package src.controller
Class MovieScheduleManager
Object
MovieScheduleManager
Controller for handling all logic related to
MovieSchedule
- Version:
- 1.0
- Author:
- Lee Juin
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic MovieSchedule
createMovieSchedule
(String movieUUID, ArrayList<String> showingVenuesUUID, ArrayList<ArrayList<Seat>> seatingPlan, ArrayList<DateTime> showingTime) Method to create aMovieSchedule
and save to databasestatic MovieSchedule
getMovieScheduleByMovie
(Movie movie) Method to retrieve a movie schedule by the queried moviestatic void
resetMovieSchedule
(MovieSchedule movieSchedule) Refactored method to reset a movie schedule.static MovieSchedule
updateMovieSchedule
(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 aMovieSchedule
and 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
MovieSchedule
instance
-
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
MovieSchedule
instance queried
-
resetMovieSchedule
Refactored method to reset a movie schedule.- Parameters:
movieSchedule
- is the movie schedule to be resetted
-