From a0b5d7b4527c85fe6a338f7eb147a17ea3c9a372 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Fri, 14 Aug 2015 21:31:49 +0200 Subject: [PATCH] =?utf8?q?Also=20added=20here=20missing=20thrown=20excepti?= =?utf8?q?ons=20Signed-off-by:Roland=20H=C3=A4der=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../AddressbookContactDatabaseFrontend.java | 11 ++++++++--- .../contact/AddressbookContactFrontend.java | 16 ++++++++++++++-- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/Addressbook/src/org/mxchange/addressbook/database/frontend/contact/AddressbookContactDatabaseFrontend.java b/Addressbook/src/org/mxchange/addressbook/database/frontend/contact/AddressbookContactDatabaseFrontend.java index cc08842..48f8bbe 100644 --- a/Addressbook/src/org/mxchange/addressbook/database/frontend/contact/AddressbookContactDatabaseFrontend.java +++ b/Addressbook/src/org/mxchange/addressbook/database/frontend/contact/AddressbookContactDatabaseFrontend.java @@ -17,6 +17,7 @@ package org.mxchange.addressbook.database.frontend.contact; import java.io.IOException; +import java.lang.reflect.InvocationTargetException; import java.sql.SQLException; import java.text.MessageFormat; import java.util.Iterator; @@ -34,6 +35,7 @@ import org.mxchange.jcore.database.frontend.BaseDatabaseFrontend; import org.mxchange.jcore.database.result.Result; import org.mxchange.jcore.database.storage.Storeable; import org.mxchange.jcore.exceptions.BadTokenException; +import org.mxchange.jcore.exceptions.CorruptedDatabaseFileException; import org.mxchange.jcore.exceptions.UnsupportedDatabaseBackendException; /** @@ -233,11 +235,14 @@ public class AddressbookContactDatabaseFrontend extends BaseDatabaseFrontend imp * Checks whether own contact is found in database * * @return Whether own contact is found - * @throws java.io.IOException If any IO error occurs - * @throws org.mxchange.jcore.exceptions.BadTokenException If a bad token was found + * @throws org.mxchange.jcore.exceptions.BadTokenException Continued throw + * @throws org.mxchange.jcore.exceptions.CorruptedDatabaseFileException If the database file is damaged + * @throws java.lang.NoSuchMethodException If a method cannot be found + * @throws java.lang.IllegalAccessException If a method is not accessible + * @throws java.lang.reflect.InvocationTargetException Any other problems? */ @Override - public boolean isOwnContactFound () throws SQLException, IOException, BadTokenException { + public boolean isOwnContactFound () throws SQLException, IOException, BadTokenException, CorruptedDatabaseFileException, NoSuchMethodException, IllegalAccessException, InvocationTargetException { // Get search criteria instance SearchableCritera critera = new SearchCriteria(); diff --git a/Addressbook/src/org/mxchange/addressbook/database/frontend/contact/AddressbookContactFrontend.java b/Addressbook/src/org/mxchange/addressbook/database/frontend/contact/AddressbookContactFrontend.java index 9e7e83f..213575e 100644 --- a/Addressbook/src/org/mxchange/addressbook/database/frontend/contact/AddressbookContactFrontend.java +++ b/Addressbook/src/org/mxchange/addressbook/database/frontend/contact/AddressbookContactFrontend.java @@ -17,11 +17,13 @@ package org.mxchange.addressbook.database.frontend.contact; import java.io.IOException; +import java.lang.reflect.InvocationTargetException; import java.sql.SQLException; import org.mxchange.addressbook.exceptions.ContactAlreadyAddedException; import org.mxchange.jcore.contact.Contact; import org.mxchange.jcore.database.frontend.DatabaseFrontend; import org.mxchange.jcore.exceptions.BadTokenException; +import org.mxchange.jcore.exceptions.CorruptedDatabaseFileException; /** * An interface for addressbook contact database frontends @@ -51,9 +53,15 @@ public interface AddressbookContactFrontend extends DatabaseFrontend { * * @param contact Contact instance to check * @return Whether the given Contact instance is found + * @throws java.sql.SQLException If an SQL error occurs + * @throws java.io.IOException If an IO error occurs * @throws org.mxchange.jcore.exceptions.BadTokenException Continued throw + * @throws org.mxchange.jcore.exceptions.CorruptedDatabaseFileException If the database file is damaged + * @throws java.lang.NoSuchMethodException If a method cannot be found + * @throws java.lang.IllegalAccessException If a method is not accessible + * @throws java.lang.reflect.InvocationTargetException Any other problems? */ - public boolean isContactFound (final Contact contact) throws BadTokenException; + public boolean isContactFound (final Contact contact) throws SQLException, IOException, BadTokenException, CorruptedDatabaseFileException, NoSuchMethodException, IllegalAccessException, InvocationTargetException; /** * Some "getter" for own contact instance @@ -69,8 +77,12 @@ public interface AddressbookContactFrontend extends DatabaseFrontend { * @throws java.sql.SQLException If any SQL error occurs * @throws java.io.IOException If an IO error occurs * @throws org.mxchange.jcore.exceptions.BadTokenException If a bad token was found + * @throws org.mxchange.jcore.exceptions.CorruptedDatabaseFileException If the database file is damaged + * @throws java.lang.NoSuchMethodException If a method cannot be found + * @throws java.lang.IllegalAccessException If a method is not accessible + * @throws java.lang.reflect.InvocationTargetException Any other problems? */ - public boolean isOwnContactFound () throws SQLException, IOException, BadTokenException; + public boolean isOwnContactFound () throws SQLException, IOException, BadTokenException, CorruptedDatabaseFileException, NoSuchMethodException, IllegalAccessException, InvocationTargetException; /** * Reads a single row and parses it to a contact instance -- 2.39.5