]> git.mxchange.org Git - jcore.git/commitdiff
Added new interface for managers that need to access database, maybe later this will...
authorRoland Haeder <roland@mxchange.org>
Fri, 7 Aug 2015 06:31:14 +0000 (08:31 +0200)
committerRoland Haeder <roland@mxchange.org>
Fri, 7 Aug 2015 06:31:14 +0000 (08:31 +0200)
Signed-off-by:Roland Häder <roland@mxchange.org>

src/org/mxchange/jcore/manager/database/ManageableDatabase.java [new file with mode: 0644]

diff --git a/src/org/mxchange/jcore/manager/database/ManageableDatabase.java b/src/org/mxchange/jcore/manager/database/ManageableDatabase.java
new file mode 100644 (file)
index 0000000..483b917
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2015 Roland Haeder
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.jcore.manager.database;
+
+import org.mxchange.jcore.manager.Manageable;
+
+/**
+ * An interface for managers deligating calls to a database frontend
+ * @author Roland Haeder
+ */
+public interface ManageableDatabase extends Manageable {
+
+       /**
+        * Getter for size
+        *
+        * @return size of contact "book"
+        */
+       public int size ();
+
+       /**
+        * Getter for column name at given index.
+        *
+        * @param columnIndex Column index
+        * @return Database column name
+        */
+       public String getColumnName (final int columnIndex);
+
+       /**
+        * Getter for translated column name at given index.
+        *
+        * @param columnIndex Column index
+        * @return Human-readable column name
+        */
+       public String getTranslatedColumnName (int columnIndex);
+
+       /**
+        * Somewhat "getter" for value from given row and column index
+        *
+        * @param rowIndex Row index
+        * @param columnIndex Column index
+        * @return Value from given row/column
+        */
+       public Object getValueFromRowColumn (final int rowIndex, final int columnIndex);
+
+       /**
+        * Getter for column count
+        *
+        * @return Column count
+        */
+       public int getColumnCount ();
+}