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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addSeatingPlan
(ArrayList<Seat> seatingPlan) Adds a seating plan to the schedule.void
addShowingTime
(DateTime showingTime) Adds a showing time into the schedule.void
addShowingVenue
(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 aMovieSchedule
isntancevoid
removeSeatingPlan
(int index) Removes a seating plan from the schedule.void
removeShowingTime
(int index) Removes a showing venue from the schedule.void
removeShowingVenue
(int index) Removes a showing time from the schedule.void
setMovieOnShow
(String movieUUID) Sets the UUID of the movie to be shownvoid
setSeatingPlan
(ArrayList<ArrayList<Seat>> seatingPlan) Sets the seating plan of all the showing venues showing the movievoid
setSeatStatus
(int venueSlot, Seat seat, boolean assign) Method to set a seat to be occupied/unoccupied in the seating planvoid
setShowingTime
(ArrayList<DateTime> showingTime) Sets all the showing time for the corresponding showing venues in the schedulevoid
setShowingVenues
(ArrayList<String> showingVenueUUID) Sets all the showing venue UUID showing the movievoid
Sets the unique ID of aMovieSchedule
isntance
-
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 aMovieSchedule
isntance- Returns:
- The unique ID
-
setUUID
Sets the unique ID of aMovieSchedule
isntance- 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
Cinema
instances showing the movie
-
setShowingVenues
Sets all the showing venue UUID showing the movie- Parameters:
showingVenueUUID
- ArrayList of UUID ofCinema
instances 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
-true
if the user is booking,false
if the seat is being unbooked
-
getShowingTime
Gets all the showing time for the corresponding showing venues in the schedule- Returns:
- ArrayList of
DateTime
showing time instances
-
setShowingTime
Sets all the showing time for the corresponding showing venues in the schedule- Parameters:
showingTime
- is an ArrayList ofDateTime
showing 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
-