Package src.model
Class MovieSchedule
Object
MovieSchedule
- All Implemented Interfaces:
Serializable
The Class that handles the data of Movie Schedule
- Version:
- 1.0
- Author:
- Lee Juin
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSeatingPlan(ArrayList<Seat> seatingPlan) Adds a seating plan to the schedule.voidaddShowingTime(DateTime showingTime) Adds a showing time into the schedule.voidaddShowingVenue(String cinemaUUID) Method to add a showing venue to the scheduleGets the UUID of the movie to be shownGets the seating plan of all the showing venues showing the movieGets all the showing time for the corresponding showing venues in the scheduleGets all the showing venue UUID showing the moviegetUUID()Gets the unique ID of aMovieScheduleisntancevoidremoveSeatingPlan(int index) Removes a seating plan from the schedule.voidremoveShowingTime(int index) Removes a showing venue from the schedule.voidremoveShowingVenue(int index) Removes a showing time from the schedule.voidsetMovieOnShow(String movieUUID) Sets the UUID of the movie to be shownvoidsetSeatingPlan(ArrayList<ArrayList<Seat>> seatingPlan) Sets the seating plan of all the showing venues showing the movievoidsetSeatStatus(int venueSlot, Seat seat, boolean assign) Method to set a seat to be occupied/unoccupied in the seating planvoidsetShowingTime(ArrayList<DateTime> showingTime) Sets all the showing time for the corresponding showing venues in the schedulevoidsetShowingVenues(ArrayList<String> showingVenueUUID) Sets all the showing venue UUID showing the movievoidSets the unique ID of aMovieScheduleisntance
-
Constructor Details
-
MovieSchedule
public MovieSchedule(String UUID, String movieUUID, ArrayList<String> showingVenueUUID, ArrayList<ArrayList<Seat>> seatingPlan, ArrayList<DateTime> showingTime) Constructor- Parameters:
UUID- is the unique ID of the instance in the databaseemovieUUID- is the unique ID of the movie to be shownshowingVenueUUID- is the unique ID of all the showing venues showing the movieseatingPlan- is the corresponding seating plan of the showing venueshowingTime- is the corresponding showing time
-
-
Method Details
-
getUUID
Gets the unique ID of aMovieScheduleisntance- Returns:
- The unique ID
-
setUUID
Sets the unique ID of aMovieScheduleisntance- Parameters:
UUID- The unique ID
-
getMovieOnShow
Gets the UUID of the movie to be shown- Returns:
- The UUID of the movie to be shown
-
setMovieOnShow
Sets the UUID of the movie to be shown- Parameters:
movieUUID- is the UUID of the movie to be shwon
-
getShowingVenues
Gets all the showing venue UUID showing the movie- Returns:
- ArrayList of UUID of
Cinemainstances showing the movie
-
setShowingVenues
Sets all the showing venue UUID showing the movie- Parameters:
showingVenueUUID- ArrayList of UUID ofCinemainstances showing the movie
-
addShowingVenue
Method to add a showing venue to the schedule- Parameters:
cinemaUUID- is the UUID of the showing venue to be added
-
getSeatingPlan
Gets the seating plan of all the showing venues showing the movie- Returns:
- The seating plan of all the showing venues showing the movie
-
setSeatingPlan
Sets the seating plan of all the showing venues showing the movie- Parameters:
seatingPlan- is the seating plan of all the showing venues showing the movie
-
addSeatingPlan
Adds a seating plan to the schedule. Used concurrently when adding a showing venue- Parameters:
seatingPlan- is the seating plan to be added
-
removeSeatingPlan
public void removeSeatingPlan(int index) Removes a seating plan from the schedule. Used concurrently when removing a showing venue.- Parameters:
index- is the index of the showing venue to be removed
-
setSeatStatus
Method to set a seat to be occupied/unoccupied in the seating plan- Parameters:
venueSlot- is the index of the showing venue the user has selectedseat- is the seat the user has selectedassign-trueif the user is booking,falseif the seat is being unbooked
-
getShowingTime
Gets all the showing time for the corresponding showing venues in the schedule- Returns:
- ArrayList of
DateTimeshowing time instances
-
setShowingTime
Sets all the showing time for the corresponding showing venues in the schedule- Parameters:
showingTime- is an ArrayList ofDateTimeshowing time instances to be added
-
addShowingTime
Adds a showing time into the schedule. Used concurrently when adding a showing venue- Parameters:
showingTime- is the showing time to be added
-
removeShowingVenue
public void removeShowingVenue(int index) Removes a showing time from the schedule. Used concurrently when removing a showing venue.- Parameters:
index- is the index of the showing venue to be removed
-
removeShowingTime
public void removeShowingTime(int index) Removes a showing venue from the schedule.- Parameters:
index- is the index of the showing venue to be removed
-