Refactor model layout
parent
dc6a49bc97
commit
110b77d09a
@ -0,0 +1,20 @@
|
||||
package com.omertron.themoviedbapi.model.tv;
|
||||
|
||||
import com.omertron.themoviedbapi.model.AbstractIdName;
|
||||
|
||||
public class AbstractTv extends AbstractIdName {
|
||||
|
||||
// Appendable responses for all tv elements
|
||||
// @JsonProperty("credits")
|
||||
// private Credits credits;
|
||||
|
||||
// @JsonProperty("external_ids")
|
||||
// private ExternalIds externalIds;
|
||||
|
||||
// @JsonProperty("images")
|
||||
// private MovieImages images;
|
||||
|
||||
// @JsonProperty("videos")
|
||||
// private Video.Results videos;
|
||||
|
||||
}
|
||||
@ -0,0 +1,7 @@
|
||||
package com.omertron.themoviedbapi.model.tv;
|
||||
|
||||
import com.omertron.themoviedbapi.model.AbstractIdName;
|
||||
|
||||
public class Network extends AbstractIdName {
|
||||
|
||||
}
|
||||
@ -0,0 +1,89 @@
|
||||
package com.omertron.themoviedbapi.model.tv;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
|
||||
public class TvEpisode extends AbstractTv {
|
||||
|
||||
|
||||
@JsonProperty("overview")
|
||||
private String overview;
|
||||
|
||||
|
||||
@JsonProperty("air_date")
|
||||
private String airDate;
|
||||
|
||||
|
||||
@JsonProperty("episode_number")
|
||||
private int episodeNumber;
|
||||
|
||||
@JsonProperty("still_path")
|
||||
private String stillPath;
|
||||
|
||||
|
||||
@JsonProperty("vote_average")
|
||||
private float voteAverage;
|
||||
|
||||
@JsonProperty("vote_count")
|
||||
private int voteCount;
|
||||
|
||||
|
||||
public String getOverview() {
|
||||
return overview;
|
||||
}
|
||||
|
||||
|
||||
public String getAirDate() {
|
||||
return airDate;
|
||||
}
|
||||
|
||||
|
||||
public int getEpisodeNumber() {
|
||||
return episodeNumber;
|
||||
}
|
||||
|
||||
|
||||
public String getStillPath() {
|
||||
return stillPath;
|
||||
}
|
||||
|
||||
|
||||
public float getVoteAverage() {
|
||||
return voteAverage;
|
||||
}
|
||||
|
||||
|
||||
public int getVoteCount() {
|
||||
return voteCount;
|
||||
}
|
||||
|
||||
|
||||
public void setOverview(String overview) {
|
||||
this.overview = overview;
|
||||
}
|
||||
|
||||
|
||||
public void setAirDate(String airDate) {
|
||||
this.airDate = airDate;
|
||||
}
|
||||
|
||||
|
||||
public void setEpisodeNumber(int episodeNumber) {
|
||||
this.episodeNumber = episodeNumber;
|
||||
}
|
||||
|
||||
|
||||
public void setStillPath(String stillPath) {
|
||||
this.stillPath = stillPath;
|
||||
}
|
||||
|
||||
|
||||
public void setVoteAverage(float voteAverage) {
|
||||
this.voteAverage = voteAverage;
|
||||
}
|
||||
|
||||
|
||||
public void setVoteCount(int voteCount) {
|
||||
this.voteCount = voteCount;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,79 @@
|
||||
package com.omertron.themoviedbapi.model.tv;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public class TvSeason extends AbstractTv {
|
||||
|
||||
|
||||
@JsonProperty("air_date")
|
||||
private String airDate;
|
||||
|
||||
|
||||
@JsonProperty("poster_path")
|
||||
private String posterPath;
|
||||
|
||||
@JsonProperty("season_number")
|
||||
private int seasonNumber;
|
||||
|
||||
|
||||
@JsonProperty("overview")
|
||||
private String overview;
|
||||
|
||||
@JsonProperty("episodes")
|
||||
private List<TvEpisode> episodes;
|
||||
|
||||
|
||||
public String getAirDate() {
|
||||
return airDate;
|
||||
}
|
||||
|
||||
|
||||
public String getPosterPath() {
|
||||
return posterPath;
|
||||
}
|
||||
|
||||
|
||||
public int getSeasonNumber() {
|
||||
return seasonNumber;
|
||||
}
|
||||
|
||||
|
||||
public void setEpisodes(List<TvEpisode> episodes) {
|
||||
this.episodes = episodes;
|
||||
}
|
||||
|
||||
|
||||
public void setAirDate(String airDate) {
|
||||
this.airDate = airDate;
|
||||
}
|
||||
|
||||
|
||||
public void setPosterPath(String posterPath) {
|
||||
this.posterPath = posterPath;
|
||||
}
|
||||
|
||||
|
||||
public void setSeasonNumber(int seasonNumber) {
|
||||
this.seasonNumber = seasonNumber;
|
||||
}
|
||||
|
||||
|
||||
public void setOverview(String overview) {
|
||||
this.overview = overview;
|
||||
}
|
||||
|
||||
|
||||
public List<TvEpisode> getEpisodes() {
|
||||
|
||||
|
||||
return episodes;
|
||||
}
|
||||
|
||||
|
||||
public String getOverview() {
|
||||
return overview;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,146 @@
|
||||
package com.omertron.themoviedbapi.model.tv;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.omertron.themoviedbapi.model.Genre;
|
||||
import com.omertron.themoviedbapi.model.person.Person;
|
||||
import java.util.List;
|
||||
|
||||
public class TvSeries extends AbstractTv {
|
||||
|
||||
@JsonProperty("created_by")
|
||||
private List<Person> createdBy;
|
||||
|
||||
@JsonProperty("episode_run_time")
|
||||
private List<Integer> episodeRuntime;
|
||||
|
||||
@JsonProperty("first_air_date")
|
||||
private String firstAirDate;
|
||||
|
||||
@JsonProperty("last_air_date")
|
||||
private String lastAirDate;
|
||||
|
||||
@JsonProperty("genres")
|
||||
private List<Genre> genres;
|
||||
|
||||
@JsonProperty("homepage")
|
||||
private String homepage;
|
||||
|
||||
@JsonProperty("original_name")
|
||||
private String originalName;
|
||||
|
||||
@JsonProperty("origin_country")
|
||||
private List<String> originCountry;
|
||||
|
||||
@JsonProperty("networks")
|
||||
private List<Network> networks;
|
||||
|
||||
@JsonProperty("overview")
|
||||
private String overview;
|
||||
|
||||
@JsonProperty("popularity")
|
||||
private float popularity;
|
||||
|
||||
@JsonProperty("backdrop_path")
|
||||
private String backdropPath;
|
||||
|
||||
@JsonProperty("poster_path")
|
||||
private String posterPath;
|
||||
|
||||
@JsonProperty("number_of_episodes")
|
||||
private int numberOfEpisodes;
|
||||
|
||||
@JsonProperty("number_of_seasons")
|
||||
private int numberOfSeasons;
|
||||
|
||||
@JsonProperty("seasons")
|
||||
private List<TvSeason> seasons;
|
||||
|
||||
@JsonProperty("vote_average")
|
||||
private float voteAverage;
|
||||
|
||||
@JsonProperty("vote_count")
|
||||
private int voteCount;
|
||||
|
||||
@JsonProperty("status")
|
||||
private String status;
|
||||
|
||||
public List<Person> getCreatedBy() {
|
||||
return createdBy;
|
||||
}
|
||||
|
||||
public List<Integer> getEpisodeRuntime() {
|
||||
return episodeRuntime;
|
||||
}
|
||||
|
||||
public String getFirstAirDate() {
|
||||
return firstAirDate;
|
||||
}
|
||||
|
||||
public String getLastAirDate() {
|
||||
return lastAirDate;
|
||||
}
|
||||
|
||||
public List<Genre> getGenres() {
|
||||
return genres;
|
||||
}
|
||||
|
||||
public String getHomepage() {
|
||||
return homepage;
|
||||
}
|
||||
|
||||
public String getOriginalName() {
|
||||
return originalName;
|
||||
}
|
||||
|
||||
public List<String> getOriginCountry() {
|
||||
return originCountry;
|
||||
}
|
||||
|
||||
public List<Network> getNetworks() {
|
||||
return networks;
|
||||
}
|
||||
|
||||
public String getOverview() {
|
||||
return overview;
|
||||
}
|
||||
|
||||
public float getPopularity() {
|
||||
return popularity;
|
||||
}
|
||||
|
||||
public String getBackdropPath() {
|
||||
return backdropPath;
|
||||
}
|
||||
|
||||
public String getPosterPath() {
|
||||
return posterPath;
|
||||
}
|
||||
|
||||
public int getNumberOfEpisodes() {
|
||||
return numberOfEpisodes;
|
||||
}
|
||||
|
||||
public int getNumberOfSeasons() {
|
||||
return numberOfSeasons;
|
||||
}
|
||||
|
||||
public List<TvSeason> getSeasons() {
|
||||
return seasons;
|
||||
}
|
||||
|
||||
public void setSeasons(List<TvSeason> seasons) {
|
||||
this.seasons = seasons;
|
||||
}
|
||||
|
||||
public float getVoteAverage() {
|
||||
return voteAverage;
|
||||
}
|
||||
|
||||
public int getVoteCount() {
|
||||
return voteCount;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue