]> git.mxchange.org Git - jfinancials-lib.git/blob - src/org/mxchange/addressbook/database/backend/DatabaseBackend.java
Project relocated (a bit better now?) + continued with Swing client
[jfinancials-lib.git] / src / org / mxchange / addressbook / database / backend / DatabaseBackend.java
1 /*\r
2  * Copyright (C) 2015 Roland Haeder\r
3  *\r
4  * This program is free software: you can redistribute it and/or modify\r
5  * it under the terms of the GNU General Public License as published by\r
6  * the Free Software Foundation, either version 3 of the License, or\r
7  * (at your option) any later version.\r
8  *\r
9  * This program is distributed in the hope that it will be useful,\r
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
12  * GNU General Public License for more details.\r
13  *\r
14  * You should have received a copy of the GNU General Public License\r
15  * along with this program.  If not, see <http://www.gnu.org/licenses/>.\r
16  */\r
17 package org.mxchange.addressbook.database.backend;\r
18 \r
19 import java.io.IOException;\r
20 import org.mxchange.addressbook.FrameworkInterface;\r
21 import org.mxchange.addressbook.database.storage.Storeable;\r
22 \r
23 /**\r
24  * A generic interface for database frontends\r
25  * \r
26  * @author Roland Haeder\r
27  */\r
28 public interface DatabaseBackend extends FrameworkInterface {\r
29 \r
30     /**\r
31      * Shuts down this backend\r
32      */\r
33     public void doShutdown ();\r
34 \r
35     /**\r
36      * Rewinds backend\r
37      */\r
38     public void rewind ();\r
39 \r
40     /**\r
41      * Get length of underlaying file\r
42      *\r
43      * @return Length of underlaying file\r
44      */\r
45     public long length ();\r
46 \r
47     /**\r
48      * Stores an object in the database.\r
49      * \r
50      * @param object Object to store in database\r
51      * @throws java.io.IOException From inner class\r
52      */\r
53     public void store (final Storeable object) throws IOException;\r
54 }\r