Package moblima.control.handlers
Class MovieHandler
java.lang.Object
moblima.control.handlers.MovieHandler
- Direct Known Subclasses:
- ReviewHandler
The type Movie handler.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionThe Movies.protected intThe Selected movie idx.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionintaddMovie(int id, String title, String synopsis, String director, List<String> castList, int runtime, LocalDate releaseDate, boolean isBlockbuster, Movie.ShowStatus showStatus, Movie.ContentRating contentRating, int overallRating) Add movie int.getMovie(int movieIdx) Gets movie.intgetMovieIdx(int movieId) Gets movie idx.Gets movies.getMovies(Movie.ShowStatus showStatus) Gets movies.Gets selected movie.voidPrint movies.voidprintMovies(List<Movie> movies) Print movies.booleanremoveMovie(int movieIdx) Remove movie boolean.protected booleanSave movies boolean.voidsetSelectedMovieIdx(int movieIdx) Sets selected movie idx.booleanupdateMovie(String title, String synopsis, String director, List<String> castList, int runtime, LocalDate releaseDate, boolean isBlockbuster, Movie.ShowStatus showStatus, Movie.ContentRating contentRating, double overallRating) Update movie boolean.booleanupdateMovieRating(int movieId, double overallRating) Update movie rating boolean.
- 
Field Details- 
moviesThe Movies.
- 
selectedMovieIdxprotected int selectedMovieIdxThe Selected movie idx.
 
- 
- 
Constructor Details- 
MovieHandlerpublic MovieHandler()Instantiates a new Movie handler.
 
- 
- 
Method Details- 
getSelectedMovieGets selected movie.- Returns:
- the selected movie
 
- 
setSelectedMovieIdxpublic void setSelectedMovieIdx(int movieIdx) Sets selected movie idx.- Parameters:
- movieIdx- the movie idx
 
- 
getMovieGets movie.- Parameters:
- movieIdx- the movie idx
- Returns:
- the movie
 
- 
getMovieIdxpublic int getMovieIdx(int movieId) Gets movie idx.- Parameters:
- movieId- the movie id
- Returns:
- the movie idx
 
- 
updateMovieRatingpublic boolean updateMovieRating(int movieId, double overallRating) Update movie rating boolean.- Parameters:
- movieId- the movie id
- overallRating- the overall rating
- Returns:
- the boolean
 
- 
getMoviesGets movies.- Returns:
- the movies
 
- 
getMoviesGets movies.- Parameters:
- showStatus- the show status
- Returns:
- the movies
 
- 
addMoviepublic int addMovie(int id, String title, String synopsis, String director, List<String> castList, int runtime, LocalDate releaseDate, boolean isBlockbuster, Movie.ShowStatus showStatus, Movie.ContentRating contentRating, int overallRating) Add movie int.- Parameters:
- id- the id
- title- the title
- synopsis- the synopsis
- director- the director
- castList- the cast list
- runtime- the runtime
- releaseDate- the release date
- isBlockbuster- the is blockbuster
- showStatus- the show status
- contentRating- the content rating
- overallRating- the overall rating
- Returns:
- the int
 
- 
updateMoviepublic boolean updateMovie(String title, String synopsis, String director, List<String> castList, int runtime, LocalDate releaseDate, boolean isBlockbuster, Movie.ShowStatus showStatus, Movie.ContentRating contentRating, double overallRating) Update movie boolean.- Parameters:
- title- the title
- synopsis- the synopsis
- director- the director
- castList- the cast list
- runtime- the runtime
- releaseDate- the release date
- isBlockbuster- the is blockbuster
- showStatus- the show status
- contentRating- the content rating
- overallRating- the overall rating
- Returns:
- the boolean
 
- 
removeMoviepublic boolean removeMovie(int movieIdx) Remove movie boolean.- Parameters:
- movieIdx- the movie idx
- Returns:
- the boolean
 
- 
printMoviespublic void printMovies()Print movies.
- 
printMoviesPrint movies.- Parameters:
- movies- the movies
 
- 
saveMoviesprotected boolean saveMovies()Save movies boolean.- Returns:
- the boolean
 
 
-