From 5c6f6fd9b1b270998fa4461ae850d7c906ac166f Mon Sep 17 00:00:00 2001 From: Stuart Boston Date: Wed, 1 Oct 2014 17:05:54 +0100 Subject: [PATCH] Add missing fields to model --- .../omertron/themoviedbapi/model/Artwork.java | 10 ++++ .../omertron/themoviedbapi/model/Person.java | 10 ++++ .../themoviedbapi/model/PersonCast.java | 10 ++++ .../themoviedbapi/model/PersonCredit.java | 60 +++++++++++++++++++ .../themoviedbapi/model/PersonCrew.java | 10 ++++ 5 files changed, 100 insertions(+) diff --git a/src/main/java/com/omertron/themoviedbapi/model/Artwork.java b/src/main/java/com/omertron/themoviedbapi/model/Artwork.java index 0dec9dfdf..96c837139 100644 --- a/src/main/java/com/omertron/themoviedbapi/model/Artwork.java +++ b/src/main/java/com/omertron/themoviedbapi/model/Artwork.java @@ -30,6 +30,8 @@ public class Artwork extends AbstractJsonMapping { private static final long serialVersionUID = 1L; + @JsonProperty("id") + private String id; @JsonProperty("aspect_ratio") private float aspectRatio; @JsonProperty("file_path") @@ -84,6 +86,10 @@ public class Artwork extends AbstractJsonMapping { return flag; } + public String getId() { + return id; + } + public void setArtworkType(ArtworkType artworkType) { this.artworkType = artworkType; } @@ -120,6 +126,10 @@ public class Artwork extends AbstractJsonMapping { this.flag = flag; } + public void setId(String id) { + this.id = id; + } + @Override public boolean equals(Object obj) { if (obj == null) { diff --git a/src/main/java/com/omertron/themoviedbapi/model/Person.java b/src/main/java/com/omertron/themoviedbapi/model/Person.java index 239b0617c..d0dce83cd 100644 --- a/src/main/java/com/omertron/themoviedbapi/model/Person.java +++ b/src/main/java/com/omertron/themoviedbapi/model/Person.java @@ -75,6 +75,8 @@ public class Person extends AbstractJsonMapping { private String imdbId = DEFAULT_STRING; @JsonProperty("popularity") private float popularity = 0.0f; + @JsonProperty("known_for") + private List knownFor; /** * Add a crew member @@ -252,6 +254,14 @@ public class Person extends AbstractJsonMapping { this.popularity = popularity; } + public List getKnownFor() { + return knownFor; + } + + public void setKnownFor(List knownFor) { + this.knownFor = knownFor; + } + @Override public boolean equals(Object obj) { if (obj == null) { diff --git a/src/main/java/com/omertron/themoviedbapi/model/PersonCast.java b/src/main/java/com/omertron/themoviedbapi/model/PersonCast.java index 5814d32b7..daa3c4b8a 100644 --- a/src/main/java/com/omertron/themoviedbapi/model/PersonCast.java +++ b/src/main/java/com/omertron/themoviedbapi/model/PersonCast.java @@ -44,6 +44,8 @@ public class PersonCast extends AbstractJsonMapping { private String profilePath; @JsonProperty("cast_id") private int castId; + @JsonProperty("credit_id") + private String creditId; public String getCharacter() { return character; @@ -93,6 +95,14 @@ public class PersonCast extends AbstractJsonMapping { this.castId = castId; } + public String getCreditId() { + return creditId; + } + + public void setCreditId(String creditId) { + this.creditId = creditId; + } + @Override public boolean equals(Object obj) { if (obj == null) { diff --git a/src/main/java/com/omertron/themoviedbapi/model/PersonCredit.java b/src/main/java/com/omertron/themoviedbapi/model/PersonCredit.java index be5a80edc..d7bb992d9 100644 --- a/src/main/java/com/omertron/themoviedbapi/model/PersonCredit.java +++ b/src/main/java/com/omertron/themoviedbapi/model/PersonCredit.java @@ -40,6 +40,8 @@ public class PersonCredit extends AbstractJsonMapping { private String movieOriginalTitle = DEFAULT_STRING; @JsonProperty("poster_path") private String posterPath = DEFAULT_STRING; + @JsonProperty("backdrop_path") + private String backdropPath = DEFAULT_STRING; @JsonProperty("release_date") private String releaseDate = DEFAULT_STRING; @JsonProperty("title") @@ -50,7 +52,17 @@ public class PersonCredit extends AbstractJsonMapping { private String job = DEFAULT_STRING; @JsonProperty("adult") private String adult = DEFAULT_STRING; + @JsonProperty("credit_id") + private String creditId = DEFAULT_STRING; private PersonType personType = PersonType.PERSON; + @JsonProperty("popularity") + private float popularity; + @JsonProperty("vote_average") + private float voteAverage; + @JsonProperty("vote_count") + private int voteCount; + @JsonProperty("media_type") + private String mediaType; public String getCharacter() { return character; @@ -92,6 +104,10 @@ public class PersonCredit extends AbstractJsonMapping { return adult; } + public String getCreditId() { + return creditId; + } + public void setCharacter(String character) { this.character = StringUtils.trimToEmpty(character); } @@ -131,4 +147,48 @@ public class PersonCredit extends AbstractJsonMapping { public void setAdult(String adult) { this.adult = StringUtils.trimToEmpty(adult); } + + public void setCreditId(String creditId) { + this.creditId = creditId; + } + + public String getBackdropPath() { + return backdropPath; + } + + public void setBackdropPath(String backdropPath) { + this.backdropPath = backdropPath; + } + + public float getPopularity() { + return popularity; + } + + public void setPopularity(float popularity) { + this.popularity = popularity; + } + + public float getVoteAverage() { + return voteAverage; + } + + public void setVoteAverage(float voteAverage) { + this.voteAverage = voteAverage; + } + + public int getVoteCount() { + return voteCount; + } + + public void setVoteCount(int voteCount) { + this.voteCount = voteCount; + } + + public String getMediaType() { + return mediaType; + } + + public void setMediaType(String mediaType) { + this.mediaType = mediaType; + } } diff --git a/src/main/java/com/omertron/themoviedbapi/model/PersonCrew.java b/src/main/java/com/omertron/themoviedbapi/model/PersonCrew.java index 34becf5a4..a5d60f787 100644 --- a/src/main/java/com/omertron/themoviedbapi/model/PersonCrew.java +++ b/src/main/java/com/omertron/themoviedbapi/model/PersonCrew.java @@ -42,6 +42,8 @@ public class PersonCrew extends AbstractJsonMapping { private String name; @JsonProperty("profile_path") private String profilePath; + @JsonProperty("credit_id") + private String creditId; public String getDepartment() { return department; @@ -63,6 +65,14 @@ public class PersonCrew extends AbstractJsonMapping { return profilePath; } + public String getCreditId() { + return creditId; + } + + public void setCreditId(String creditId) { + this.creditId = creditId; + } + public void setDepartment(String department) { this.department = StringUtils.trimToEmpty(department); }