Package src.model

Class MovieSchedule

Object
MovieSchedule
All Implemented Interfaces:
Serializable

public class MovieSchedule extends Object implements Serializable
The Class that handles the data of Movie Schedule
Version:
1.0
Author:
Lee Juin
See Also:
  • 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 databasee
      movieUUID - is the unique ID of the movie to be shown
      showingVenueUUID - is the unique ID of all the showing venues showing the movie
      seatingPlan - is the corresponding seating plan of the showing venue
      showingTime - is the corresponding showing time
  • Method Details

    • getUUID

      public String getUUID()
      Gets the unique ID of a MovieSchedule isntance
      Returns:
      The unique ID
    • setUUID

      public void setUUID(String UUID)
      Sets the unique ID of a MovieSchedule isntance
      Parameters:
      UUID - The unique ID
    • getMovieOnShow

      public String getMovieOnShow()
      Gets the UUID of the movie to be shown
      Returns:
      The UUID of the movie to be shown
    • setMovieOnShow

      public void setMovieOnShow(String movieUUID)
      Sets the UUID of the movie to be shown
      Parameters:
      movieUUID - is the UUID of the movie to be shwon
    • getShowingVenues

      public ArrayList<String> getShowingVenues()
      Gets all the showing venue UUID showing the movie
      Returns:
      ArrayList of UUID of Cinema instances showing the movie
    • setShowingVenues

      public void setShowingVenues(ArrayList<String> showingVenueUUID)
      Sets all the showing venue UUID showing the movie
      Parameters:
      showingVenueUUID - ArrayList of UUID of Cinema instances showing the movie
    • addShowingVenue

      public void addShowingVenue(String cinemaUUID)
      Method to add a showing venue to the schedule
      Parameters:
      cinemaUUID - is the UUID of the showing venue to be added
    • getSeatingPlan

      public ArrayList<ArrayList<Seat>> 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

      public void setSeatingPlan(ArrayList<ArrayList<Seat>> seatingPlan)
      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

      public void addSeatingPlan(ArrayList<Seat> seatingPlan)
      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

      public void setSeatStatus(int venueSlot, Seat seat, boolean assign)
      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 selected
      seat - is the seat the user has selected
      assign - true if the user is booking, false if the seat is being unbooked
    • getShowingTime

      public ArrayList<DateTime> getShowingTime()
      Gets all the showing time for the corresponding showing venues in the schedule
      Returns:
      ArrayList of DateTime showing time instances
    • setShowingTime

      public void setShowingTime(ArrayList<DateTime> showingTime)
      Sets all the showing time for the corresponding showing venues in the schedule
      Parameters:
      showingTime - is an ArrayList of DateTime showing time instances to be added
    • addShowingTime

      public void addShowingTime(DateTime showingTime)
      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