Changed revenue and budget from int to long

master
Omertron 14 years ago
parent bbcecbc85f
commit 2867e14bc4

@ -50,7 +50,7 @@ public class MovieDb {
@JsonProperty("belongs_to_collection") @JsonProperty("belongs_to_collection")
private Collection belongsToCollection; private Collection belongsToCollection;
@JsonProperty("budget") @JsonProperty("budget")
private int budget; private long budget;
@JsonProperty("genres") @JsonProperty("genres")
private List<Genre> genres; private List<Genre> genres;
@JsonProperty("homepage") @JsonProperty("homepage")
@ -64,7 +64,7 @@ public class MovieDb {
@JsonProperty("production_countries") @JsonProperty("production_countries")
private List<ProductionCountry> productionCountries; private List<ProductionCountry> productionCountries;
@JsonProperty("revenue") @JsonProperty("revenue")
private int revenue; private long revenue;
@JsonProperty("runtime") @JsonProperty("runtime")
private int runtime; private int runtime;
@JsonProperty("spoken_languages") @JsonProperty("spoken_languages")
@ -113,7 +113,7 @@ public class MovieDb {
return belongsToCollection; return belongsToCollection;
} }
public int getBudget() { public long getBudget() {
return budget; return budget;
} }
@ -141,7 +141,7 @@ public class MovieDb {
return productionCountries; return productionCountries;
} }
public int getRevenue() { public long getRevenue() {
return revenue; return revenue;
} }
@ -203,7 +203,7 @@ public class MovieDb {
this.belongsToCollection = belongsToCollection; this.belongsToCollection = belongsToCollection;
} }
public void setBudget(int budget) { public void setBudget(long budget) {
this.budget = budget; this.budget = budget;
} }
@ -231,7 +231,7 @@ public class MovieDb {
this.productionCountries = productionCountries; this.productionCountries = productionCountries;
} }
public void setRevenue(int revenue) { public void setRevenue(long revenue) {
this.revenue = revenue; this.revenue = revenue;
} }
@ -276,51 +276,28 @@ public class MovieDb {
if (obj == null) { if (obj == null) {
return false; return false;
} }
if (getClass() != obj.getClass()) { if (getClass() != obj.getClass()) {
return false; return false;
} }
final MovieDb other = (MovieDb) obj; final MovieDb other = (MovieDb) obj;
if (this.id != other.id) { if (this.id != other.id) {
return false; return false;
} }
if ((this.imdbID == null) ? (other.imdbID != null) : !this.imdbID.equals(other.imdbID)) {
// Dirty way of checking that all the fields are the same return false;
if (this.toString().equals(other.toString())) { }
if (this.runtime != other.runtime) {
return false; return false;
} }
return true; return true;
} }
@Override @Override
public int hashCode() { public int hashCode() {
int hash = 3; int hash = 5;
int multiplier = 97; hash = 89 * hash + this.id;
hash = multiplier * hash + (this.backdropPath != null ? this.backdropPath.hashCode() : 0); hash = 89 * hash + (this.imdbID != null ? this.imdbID.hashCode() : 0);
hash = multiplier * hash + this.id; hash = 89 * hash + this.runtime;
hash = multiplier * hash + (this.originalTitle != null ? this.originalTitle.hashCode() : 0);
hash = multiplier * hash + Float.floatToIntBits(this.popularity);
hash = multiplier * hash + (this.posterPath != null ? this.posterPath.hashCode() : 0);
hash = multiplier * hash + (this.releaseDate != null ? this.releaseDate.hashCode() : 0);
hash = multiplier * hash + (this.title != null ? this.title.hashCode() : 0);
hash = multiplier * hash + (this.adult ? 1 : 0);
hash = multiplier * hash + (this.belongsToCollection != null ? this.belongsToCollection.hashCode() : 0);
hash = multiplier * hash + this.budget;
hash = multiplier * hash + (this.genres != null ? this.genres.hashCode() : 0);
hash = multiplier * hash + (this.homepage != null ? this.homepage.hashCode() : 0);
hash = multiplier * hash + (this.imdbID != null ? this.imdbID.hashCode() : 0);
hash = multiplier * hash + (this.overview != null ? this.overview.hashCode() : 0);
hash = multiplier * hash + (this.productionCompanies != null ? this.productionCompanies.hashCode() : 0);
hash = multiplier * hash + (this.productionCountries != null ? this.productionCountries.hashCode() : 0);
hash = multiplier * hash + this.revenue;
hash = multiplier * hash + this.runtime;
hash = multiplier * hash + (this.spokenLanguages != null ? this.spokenLanguages.hashCode() : 0);
hash = multiplier * hash + (this.tagline != null ? this.tagline.hashCode() : 0);
hash = multiplier * hash + Float.floatToIntBits(this.voteAverage);
hash = multiplier * hash + this.voteCount;
return hash; return hash;
} }
//</editor-fold> //</editor-fold>

Loading…
Cancel
Save