Class ShowtimeHandler

java.lang.Object
moblima.control.handlers.ShowtimeHandler
Direct Known Subclasses:
CinemaHandler

public class ShowtimeHandler extends Object
The type Showtime handler.
  • Field Details

    • showtimes

      protected List<Showtime> showtimes
      The Showtimes.
    • selectedShowtimeIdx

      protected int selectedShowtimeIdx
      The Selected showtime idx.
  • Constructor Details

    • ShowtimeHandler

      public ShowtimeHandler()
  • Method Details

    • setSelectedShowtimeIdx

      public void setSelectedShowtimeIdx(int showtimeIdx)
      Sets selected showtime idx.
      Parameters:
      showtimeIdx - the showtime idx
    • getShowtimeIdx

      public int getShowtimeIdx(String showtimeId)
      Gets showtime idx.
      Parameters:
      showtimeId - the showtime id
      Returns:
      the showtime idx
    • getShowtime

      public Showtime getShowtime(int showtimeIdx)
      Gets showtime.
      Parameters:
      showtimeIdx - the showtime idx
      Returns:
      the showtime
    • getShowtime

      public Showtime getShowtime(String showtimeId)
      Gets showtime.
      Parameters:
      showtimeId - the showtime id
      Returns:
      the showtime
    • getShowtimes

      public List<Showtime> getShowtimes(int movieId)
      Gets showtimes.
      Parameters:
      movieId - the movie id
      Returns:
      the showtimes
    • updateShowtimeSeats

      public boolean updateShowtimeSeats(int showtimeIdx, boolean[][] seats)
      Update showtime seats boolean.
      Parameters:
      showtimeIdx - the showtime idx
      seats - the seats
      Returns:
      the boolean
    • removeShowtime

      public boolean removeShowtime(String showtimeId)
      Remove showtime boolean.
      Parameters:
      showtimeId - the showtime id
      Returns:
      the boolean
    • printShowtimeDetails

      public String printShowtimeDetails(int showtimeIdx)
      Print showtime details.
      Parameters:
      showtimeIdx - the showtime idx
      Returns:
      the string
    • printSeats

      public void printSeats(int showtimeIdx)
      Print seats.
      Parameters:
      showtimeIdx - the showtime idx
    • printSeats

      public void printSeats(boolean[][] seats, List<int[]> selectedSeats)
      Print seats.
      Parameters:
      seats - the seats
      selectedSeats - the selected
    • bulkAssignSeat

      public boolean bulkAssignSeat(int showtimeIdx, List<int[]> seatCodes, boolean availabilityAssignment)
      Bulk assign seat boolean.
      Parameters:
      showtimeIdx - the showtime idx
      seatCodes - the seat codes
      availabilityAssignment - the availability assignment
      Returns:
      the boolean
    • assignSeat

      public boolean assignSeat(int showtimeIdx, int[] seatCode, boolean availabilityAssignment)
      Assign seat boolean.
      Parameters:
      showtimeIdx - the showtime idx
      seatCode - the seat code
      availabilityAssignment - the availability assignment
      Returns:
      the boolean
    • assignSeat

      public boolean[][] assignSeat(boolean[][] seats, int[] seatCode, boolean availabilityAssignment)
      Assign seat boolean [ ] [ ].
      Parameters:
      seats - the seats
      seatCode - the seat code
      availabilityAssignment - the availability assignment
      Returns:
      the boolean [ ] [ ]
    • getAvailableSeatCount

      public int getAvailableSeatCount(int showtimeIdx)
      Gets available seat count.
      Parameters:
      showtimeIdx - the showtime idx
      Returns:
      the available seat count
    • saveShowtimes

      protected boolean saveShowtimes()
      Save showtimes boolean.
      Returns:
      the boolean