]> git.mxchange.org Git - jcore.git/blobdiff - src/org/mxchange/jcore/database/backend/DatabaseBackend.java
Added thrown exception (from some method)
[jcore.git] / src / org / mxchange / jcore / database / backend / DatabaseBackend.java
index 3ed3038b8133c60d2cb82fa24b3a2145ed1f49db..a787304317422d9453fccfb8bb84c22f9decd783 100644 (file)
@@ -20,6 +20,7 @@ import java.io.IOException;
 import java.lang.reflect.InvocationTargetException;
 import java.sql.SQLException;
 import java.util.Map;
+import javax.naming.NamingException;
 import org.mxchange.jcore.FrameworkInterface;
 import org.mxchange.jcore.criteria.searchable.SearchableCriteria;
 import org.mxchange.jcore.database.result.Result;
@@ -38,11 +39,13 @@ public interface DatabaseBackend extends FrameworkInterface {
         * Tries a connection to the database
         * 
         * @throws java.sql.SQLException If the connection attempt fails
+        * @throws javax.naming.NamingException May be thrown by a backend implementation
         */
-       public void connectToDatabase () throws SQLException;
+       public void connectToDatabase () throws SQLException, NamingException;
 
        /**
-        * Inserts given dataset instance and returns a Result instance on success
+        * Inserts given dataset instance and returns a Result instance on success.
+        * The callee should not modify any content of the dataset instance.
         *
         * @param dataset A dataset instance
         * @return An instance of Result
@@ -56,6 +59,8 @@ public interface DatabaseBackend extends FrameworkInterface {
         * instance. The result instance then provides methods to iterate over all
         * found entries.
         *
+        * The callee should not modify any content of the criteria instance.
+        *
         * @param critera Search critera
         * @return A result instance
         * @throws java.io.IOException If any IO error occurs
@@ -83,5 +88,5 @@ public interface DatabaseBackend extends FrameworkInterface {
         * @throws java.io.IOException If an IO error occurs
         * @throws java.sql.SQLException If any SQL error occurs
         */
-       public Long getTotalRows () throws IOException, SQLException;
+       public int getTotalRows () throws IOException, SQLException;
 }