Package src.controller
Class CinemaManager
Object
CinemaManager
Controller class for handling all logic related to
Cinema- Version:
- 1.0
- Author:
- Lee Juin
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CinemacreateIMaxCinema(ArrayList<Seat> seats) Method to create aIMaxCinemainstance and save to databasestatic CinemacreatePlatinumCinema(ArrayList<Seat> seats) Method to create aPlatinumCinemainstance and save to databasestatic CinemacreateStandardCinema(ArrayList<Seat> seats) Method to create aStandardCinemainstance and save to databasefilterCinemaByCineplexMovie(Cineplex cineplex, Movie movie) Method to obtain a list of cinemas from a given cineplex, which are showing the queried moviefilterCinemaByClass(CinemaClass cinemaClass, Cineplex cineplex) Method to obtain a list of cinemas from a given cineplex, which belongs to the same classstatic CinemagetCinemaByUUID(String cinemaUUID) Method to obtain a cinema by its UUIDstatic StringgetCinemaCode(Cinema cinema) Method to extract cinema code from cinema UUID for printing in transaction ID
-
Constructor Details
-
CinemaManager
public CinemaManager()Constructor
-
-
Method Details
-
createPlatinumCinema
Method to create aPlatinumCinemainstance and save to database -
createStandardCinema
Method to create aStandardCinemainstance and save to database -
createIMaxCinema
Method to create aIMaxCinemainstance and save to database -
filterCinemaByClass
Method to obtain a list of cinemas from a given cineplex, which belongs to the same class- Parameters:
cinemaClass- is theCinemaClassto querycineplex- is theCineplexto query- Returns:
- The filtered ArrayList of
Cinemainstances
-
filterCinemaByCineplexMovie
Method to obtain a list of cinemas from a given cineplex, which are showing the queried movie -
getCinemaCode
Method to extract cinema code from cinema UUID for printing in transaction ID- Parameters:
cinema- is the target cinema- Returns:
- The cinema code
-
getCinemaByUUID
Method to obtain a cinema by its UUID- Parameters:
cinemaUUID- is the target cinema's UUID- Returns:
- The target
Cinema
-