| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| ISimpleDataService |
|
| 1.0;1 |
| 1 | package org.jtheque.primary.services.able; | |
| 2 | ||
| 3 | import org.jtheque.core.managers.persistence.able.DataContainer; | |
| 4 | import org.jtheque.primary.od.able.SimpleData; | |
| 5 | ||
| 6 | /* | |
| 7 | * This file is part of JTheque. | |
| 8 | * | |
| 9 | * JTheque is free software: you can redistribute it and/or modify | |
| 10 | * it under the terms of the GNU General Public License as published by | |
| 11 | * the Free Software Foundation, either version 3 of the License. | |
| 12 | * | |
| 13 | * JTheque is distributed in the hope that it will be useful, | |
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 16 | * GNU General Public License for more details. | |
| 17 | * | |
| 18 | * You should have received a copy of the GNU General Public License | |
| 19 | * along with JTheque. If not, see <http://www.gnu.org/licenses/>. | |
| 20 | */ | |
| 21 | ||
| 22 | /** | |
| 23 | * A countries service specification. | |
| 24 | * | |
| 25 | * @author Baptiste Wicht | |
| 26 | */ | |
| 27 | public interface ISimpleDataService extends DataContainer<SimpleData>, DataService<SimpleData> { | |
| 28 | String DATA_TYPE = "SimpleDatas"; | |
| 29 | ||
| 30 | /** | |
| 31 | * Return the simple data of the specified name. | |
| 32 | * | |
| 33 | * @param name The name to search. | |
| 34 | * | |
| 35 | * @return The simple data of the specified name if there is one else null. | |
| 36 | */ | |
| 37 | SimpleData getSimpleData(String name); | |
| 38 | ||
| 39 | /** | |
| 40 | * Create all the simple datas. | |
| 41 | * | |
| 42 | * @param datas The simple datas to create. | |
| 43 | */ | |
| 44 | void createAll(Iterable<SimpleData> datas); | |
| 45 | ||
| 46 | /** | |
| 47 | * Indicate if the specified simple data exists. | |
| 48 | * | |
| 49 | * @param data The simple data to test. | |
| 50 | * | |
| 51 | * @return <code>true</code> if the data exists else <code>false</code>. | |
| 52 | */ | |
| 53 | boolean exist(SimpleData data); | |
| 54 | ||
| 55 | /** | |
| 56 | * Return an empty simple data. | |
| 57 | * | |
| 58 | * @return An empty simple data. | |
| 59 | */ | |
| 60 | SimpleData getEmptySimpleData(); | |
| 61 | ||
| 62 | /** | |
| 63 | * Return the default simple data. | |
| 64 | * | |
| 65 | * @return The default simple data. | |
| 66 | */ | |
| 67 | SimpleData getDefaultSimpleData(); | |
| 68 | ||
| 69 | /** | |
| 70 | * Test if a simple data exists with the specified name or not. | |
| 71 | * | |
| 72 | * @param name The name to search for. | |
| 73 | * | |
| 74 | * @return <code>true</code> if a data exists else <code>false</code>. | |
| 75 | */ | |
| 76 | boolean exist(String name); | |
| 77 | ||
| 78 | /** | |
| 79 | * Indicate if there is no datas. | |
| 80 | * | |
| 81 | * @return <code>true</code> if there is no datas else <code>false</code>. | |
| 82 | */ | |
| 83 | boolean hasNoDatas(); | |
| 84 | } |