| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| IDaoCollections |
|
| 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.Collection; | |
| 21 | ||
| 22 | /** | |
| 23 | * A DAO for collections specification. | |
| 24 | * | |
| 25 | * @author Baptiste Wicht | |
| 26 | */ | |
| 27 | public interface IDaoCollections extends JThequeDao { | |
| 28 | String TABLE = "T_COLLECTIONS"; | |
| 29 | ||
| 30 | /** | |
| 31 | * Return the collections. | |
| 32 | * | |
| 33 | * @return All the collections. | |
| 34 | */ | |
| 35 | java.util.Collection<Collection> getCollections(); | |
| 36 | ||
| 37 | /** | |
| 38 | * Return the collection with the specific ID. | |
| 39 | * | |
| 40 | * @param id The searched ID. | |
| 41 | * | |
| 42 | * @return The corresponding collection. | |
| 43 | */ | |
| 44 | Collection getCollection(int id); | |
| 45 | ||
| 46 | /** | |
| 47 | * Return the collection of the specified name. | |
| 48 | * | |
| 49 | * @param name The name of the collection. | |
| 50 | * | |
| 51 | * @return The <code>Collection</code> with the specified name or <code>null</code> if there is no collection with this name. | |
| 52 | */ | |
| 53 | Collection getCollection(String name); | |
| 54 | ||
| 55 | /** | |
| 56 | * Create a new collection. | |
| 57 | * | |
| 58 | * @param collection The collection to create. | |
| 59 | */ | |
| 60 | void create(Collection collection); | |
| 61 | ||
| 62 | /** | |
| 63 | * Return the current collection. | |
| 64 | * | |
| 65 | * @return The current collection. | |
| 66 | */ | |
| 67 | Collection getCurrentCollection(); | |
| 68 | ||
| 69 | /** | |
| 70 | * Set the current collection. | |
| 71 | * | |
| 72 | * @param collection The current collection to set. | |
| 73 | */ | |
| 74 | void setCurrentCollection(Collection collection); | |
| 75 | ||
| 76 | /** | |
| 77 | * Create a new <code>Collection</code>. | |
| 78 | * | |
| 79 | * @return The created <code>Collection</code>. | |
| 80 | */ | |
| 81 | Collection createCollection(); | |
| 82 | } |