Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
IDaoFilms |
|
| 1.0;1 |
1 | package org.jtheque.films.persistence.dao.able; | |
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.managers.persistence.able.JThequeDao; | |
20 | import org.jtheque.films.persistence.od.able.Film; | |
21 | ||
22 | import java.util.Collection; | |
23 | ||
24 | /** | |
25 | * A DAO for films specification. | |
26 | * | |
27 | * @author Baptiste Wicht | |
28 | */ | |
29 | public interface IDaoFilms extends JThequeDao { | |
30 | String TABLE = "T_FILMS"; | |
31 | String ACTORS_FILMS_TABLE = "T_ACTORS_FILMS"; | |
32 | String KINDS_FILMS_TABLE = "T_KINDS_FILMS"; | |
33 | ||
34 | /** | |
35 | * Return all the films of the current collection. | |
36 | * | |
37 | * @return All the films of the current collection. | |
38 | */ | |
39 | Collection<Film> getFilms(); | |
40 | ||
41 | /** | |
42 | * Return the film with the specified id. | |
43 | * | |
44 | * @param id The id of the searched film. | |
45 | * @return The <code>Film</code> with the specified id or <code>null</code> if there is no film with this id. | |
46 | */ | |
47 | Film getFilm(int id); | |
48 | ||
49 | /** | |
50 | * Create the film. | |
51 | * | |
52 | * @param film The film to create. | |
53 | */ | |
54 | void create(Film film); | |
55 | ||
56 | /** | |
57 | * Create all the films in the list. | |
58 | * | |
59 | * @param films The films to create. | |
60 | */ | |
61 | void createAll(Iterable<Film> films); | |
62 | ||
63 | /** | |
64 | * Save the film on the database. | |
65 | * | |
66 | * @param film The film to save. | |
67 | */ | |
68 | void save(Film film); | |
69 | ||
70 | /** | |
71 | * Delete the film. | |
72 | * | |
73 | * @param film The film to delete. | |
74 | * @return true if the object is deleted else false. | |
75 | */ | |
76 | boolean delete(Film film); | |
77 | ||
78 | /** | |
79 | * Create an empty film. | |
80 | * | |
81 | * @return An empty film. | |
82 | */ | |
83 | Film createFilm(); | |
84 | } |