| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| Schema |
|
| 1.0;1 |
| 1 | package org.jtheque.core.managers.schema; | |
| 2 | ||
| 3 | import org.jtheque.utils.bean.Version; | |
| 4 | ||
| 5 | /* | |
| 6 | * This file is part of JTheque. | |
| 7 | * | |
| 8 | * JTheque is free software: you can redistribute it and/or modify | |
| 9 | * it under the terms of the GNU General Public License as published by | |
| 10 | * the Free Software Foundation, either version 3 of the License. | |
| 11 | * | |
| 12 | * JTheque is distributed in the hope that it will be useful, | |
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 15 | * GNU General Public License for more details. | |
| 16 | * | |
| 17 | * You should have received a copy of the GNU General Public License | |
| 18 | * along with JTheque. If not, see <http://www.gnu.org/licenses/>. | |
| 19 | */ | |
| 20 | ||
| 21 | /** | |
| 22 | * A Schema of database. | |
| 23 | * | |
| 24 | * @author Baptiste Wicht | |
| 25 | */ | |
| 26 | public interface Schema extends Comparable<Schema> { | |
| 27 | /** | |
| 28 | * Return the version of the schema. | |
| 29 | * | |
| 30 | * @return The version of the schema. | |
| 31 | * @see Version | |
| 32 | */ | |
| 33 | Version getVersion(); | |
| 34 | ||
| 35 | /** | |
| 36 | * Return the name of the schema. | |
| 37 | * | |
| 38 | * @return The name of the schema. | |
| 39 | */ | |
| 40 | String getId(); | |
| 41 | ||
| 42 | /** | |
| 43 | * Return all the dependencies of the schema. | |
| 44 | * | |
| 45 | * @return An array containing all the dependencies of the schema. | |
| 46 | */ | |
| 47 | String[] getDependencies(); | |
| 48 | ||
| 49 | /** | |
| 50 | * Install the schema. It seems nothing was already installed. | |
| 51 | */ | |
| 52 | void install(); | |
| 53 | ||
| 54 | /** | |
| 55 | * Update the schema from an another version. | |
| 56 | * | |
| 57 | * @param from The installed version. | |
| 58 | * @see Version | |
| 59 | */ | |
| 60 | void update(Version from); | |
| 61 | ||
| 62 | /** | |
| 63 | * Import data from HSQL. | |
| 64 | * | |
| 65 | * @param inserts All the inserts of HSQL. | |
| 66 | * @see Insert | |
| 67 | */ | |
| 68 | void importDataFromHSQL(Iterable<Insert> inserts); | |
| 69 | } |