]> git.mxchange.org Git - jcore.git/blob - src/org/mxchange/jcore/manager/database/ManageableDatabase.java
Added thrown exception (from some method)
[jcore.git] / src / org / mxchange / jcore / manager / database / ManageableDatabase.java
1 /*
2  * Copyright (C) 2015 Roland Haeder
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16  */
17 package org.mxchange.jcore.manager.database;
18
19 import java.io.IOException;
20 import java.lang.reflect.InvocationTargetException;
21 import org.mxchange.jcore.manager.Manageable;
22
23 /**
24  * An interface for managers deligating calls to a database frontend
25  * @author Roland Haeder
26  */
27 public interface ManageableDatabase extends Manageable {
28
29         /**
30          * Getter for size
31          *
32          * @return size of contact "book"
33          * @throws java.io.IOException If an IO error occurs
34          */
35         public int size () throws IOException;
36
37         /**
38          * Getter for column name at given index.
39          *
40          * @param columnIndex Column index
41          * @return Database column name
42          */
43         public String getColumnName (final int columnIndex);
44
45         /**
46          * Getter for translated column name at given index.
47          *
48          * @param columnIndex Column index
49          * @return Human-readable column name
50          */
51         public String getTranslatedColumnName (int columnIndex);
52
53         /**
54          * Somewhat "getter" for value from given row and column index
55          *
56          * @param rowIndex Row index
57          * @param columnIndex Column index
58          * @return Value from given row/column
59          * @throws java.lang.NoSuchMethodException If a non-existing method should be invoked
60          * @throws java.lang.IllegalAccessException If the method cannot be accessed
61          * @throws java.lang.reflect.InvocationTargetException Something other happened?
62          */
63         public Object getValueFromRowColumn (final int rowIndex, final int columnIndex) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException;
64
65         /**
66          * Getter for column count
67          *
68          * @return Column count
69          */
70         public int getColumnCount ();
71 }