Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
Search |
|
| 1.0;1 |
1 | package org.jtheque.films.services.impl.utils.search; | |
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.primary.od.abstraction.Data; | |
20 | ||
21 | import java.util.List; | |
22 | ||
23 | /** | |
24 | * A search. A search contains results of a research and the different parameters of the original research. | |
25 | * | |
26 | * @author Baptiste Wicht | |
27 | * @param <T> The type of the research. | |
28 | */ | |
29 | public interface Search<T extends Data> { | |
30 | /** | |
31 | * Return the results of the research. | |
32 | * | |
33 | * @return The results of the search. | |
34 | */ | |
35 | List<T> getResults(); | |
36 | ||
37 | /** | |
38 | * Set the results of the search. | |
39 | * | |
40 | * @param results The results of the research. | |
41 | */ | |
42 | void setResults(List<T> results); | |
43 | ||
44 | /** | |
45 | * Return the unique result of the search. | |
46 | * | |
47 | * @return The unique result of the search. | |
48 | */ | |
49 | T getResult(); | |
50 | ||
51 | /** | |
52 | * Return the searcher for this research. It seems the object who can effectuate the research with the | |
53 | * parameters contained in the search. | |
54 | * | |
55 | * @return The Searcher. | |
56 | */ | |
57 | Searcher<T> getSearcher(); | |
58 | ||
59 | /** | |
60 | * Set the searcher of the search. | |
61 | * | |
62 | * @param searcher The Searcher. | |
63 | */ | |
64 | void setSearcher(Searcher<T> searcher); | |
65 | ||
66 | /** | |
67 | * Set the result of the search. | |
68 | * | |
69 | * @param result The result. | |
70 | */ | |
71 | void setResult(T result); | |
72 | } |