View Javadoc
1   /******************************************************************************
2    * TVSeason.java - A season of a TV show
3    * 
4    * BuckoVidLib - The BuckoSoft Video Library
5    * Copyright(c) 2014 - Dick Balaska
6    * 
7    */
8   package com.buckosoft.BuckoVidLib.domain;
9   
10  import com.buckosoft.BuckoVidLib.util.HashCodeUtil;
11  
12  /** A season of a TV show.
13   *
14   * @author dick
15   * @since 2014-10-18
16   */
17  public class TVSeason {
18  	private	int		id;
19  	private	int		hashKey;
20  	private	String	title;
21  	private	int		plexKey;
22  	private	long	addedAt;
23  	private	long	updatedAt;
24  	private	int		episodeCount;
25  	private	int		videoId;
26  
27  	@Override
28  	public int	hashCode() {
29  		int result = HashCodeUtil.SEED;
30  		result = HashCodeUtil.hash(result, title);
31  		result = HashCodeUtil.hash(result, videoId);
32  		result = HashCodeUtil.hash(result, plexKey);
33  		return(result);
34  	}
35  
36  	@Override
37  	public boolean equals(Object other) {
38  		if (this.videoId != ((TVSeason)other).videoId)
39  			return(false);
40  		if (!this.title.equals(((TVSeason)other).title))
41  			return(false);
42  		return(true);
43  	}
44  	
45  	
46  	/**
47  	 * @return the id
48  	 */
49  	public int getId() {
50  		return id;
51  	}
52  
53  	/**
54  	 * @param id the id to set
55  	 */
56  	public void setId(int id) {
57  		this.id = id;
58  	}
59  
60  	/**
61  	 * @return the hashKey
62  	 */
63  	public int getHashKey() {
64  		return hashKey;
65  	}
66  
67  	/**
68  	 * @param hashKey the hashKey to set
69  	 */
70  	public void setHashKey(int hashKey) {
71  		this.hashKey = hashKey;
72  	}
73  
74  	/**
75  	 * @return the title
76  	 */
77  	public String getTitle() {
78  		return title;
79  	}
80  
81  	/**
82  	 * @param title the title to set
83  	 */
84  	public void setTitle(String title) {
85  		this.title = title;
86  	}
87  
88  	/**
89  	 * @return the plexKey
90  	 */
91  	public int getPlexKey() {
92  		return plexKey;
93  	}
94  
95  	/**
96  	 * @param plexKey the plexKey to set
97  	 */
98  	public void setPlexKey(int plexKey) {
99  		this.plexKey = plexKey;
100 	}
101 
102 	/**
103 	 * @return the addedAt
104 	 */
105 	public long getAddedAt() {
106 		return addedAt;
107 	}
108 
109 	/**
110 	 * @param addedAt the addedAt to set
111 	 */
112 	public void setAddedAt(long addedAt) {
113 		this.addedAt = addedAt;
114 	}
115 
116 	/**
117 	 * @return the updatedAt
118 	 */
119 	public long getUpdatedAt() {
120 		return updatedAt;
121 	}
122 
123 	/**
124 	 * @param updatedAt the updatedAt to set
125 	 */
126 	public void setUpdatedAt(long updatedAt) {
127 		this.updatedAt = updatedAt;
128 	}
129 
130 	/** Get the number of shows in this season
131 	 * @return the showCount
132 	 */
133 	public int getEpisodeCount() {
134 		return episodeCount;
135 	}
136 
137 	/**
138 	 * @param showCount the showCount to set
139 	 */
140 	public void setEpisodeCount(int episodeCount) {
141 		this.episodeCount = episodeCount;
142 	}
143 
144 	public int getVideoId() {
145 		return videoId;
146 	}
147 
148 	public void setVideoId(int videoId) {
149 		this.videoId = videoId;
150 	}
151 }