Package src.controller
Class CinemaManager
Object
CinemaManager
Controller class for handling all logic related to
Cinema
- Version:
- 1.0
- Author:
- Lee Juin
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Cinema
createIMaxCinema
(ArrayList<Seat> seats) Method to create aIMaxCinema
instance and save to databasestatic Cinema
createPlatinumCinema
(ArrayList<Seat> seats) Method to create aPlatinumCinema
instance and save to databasestatic Cinema
createStandardCinema
(ArrayList<Seat> seats) Method to create aStandardCinema
instance 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 Cinema
getCinemaByUUID
(String cinemaUUID) Method to obtain a cinema by its UUIDstatic String
getCinemaCode
(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 aPlatinumCinema
instance and save to database -
createStandardCinema
Method to create aStandardCinema
instance and save to database -
createIMaxCinema
Method to create aIMaxCinema
instance 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 theCinemaClass
to querycineplex
- is theCineplex
to query- Returns:
- The filtered ArrayList of
Cinema
instances
-
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
-