2 * Copyright (C) 2015 Roland Haeder
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.
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.
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/>.
17 package org.mxchange.jcore.manager.database;
19 import java.io.IOException;
20 import java.lang.reflect.InvocationTargetException;
21 import org.mxchange.jcore.manager.Manageable;
24 * An interface for managers deligating calls to a database frontend
25 * @author Roland Haeder
27 public interface ManageableDatabase extends Manageable {
32 * @return size of contact "book"
33 * @throws java.io.IOException If an IO error occurs
35 public int size () throws IOException;
38 * Getter for column name at given index.
40 * @param columnIndex Column index
41 * @return Database column name
43 public String getColumnName (final int columnIndex);
46 * Getter for translated column name at given index.
48 * @param columnIndex Column index
49 * @return Human-readable column name
51 public String getTranslatedColumnName (int columnIndex);
54 * Somewhat "getter" for value from given row and column index
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?
63 public Object getValueFromRowColumn (final int rowIndex, final int columnIndex) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException;
66 * Getter for column count
68 * @return Column count
70 public int getColumnCount ();