Package src.controller
Class CineplexManager
Object
CineplexManager
Controller class for Cineplex which handles all logic related to
Cineplex
- Version:
- 1.0
- Author:
- Lee Juin
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Cineplex
createCineplex
(String cineplexName, int numOfCinemas, ArrayList<Cinema> cinemas, String cineplexLocation) Method to create a cineplex and save to databasefilterCineplexesByMovie
(Movie movie) Method to filter a list of cineplexes by the movie showingfilterCineplexesByMovieSchedule
(MovieSchedule movieSchedule) Method to filter cineplexes by queried movie schedulestatic Cineplex
getCineplexByCinema
(Cinema targetCinema) Method to retrieve a cineplex by the query cinema
-
Constructor Details
-
CineplexManager
public CineplexManager()Constructor
-
-
Method Details
-
createCineplex
public static Cineplex createCineplex(String cineplexName, int numOfCinemas, ArrayList<Cinema> cinemas, String cineplexLocation) Method to create a cineplex and save to database -
getCineplexByCinema
Method to retrieve a cineplex by the query cinema- Parameters:
targetCinema
- is the cinema to query cineplex for- Returns:
- The
Cineplex
instance containing the target cinema
-
filterCineplexesByMovie
Method to filter a list of cineplexes by the movie showing- Parameters:
movie
- is the movie showing to query cineplex for- Returns:
- ArrayList of
Cineplex
instances which are showing the queried movie
-
filterCineplexesByMovieSchedule
Method to filter cineplexes by queried movie schedule- Parameters:
movieSchedule
- is the movie schedule to query the cineplex for- Returns:
- ArrayList of filtered
Cineplex
instances which have cinemas contained in the queried movie schedule
-