Created
November 26, 2011 00:45
-
-
Save casidiablo/1394761 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.simpleframework.xml.Default; | |
import org.simpleframework.xml.DefaultType; | |
import org.simpleframework.xml.Element; | |
import org.simpleframework.xml.Root; | |
/** | |
* @author cristian | |
*/ | |
@Root(name = "episode") | |
@Default(DefaultType.FIELD) | |
public class MediaVideo { | |
public static final String HIGH = "high"; | |
public static final String HIGH_MIRROR = "high_mirror"; | |
public static final String LOW = "low"; | |
public static final String LOW_MIRROR = "low_mirror"; | |
@Element(required = false) | |
private Long id; | |
@Element(name = "season") | |
private int season; | |
@Element(name = "episode") | |
private int episode; | |
@Element(data = true, name = "title") | |
private String title; | |
@Element(data = true, name = "summary") | |
private String summary; | |
@Element(data = true, required = false, name = "url") | |
private String url; | |
@Element(required = false, name = "urlHigh") | |
private String urlHigh; | |
@Element(required = false, name = "urlLow") | |
private String urlLow; | |
@Element(required = false, name = "urlHighMirror") | |
private String urlHighMirror; | |
@Element(required = false, name = "urlLowMirror") | |
private String urlLowMirror; | |
@Element(data = true, name = "thumbnail") | |
private String thumbnail; | |
@Element(required = false, data = true, name = "imdb") | |
private String imdb; | |
public long getId() { | |
return id; | |
} | |
public void setId(long id) { | |
this.id = id; | |
} | |
public int getSeason() { | |
return season; | |
} | |
public void setSeason(int season) { | |
this.season = season; | |
} | |
public int getEpisode() { | |
return episode; | |
} | |
public void setEpisode(int episode) { | |
this.episode = episode; | |
} | |
public String getTitle() { | |
return title; | |
} | |
public void setTitle(String title) { | |
this.title = title; | |
} | |
public String getSummary() { | |
return summary; | |
} | |
public void setSummary(String summary) { | |
this.summary = summary; | |
} | |
public String getUrlHigh() { | |
return urlHigh; | |
} | |
public void setUrlHigh(String urlHigh) { | |
this.urlHigh = urlHigh; | |
} | |
public String getUrl() { | |
return url; | |
} | |
public void setUrl(String url) { | |
this.url = url; | |
} | |
public String getUrlLow() { | |
return urlLow; | |
} | |
public void setUrlLow(String urlLow) { | |
this.urlLow = urlLow; | |
} | |
public String getThumbnail() { | |
return thumbnail; | |
} | |
public void setThumbnail(String thumbnail) { | |
this.thumbnail = thumbnail; | |
} | |
public String getImdb() { | |
return imdb; | |
} | |
public void setImdb(String imdb) { | |
this.imdb = imdb; | |
} | |
public String getUrlHighMirror() { | |
return urlHighMirror; | |
} | |
public void setUrlHighMirror(String urlHighMirror) { | |
this.urlHighMirror = urlHighMirror; | |
} | |
public String getUrlLowMirror() { | |
return urlLowMirror; | |
} | |
public void setUrlLowMirror(String urlLowMirror) { | |
this.urlLowMirror = urlLowMirror; | |
} | |
@Override | |
public boolean equals(Object o) { | |
if (this == o) return true; | |
if (o == null || getClass() != o.getClass()) return false; | |
MediaVideo that = (MediaVideo) o; | |
if (episode != that.episode) return false; | |
if (season != that.season) return false; | |
if (id != null ? !id.equals(that.id) : that.id != null) return false; | |
if (imdb != null ? !imdb.equals(that.imdb) : that.imdb != null) return false; | |
if (summary != null ? !summary.equals(that.summary) : that.summary != null) return false; | |
if (thumbnail != null ? !thumbnail.equals(that.thumbnail) : that.thumbnail != null) return false; | |
if (title != null ? !title.equals(that.title) : that.title != null) return false; | |
if (url != null ? !url.equals(that.url) : that.url != null) return false; | |
if (urlHigh != null ? !urlHigh.equals(that.urlHigh) : that.urlHigh != null) return false; | |
if (urlHighMirror != null ? !urlHighMirror.equals(that.urlHighMirror) : that.urlHighMirror != null) | |
return false; | |
if (urlLow != null ? !urlLow.equals(that.urlLow) : that.urlLow != null) return false; | |
if (urlLowMirror != null ? !urlLowMirror.equals(that.urlLowMirror) : that.urlLowMirror != null) return false; | |
return true; | |
} | |
@Override | |
public int hashCode() { | |
int result = id != null ? id.hashCode() : 0; | |
result = 31 * result + season; | |
result = 31 * result + episode; | |
result = 31 * result + (title != null ? title.hashCode() : 0); | |
result = 31 * result + (summary != null ? summary.hashCode() : 0); | |
result = 31 * result + (url != null ? url.hashCode() : 0); | |
result = 31 * result + (urlHigh != null ? urlHigh.hashCode() : 0); | |
result = 31 * result + (urlLow != null ? urlLow.hashCode() : 0); | |
result = 31 * result + (urlHighMirror != null ? urlHighMirror.hashCode() : 0); | |
result = 31 * result + (urlLowMirror != null ? urlLowMirror.hashCode() : 0); | |
result = 31 * result + (thumbnail != null ? thumbnail.hashCode() : 0); | |
result = 31 * result + (imdb != null ? imdb.hashCode() : 0); | |
return result; | |
} | |
@Override | |
public String toString() { | |
return "MediaVideo{" + | |
"id=" + id + | |
", season=" + season + | |
", episode=" + episode + | |
", title='" + title + '\'' + | |
", summary='" + summary + '\'' + | |
", url='" + url + '\'' + | |
", urlHigh='" + urlHigh + '\'' + | |
", urlLow='" + urlLow + '\'' + | |
", urlHighMirror='" + urlHighMirror + '\'' + | |
", urlLowMirror='" + urlLowMirror + '\'' + | |
", thumbnail='" + thumbnail + '\'' + | |
", imdb='" + imdb + '\'' + | |
'}'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment