| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| IDaoSimpleDatas |
|
| 1.0;1 |
| 1 | package org.jtheque.primary.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.primary.od.able.SimpleData; | |
| 21 | ||
| 22 | import java.util.Collection; | |
| 23 | ||
| 24 | /** | |
| 25 | * A dao for simple data specification. | |
| 26 | * | |
| 27 | * @author Baptiste Wicht | |
| 28 | */ | |
| 29 | public interface IDaoSimpleDatas extends JThequeDao { | |
| 30 | /** | |
| 31 | * Return all the simple datas. | |
| 32 | * | |
| 33 | * @return A Collection containing all the simple datas. | |
| 34 | */ | |
| 35 | Collection<SimpleData> getSimpleDatas(); | |
| 36 | ||
| 37 | /** | |
| 38 | * Return the simple data of the specified id. | |
| 39 | * | |
| 40 | * @param id The id to search. | |
| 41 | * | |
| 42 | * @return The simple data with the specified id. | |
| 43 | */ | |
| 44 | SimpleData getSimpleData(int id); | |
| 45 | ||
| 46 | /** | |
| 47 | * Return the simple data of the specified title. | |
| 48 | * | |
| 49 | * @param title The title to search. | |
| 50 | * | |
| 51 | * @return The simple data with the specified title. | |
| 52 | */ | |
| 53 | SimpleData getSimpleData(String title); | |
| 54 | ||
| 55 | /** | |
| 56 | * Indicate if the simple data exists or not. | |
| 57 | * | |
| 58 | * @param data The data to test for exists or not. | |
| 59 | * | |
| 60 | * @return <code>true</code> if the data exists else <code>false</code>. | |
| 61 | */ | |
| 62 | boolean exist(SimpleData data); | |
| 63 | ||
| 64 | /** | |
| 65 | * Delete the simple data. | |
| 66 | * | |
| 67 | * @param data The simple data to delete. | |
| 68 | * | |
| 69 | * @return <code>true</code> if the data has been deleted else <code>false</code>. | |
| 70 | */ | |
| 71 | boolean delete(SimpleData data); | |
| 72 | ||
| 73 | /** | |
| 74 | * Create the specified simple data. | |
| 75 | * | |
| 76 | * @param data The data to create. | |
| 77 | */ | |
| 78 | void create(SimpleData data); | |
| 79 | ||
| 80 | /** | |
| 81 | * Save the specified data. | |
| 82 | * | |
| 83 | * @param data The data to save. | |
| 84 | */ | |
| 85 | void save(SimpleData data); | |
| 86 | ||
| 87 | /** | |
| 88 | * Create an empty simple data. | |
| 89 | * | |
| 90 | * @return An empty simple data. | |
| 91 | */ | |
| 92 | SimpleData createSimpleData(); | |
| 93 | } |