merge completed assignment into main #1
@@ -1,11 +1,9 @@
|
|||||||
package movie.apis;
|
package movie.apis;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
* Model class representing a movie
|
|
||||||
* Fields: id, title, genres, images
|
|
||||||
*/
|
|
||||||
public class Movie {
|
public class Movie {
|
||||||
|
|
||||||
private Long id;
|
private Long id;
|
||||||
@@ -13,12 +11,92 @@ public class Movie {
|
|||||||
private List<String> genres;
|
private List<String> genres;
|
||||||
private List<String> images;
|
private List<String> images;
|
||||||
private String year;
|
private String year;
|
||||||
|
private String released;
|
||||||
|
private String imdb_id;
|
||||||
|
private String imdb_votes;
|
||||||
private String imdb_rating;
|
private String imdb_rating;
|
||||||
|
private String meta_score;
|
||||||
private String country;
|
private String country;
|
||||||
|
private String actors;
|
||||||
|
private String director;
|
||||||
|
private String writer;
|
||||||
|
private String awards;
|
||||||
|
private String plot;
|
||||||
|
private String rated;
|
||||||
|
private String runtime;
|
||||||
|
private String type;
|
||||||
|
|
||||||
// TODO: Create a constructor with all fields
|
public Movie(Long id, String title, List<String> genres, List<String> images, String year, String released, String imdb_id,
|
||||||
|
String imdb_votes, String imdb_rating, String country, String actors, String director, String writer, String awards,
|
||||||
|
String plot, String rated, String runtime, String type) {
|
||||||
|
|
||||||
// TODO: Create a simple constructor with id and title only
|
this(id, title, genres, images, year, imdb_rating, country);
|
||||||
|
this.released = released;
|
||||||
|
this.imdb_id = imdb_id;
|
||||||
|
this.imdb_votes = imdb_votes;
|
||||||
|
this.actors = actors;
|
||||||
|
this.director = director;
|
||||||
|
this.writer = writer;
|
||||||
|
this.awards = awards;
|
||||||
|
this.plot = plot;
|
||||||
|
this.rated = rated;
|
||||||
|
this.runtime = runtime;
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
// TODO: Create getters and setters for all fields
|
public Movie(Long id, String title, List<String> genres, List<String> images, String year, String imdb_rating, String country) {
|
||||||
|
this(id, title);
|
||||||
|
this.genres = genres;
|
||||||
|
this.images = images;
|
||||||
|
this.year = year;
|
||||||
|
this.imdb_rating = imdb_rating;
|
||||||
|
this.country = country;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Movie(Long id, String title) {
|
||||||
|
this.id = id;
|
||||||
|
this.title = title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Movie() {}
|
||||||
|
|
||||||
|
public void setId(Long id) {this.id = id;}
|
||||||
|
public void setTitle(String title) {this.title = title;}
|
||||||
|
public void setGenres(List<String> genres) {this.genres = genres;}
|
||||||
|
public void setImages(List<String> images) {this.images = images;}
|
||||||
|
public void setYear(String year) {this.year = year;}
|
||||||
|
public void setCountry(String country) {this.country = country;}
|
||||||
|
public void setImdb_rating(String imdb_rating) {this.imdb_rating = imdb_rating;}
|
||||||
|
public void setActors(String actors) {this.actors = actors;}
|
||||||
|
public void setAwards(String awards) {this.awards = awards;}
|
||||||
|
public void setDirector(String director) {this.director = director;}
|
||||||
|
public void setImdb_id(String imdb_id) {this.imdb_id = imdb_id;}
|
||||||
|
public void setImdb_votes(String imdb_votes) {this.imdb_votes = imdb_votes;}
|
||||||
|
public void setMeta_score(String meta_score) {this.meta_score = meta_score;}
|
||||||
|
public void setPlot(String plot) {this.plot = plot;}
|
||||||
|
public void setRated(String rated) {this.rated = rated;}
|
||||||
|
public void setReleased(String released) {this.released = released;}
|
||||||
|
public void setRuntime(String runtime) {this.runtime = runtime;}
|
||||||
|
public void setType(String type) {this.type = type;}
|
||||||
|
public void setWriter(String writer) {this.writer = writer;}
|
||||||
|
|
||||||
|
public Long getId() {return id;}
|
||||||
|
public String getTitle() {return title;}
|
||||||
|
public List<String> getGenres() {return genres;}
|
||||||
|
public List<String> getImages() {return images;}
|
||||||
|
public String getYear() {return year;}
|
||||||
|
public String getCountry() {return country;}
|
||||||
|
public String getImdb_rating() {return imdb_rating;}
|
||||||
|
public String getActors() {return actors;}
|
||||||
|
public String getImdb_id() {return imdb_id;}
|
||||||
|
public String getDirector() {return director;}
|
||||||
|
public String getImdb_votes() {return imdb_votes;}
|
||||||
|
public String getAwards() {return awards;}
|
||||||
|
public String getMeta_score() {return meta_score;}
|
||||||
|
public String getPlot() {return plot;}
|
||||||
|
public String getRated() {return rated;}
|
||||||
|
public String getReleased() {return released;}
|
||||||
|
public String getRuntime() {return runtime;}
|
||||||
|
public String getType() {return type;}
|
||||||
|
public String getWriter() {return writer;}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user