Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
Film |
|
| 1.0;1 |
1 | package org.jtheque.films.persistence.od.abstraction; | |
2 | ||
3 | /* | |
4 | * This file is part of JTheque. | |
5 | * | |
6 | * JTheque is free software: you can redistribute it and/or modify | |
7 | * it under the terms of the GNU General Public License as published by | |
8 | * the Free Software Foundation, either version 3 of the License. | |
9 | * | |
10 | * JTheque is distributed in the hope that it will be useful, | |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | * GNU General Public License for more details. | |
14 | * | |
15 | * You should have received a copy of the GNU General Public License | |
16 | * along with JTheque. If not, see <http://www.gnu.org/licenses/>. | |
17 | */ | |
18 | ||
19 | import org.jtheque.core.utils.db.Note; | |
20 | import org.jtheque.films.persistence.od.ActorImpl; | |
21 | import org.jtheque.primary.od.CollectionImpl; | |
22 | import org.jtheque.films.persistence.od.RealizerImpl; | |
23 | import org.jtheque.primary.od.*; | |
24 | import org.jtheque.primary.od.abstraction.Data; | |
25 | import org.jtheque.primary.od.abstraction.Notable; | |
26 | ||
27 | import java.util.HashSet; | |
28 | import java.util.Set; | |
29 | ||
30 | /** | |
31 | * Represents the abstraction of a film. | |
32 | * | |
33 | * @author Baptiste Wicht | |
34 | */ | |
35 | 0 | public abstract class Film extends Data implements Notable { |
36 | /* Param�tres du film */ | |
37 | private CollectionImpl collection; | |
38 | private String title; | |
39 | private TypeImpl type; | |
40 | private RealizerImpl realizer; | |
41 | private LanguageImpl language; | |
42 | private int year; | |
43 | private int duration; | |
44 | private Note note; | |
45 | private LendingImpl lending; | |
46 | private String resume; | |
47 | private String comment; | |
48 | private String image; | |
49 | private String filePath; | |
50 | 0 | private Set<ActorImpl> actors = new HashSet<ActorImpl>(12); |
51 | 0 | private Set<KindImpl> kinds = new HashSet<KindImpl>(5); |
52 | private SagaImpl theSaga; | |
53 | ||
54 | /** | |
55 | * Cette m�thode modifie le titre du film. | |
56 | * | |
57 | * @param title le nouveau titre | |
58 | */ | |
59 | public final void setTitle(String title) { | |
60 | 0 | this.title = title; |
61 | 0 | } |
62 | ||
63 | /** | |
64 | * Cette m�thode retourne le titre du film. | |
65 | * | |
66 | * @return Le titre du film | |
67 | */ | |
68 | public final String getTitle() { | |
69 | 0 | return title; |
70 | } | |
71 | ||
72 | /** | |
73 | * The collection of this film. | |
74 | * | |
75 | * @param collection The collection. | |
76 | */ | |
77 | public final void setTheCollection(CollectionImpl collection) { | |
78 | 0 | this.collection = collection; |
79 | 0 | } |
80 | ||
81 | /** | |
82 | * Cette m�thode retourne le genre du film. | |
83 | * | |
84 | * @return Le genre du film | |
85 | */ | |
86 | public final CollectionImpl getTheCollection() { | |
87 | 0 | return collection; |
88 | } | |
89 | ||
90 | /** | |
91 | * Cette m�thode modifie le type du film. | |
92 | * | |
93 | * @param type le nouveau type du film | |
94 | */ | |
95 | public final void setTheType(TypeImpl type) { | |
96 | 0 | this.type = type; |
97 | 0 | } |
98 | ||
99 | /** | |
100 | * Cette m�thode retourne le type du film. | |
101 | * | |
102 | * @return Le type du film | |
103 | */ | |
104 | public final TypeImpl getTheType() { | |
105 | 0 | return type; |
106 | } | |
107 | ||
108 | /** | |
109 | * Cette m�thode modifie l'ann�e du film. | |
110 | * | |
111 | * @param annee la nouvelle ann�e du film | |
112 | */ | |
113 | public final void setYear(int annee) { | |
114 | 0 | year = annee; |
115 | 0 | } |
116 | ||
117 | /** | |
118 | * Cette m�thode retourne l'ann�e du film. | |
119 | * | |
120 | * @return L'ann�e du film | |
121 | */ | |
122 | public final int getYear() { | |
123 | 0 | return year; |
124 | } | |
125 | ||
126 | /** | |
127 | * Cette m�thode modifie la dur�e du film. | |
128 | * | |
129 | * @param duree la nouvelle dur�e du film | |
130 | */ | |
131 | public final void setDuration(int duree) { | |
132 | 0 | duration = duree; |
133 | 0 | } |
134 | ||
135 | /** | |
136 | * Cette m�thode retourne la dur�e du film. | |
137 | * | |
138 | * @return La dur�e du film | |
139 | */ | |
140 | public final int getDuration() { | |
141 | 0 | return duration; |
142 | } | |
143 | ||
144 | /** | |
145 | * Cette m�thode modifie le r�alisateur du film. | |
146 | * | |
147 | * @param realisateur le nouveau r�alisateur | |
148 | */ | |
149 | public final void setTheRealizer(RealizerImpl realisateur) { | |
150 | 0 | realizer = realisateur; |
151 | 0 | } |
152 | ||
153 | /** | |
154 | * Cette m�thode retourne le r�alisateur du film. | |
155 | * | |
156 | * @return Le r�asaliteur du film | |
157 | */ | |
158 | public final RealizerImpl getTheRealizer() { | |
159 | 0 | return realizer; |
160 | } | |
161 | ||
162 | /** | |
163 | * Cette m�thode modifie la langue du film. | |
164 | * | |
165 | * @param langue la nouvelle langue du film | |
166 | */ | |
167 | public final void setTheLanguage(LanguageImpl langue) { | |
168 | 0 | language = langue; |
169 | 0 | } |
170 | ||
171 | /** | |
172 | * Cette m�thode retourne la langue du film. | |
173 | * | |
174 | * @return La langue du film | |
175 | */ | |
176 | public final LanguageImpl getTheLanguage() { | |
177 | 0 | return language; |
178 | } | |
179 | ||
180 | @Override | |
181 | public final void setNote(Note note) { | |
182 | 0 | this.note = note; |
183 | 0 | } |
184 | ||
185 | @Override | |
186 | public final Note getNote() { | |
187 | 0 | return note; |
188 | } | |
189 | ||
190 | /** | |
191 | * Cette m�thode permet de modifier le commentaire du film. | |
192 | * | |
193 | * @param commentaire Le nouveau commentaire | |
194 | */ | |
195 | public final void setComment(String commentaire) { | |
196 | 0 | comment = commentaire; |
197 | 0 | } |
198 | ||
199 | /** | |
200 | * Cette m�thode retourne le commentaire sur le film. | |
201 | * | |
202 | * @return Le commentaire sur le film | |
203 | */ | |
204 | public final String getComment() { | |
205 | 0 | return comment; |
206 | } | |
207 | ||
208 | /** | |
209 | * Cette m�thode modifie le r�sum� du film. | |
210 | * | |
211 | * @param resume Le nouveau r�sum� | |
212 | */ | |
213 | public final void setResume(String resume) { | |
214 | 0 | this.resume = resume; |
215 | 0 | } |
216 | ||
217 | /** | |
218 | * Cette m�thode retourne le r�sum� du film. | |
219 | * | |
220 | * @return Le r�sum� | |
221 | */ | |
222 | public final String getResume() { | |
223 | 0 | return resume; |
224 | } | |
225 | ||
226 | /** | |
227 | * Cette m�thode modifie le chemin de l'image du film. | |
228 | * | |
229 | * @param imagePath Le nouveau chemin | |
230 | */ | |
231 | public final void setImage(String imagePath) { | |
232 | 0 | image = imagePath; |
233 | 0 | } |
234 | ||
235 | /** | |
236 | * Cette m�thode retourne le chemin vers le film. | |
237 | * | |
238 | * @return Le chemin vers le film | |
239 | */ | |
240 | public final String getImage() { | |
241 | 0 | return image; |
242 | } | |
243 | ||
244 | /** | |
245 | * Return the path to the file. | |
246 | * | |
247 | * @return The path to the file. | |
248 | */ | |
249 | public final String getFilePath() { | |
250 | 0 | return filePath; |
251 | } | |
252 | ||
253 | /** | |
254 | * Set the file path. | |
255 | * | |
256 | * @param filePath The path to the file. | |
257 | */ | |
258 | public final void setFilePath(String filePath) { | |
259 | 0 | this.filePath = filePath; |
260 | 0 | } |
261 | ||
262 | /** | |
263 | * Cette m�thode permet de r�cup�rer la liste des acteurs du film. | |
264 | * | |
265 | * @return La liste des acteurs du film | |
266 | */ | |
267 | public final Set<ActorImpl> getActors() { | |
268 | 0 | return actors; |
269 | } | |
270 | ||
271 | /** | |
272 | * Cette m�thode permet de modifier les acteurs d'un film. | |
273 | * | |
274 | * @param acteurs La nouvelle liste d'acteurs du film | |
275 | */ | |
276 | public final void setActors(Set<ActorImpl> acteurs) { | |
277 | 0 | actors = new HashSet<ActorImpl>(acteurs); |
278 | 0 | } |
279 | ||
280 | /** | |
281 | * Return all the kinds of the film. | |
282 | * | |
283 | * @return A List containing all the kinds of the film. | |
284 | */ | |
285 | public final Set<KindImpl> getKinds() { | |
286 | 0 | return kinds; |
287 | } | |
288 | ||
289 | /** | |
290 | * Set the kinds of the film. | |
291 | * | |
292 | * @param kinds The kinds of the film. | |
293 | */ | |
294 | public final void setKinds(Set<KindImpl> kinds) { | |
295 | 0 | this.kinds = new HashSet<KindImpl>(kinds); |
296 | 0 | } |
297 | ||
298 | /** | |
299 | * Cette m�thode permet de modifier l'emprunt du film. | |
300 | * | |
301 | * @param emprunt Le nouvel emprunt | |
302 | */ | |
303 | public final void setTheLending(LendingImpl emprunt) { | |
304 | 0 | lending = emprunt; |
305 | 0 | } |
306 | ||
307 | /** | |
308 | * Cette m�thode retourne l'emprunt d'un film. | |
309 | * | |
310 | * @return L'emprunt ou null | |
311 | */ | |
312 | public final LendingImpl getTheLending() { | |
313 | 0 | return lending; |
314 | } | |
315 | ||
316 | /** | |
317 | * Return the saga of the film. | |
318 | * | |
319 | * @return The saga of the film. | |
320 | */ | |
321 | public final SagaImpl getTheSaga() { | |
322 | 0 | return theSaga; |
323 | } | |
324 | ||
325 | /** | |
326 | * Set the saga of the film. | |
327 | * | |
328 | * @param theSaga The saga of the film. | |
329 | */ | |
330 | public final void setTheSaga(SagaImpl theSaga) { | |
331 | 0 | this.theSaga = theSaga; |
332 | 0 | } |
333 | } |