All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.tmdb.model.MovieDb Maven / Gradle / Ivy

package com.github.tmdb.model;

import java.util.List;
import org.apache.log4j.Logger;
import org.codehaus.jackson.annotate.JsonAnySetter;
import org.codehaus.jackson.annotate.JsonProperty;

public class MovieDb {

    /*
     * Logger
     */
    private static final Logger LOGGER = Logger.getLogger(MovieDb.class);
    /*
     * Properties
     */
    @JsonProperty(("backdrop_path"))
    private String backdropPath;
    @JsonProperty(("id"))
    private int id;
    @JsonProperty(("original_title"))
    private String originalTitle;
    @JsonProperty(("popularity"))
    private float popularity;
    @JsonProperty(("poster_path"))
    private String posterPath;
    @JsonProperty(("release_date"))
    private String releaseDate;
    @JsonProperty(("title"))
    private String title;
    @JsonProperty("adult")
    private boolean adult;
    @JsonProperty("belongs_to_collection")
    private Collection belongsToCollection;
    @JsonProperty("budget")
    private long budget;
    @JsonProperty("genres")
    private List genres;
    @JsonProperty("homepage")
    private String homepage;
    @JsonProperty("imdb_id")
    private String imdbID;
    @JsonProperty("overview")
    private String overview;
    @JsonProperty("production_companies")
    private List productionCompanies;
    @JsonProperty("production_countries")
    private List productionCountries;
    @JsonProperty("revenue")
    private long revenue;
    @JsonProperty("runtime")
    private int runtime;
    @JsonProperty("spoken_languages")
    private List spokenLanguages;
    @JsonProperty("tagline")
    private String tagline;
    @JsonProperty("vote_average")
    private float voteAverage;
    @JsonProperty("vote_count")
    private int voteCount;

    // 
    public String getBackdropPath() {
        return backdropPath;
    }

    public int getId() {
        return id;
    }

    public String getOriginalTitle() {
        return originalTitle;
    }

    public float getPopularity() {
        return popularity;
    }

    public String getPosterPath() {
        return posterPath;
    }

    public String getReleaseDate() {
        return releaseDate;
    }

    public String getTitle() {
        return title;
    }

    public boolean isAdult() {
        return adult;
    }

    public Collection getBelongsToCollection() {
        return belongsToCollection;
    }

    public long getBudget() {
        return budget;
    }

    public List getGenres() {
        return genres;
    }

    public String getHomepage() {
        return homepage;
    }

    public String getImdbID() {
        return imdbID;
    }

    public String getOverview() {
        return overview;
    }

    public List getProductionCompanies() {
        return productionCompanies;
    }

    public List getProductionCountries() {
        return productionCountries;
    }

    public long getRevenue() {
        return revenue;
    }

    public int getRuntime() {
        return runtime;
    }

    public List getSpokenLanguages() {
        return spokenLanguages;
    }

    public String getTagline() {
        return tagline;
    }

    public float getVoteAverage() {
        return voteAverage;
    }

    public int getVoteCount() {
        return voteCount;
    }
    // 

    // 
    public void setBackdropPath(String backdropPath) {
        this.backdropPath = backdropPath;
    }

    public void setId(int id) {
        this.id = id;
    }

    public void setOriginalTitle(String originalTitle) {
        this.originalTitle = originalTitle;
    }

    public void setPopularity(float popularity) {
        this.popularity = popularity;
    }

    public void setPosterPath(String posterPath) {
        this.posterPath = posterPath;
    }

    public void setReleaseDate(String releaseDate) {
        this.releaseDate = releaseDate;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public void setAdult(boolean adult) {
        this.adult = adult;
    }

    public void setBelongsToCollection(Collection belongsToCollection) {
        this.belongsToCollection = belongsToCollection;
    }

    public void setBudget(long budget) {
        this.budget = budget;
    }

    public void setGenres(List genres) {
        this.genres = genres;
    }

    public void setHomepage(String homepage) {
        this.homepage = homepage;
    }

    public void setImdbID(String imdbID) {
        this.imdbID = imdbID;
    }

    public void setOverview(String overview) {
        this.overview = overview;
    }

    public void setProductionCompanies(List productionCompanies) {
        this.productionCompanies = productionCompanies;
    }

    public void setProductionCountries(List productionCountries) {
        this.productionCountries = productionCountries;
    }

    public void setRevenue(long revenue) {
        this.revenue = revenue;
    }

    public void setRuntime(int runtime) {
        this.runtime = runtime;
    }

    public void setSpokenLanguages(List spokenLanguages) {
        this.spokenLanguages = spokenLanguages;
    }

    public void setTagline(String tagline) {
        this.tagline = tagline;
    }

    public void setVoteAverage(float voteAverage) {
        this.voteAverage = voteAverage;
    }

    public void setVoteCount(int voteCount) {
        this.voteCount = voteCount;
    }
    // 

    /**
     * Handle unknown properties and print a message
     *
     * @param key
     * @param value
     */
    @JsonAnySetter
    public void handleUnknown(String key, Object value) {
        StringBuilder sb = new StringBuilder();
        sb.append("Unknown property: '").append(key);
        sb.append("' value: '").append(value).append("'");
        LOGGER.warn(sb.toString());
    }

    //
    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final MovieDb other = (MovieDb) obj;
        if (this.id != other.id) {
            return false;
        }
        if ((this.imdbID == null) ? (other.imdbID != null) : !this.imdbID.equals(other.imdbID)) {
            return false;
        }
        if (this.runtime != other.runtime) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        int hash = 5;
        hash = 89 * hash + this.id;
        hash = 89 * hash + (this.imdbID != null ? this.imdbID.hashCode() : 0);
        hash = 89 * hash + this.runtime;
        return hash;
    }
    //

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder("[MovieDB=");
        sb.append("[backdropPath=").append(backdropPath);
        sb.append("],[id=").append(id);
        sb.append("],[originalTitle=").append(originalTitle);
        sb.append("],[popularity=").append(popularity);
        sb.append("],[posterPath=").append(posterPath);
        sb.append("],[releaseDate=").append(releaseDate);
        sb.append("],[title=").append(title);
        sb.append("],[adult=").append(adult);
        sb.append("],[belongsToCollection=").append(belongsToCollection);
        sb.append("],[budget=").append(budget);
        sb.append("],[genres=").append(genres);
        sb.append("],[homepage=").append(homepage);
        sb.append("],[imdbID=").append(imdbID);
        sb.append("],[overview=").append(overview);
        sb.append("],[productionCompanies=").append(productionCompanies);
        sb.append("],[productionCountries=").append(productionCountries);
        sb.append("],[revenue=").append(revenue);
        sb.append("],[runtime=").append(runtime);
        sb.append("],[spokenLanguages=").append(spokenLanguages);
        sb.append("],[tagline=").append(tagline);
        sb.append("],[voteAverage=").append(voteAverage);
        sb.append("],[voteCount=").append(voteCount);
        sb.append("]]");
        return sb.toString();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy