Complete Home Work 3
This commit is contained in:
@@ -4,7 +4,8 @@ import java.util.List;
|
||||
|
||||
/**
|
||||
* Model class representing a movie
|
||||
* Fields: id, title, genres, images
|
||||
* Fields: id, title, genres, images, year, imdb_rating, country
|
||||
* Bonus fields: actors, awards, director, imdb_id, imdb_votes, metascore, plot, rated, released, runtime, type, writer
|
||||
*/
|
||||
public class Movie {
|
||||
|
||||
@@ -16,9 +17,188 @@ public class Movie {
|
||||
private String imdb_rating;
|
||||
private String country;
|
||||
|
||||
// TODO: Create a constructor with all fields
|
||||
// Bonus fields
|
||||
private String actors;
|
||||
private String awards;
|
||||
private String director;
|
||||
private String imdb_id;
|
||||
private String imdb_votes;
|
||||
private String metascore;
|
||||
private String plot;
|
||||
private String rated;
|
||||
private String released;
|
||||
private String runtime;
|
||||
private String type;
|
||||
private String writer;
|
||||
|
||||
// TODO: Create a simple constructor with id and title only
|
||||
// Constructor with all fields
|
||||
public Movie(Long id, String title, List<String> genres, List<String> images, String year, String imdb_rating, String country) {
|
||||
this.id = id;
|
||||
this.title = title;
|
||||
this.genres = genres;
|
||||
this.images = images;
|
||||
this.year = year;
|
||||
this.imdb_rating = imdb_rating;
|
||||
this.country = country;
|
||||
}
|
||||
|
||||
// TODO: Create getters and setters for all fields
|
||||
}
|
||||
// Simple constructor with id and title only
|
||||
public Movie(Long id, String title) {
|
||||
this.id = id;
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
// Getters and setters for all fields
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public List<String> getGenres() {
|
||||
return genres;
|
||||
}
|
||||
|
||||
public void setGenres(List<String> genres) {
|
||||
this.genres = genres;
|
||||
}
|
||||
|
||||
public List<String> getImages() {
|
||||
return images;
|
||||
}
|
||||
|
||||
public void setImages(List<String> images) {
|
||||
this.images = images;
|
||||
}
|
||||
|
||||
public String getYear() {
|
||||
return year;
|
||||
}
|
||||
|
||||
public void setYear(String year) {
|
||||
this.year = year;
|
||||
}
|
||||
|
||||
public String getImdb_rating() {
|
||||
return imdb_rating;
|
||||
}
|
||||
|
||||
public void setImdb_rating(String imdb_rating) {
|
||||
this.imdb_rating = imdb_rating;
|
||||
}
|
||||
|
||||
public String getCountry() {
|
||||
return country;
|
||||
}
|
||||
|
||||
public void setCountry(String country) {
|
||||
this.country = country;
|
||||
}
|
||||
|
||||
public String getActors() {
|
||||
return actors;
|
||||
}
|
||||
|
||||
public void setActors(String actors) {
|
||||
this.actors = actors;
|
||||
}
|
||||
|
||||
public String getAwards() {
|
||||
return awards;
|
||||
}
|
||||
|
||||
public void setAwards(String awards) {
|
||||
this.awards = awards;
|
||||
}
|
||||
|
||||
public String getDirector() {
|
||||
return director;
|
||||
}
|
||||
|
||||
public void setDirector(String director) {
|
||||
this.director = director;
|
||||
}
|
||||
|
||||
public String getImdb_id() {
|
||||
return imdb_id;
|
||||
}
|
||||
|
||||
public void setImdb_id(String imdb_id) {
|
||||
this.imdb_id = imdb_id;
|
||||
}
|
||||
|
||||
public String getImdb_votes() {
|
||||
return imdb_votes;
|
||||
}
|
||||
|
||||
public void setImdb_votes(String imdb_votes) {
|
||||
this.imdb_votes = imdb_votes;
|
||||
}
|
||||
|
||||
public String getMetascore() {
|
||||
return metascore;
|
||||
}
|
||||
|
||||
public void setMetascore(String metascore) {
|
||||
this.metascore = metascore;
|
||||
}
|
||||
|
||||
public String getPlot() {
|
||||
return plot;
|
||||
}
|
||||
|
||||
public void setPlot(String plot) {
|
||||
this.plot = plot;
|
||||
}
|
||||
|
||||
public String getRated() {
|
||||
return rated;
|
||||
}
|
||||
|
||||
public void setRated(String rated) {
|
||||
this.rated = rated;
|
||||
}
|
||||
|
||||
public String getReleased() {
|
||||
return released;
|
||||
}
|
||||
|
||||
public void setReleased(String released) {
|
||||
this.released = released;
|
||||
}
|
||||
|
||||
public String getRuntime() {
|
||||
return runtime;
|
||||
}
|
||||
|
||||
public void setRuntime(String runtime) {
|
||||
this.runtime = runtime;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getWriter() {
|
||||
return writer;
|
||||
}
|
||||
|
||||
public void setWriter(String writer) {
|
||||
this.writer = writer;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user