From b14817fd0a921186a1670646cdf800abb430c021 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Fri, 14 Aug 2015 14:29:58 +0200 Subject: [PATCH] =?utf8?q?Sorted=20members=20Signed-off-by:Roland=20H?= =?utf8?q?=C3=A4der=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../frontend/BaseDatabaseFrontend.java | 58 +++++++++---------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/src/org/mxchange/jcore/database/frontend/BaseDatabaseFrontend.java b/src/org/mxchange/jcore/database/frontend/BaseDatabaseFrontend.java index 0554f71..0d3f48f 100644 --- a/src/org/mxchange/jcore/database/frontend/BaseDatabaseFrontend.java +++ b/src/org/mxchange/jcore/database/frontend/BaseDatabaseFrontend.java @@ -107,35 +107,6 @@ public abstract class BaseDatabaseFrontend extends BaseFrameworkSystem implement this.getLogger().trace("EXIT!"); } - /** - * Initialize backend - * - * @throws org.mxchange.jcore.exceptions.UnsupportedDatabaseBackendException If the backend is not supported - * @throws java.sql.SQLException If a SQL database backend fails to connect - */ - protected void initBackend () throws UnsupportedDatabaseBackendException, SQLException { - // Trace message - this.getLogger().trace("CALLED!"); //NOI18N - - // Try it - try { - // Try to get get instance from factory - DatabaseBackend backend = BackendFactory.createInstance(this); - - // Try to run a connect on it - backend.connectToDatabase(); - - // All fine so far, then set it here - this.setBackend(backend); - } catch (final ClassNotFoundException | NoSuchMethodException | InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException ex) { - // Continue to throw - throw new UnsupportedDatabaseBackendException(ex); - } - - // Trace message - this.getLogger().trace("EXIT!"); //NOI18N - } - /** * Inserts currently filled dataset and returns the result of the operation. * This may return no rows, but the affectedRows field may have been @@ -163,4 +134,33 @@ public abstract class BaseDatabaseFrontend extends BaseFrameworkSystem implement // Return it return result; } + + /** + * Initialize backend + * + * @throws org.mxchange.jcore.exceptions.UnsupportedDatabaseBackendException If the backend is not supported + * @throws java.sql.SQLException If a SQL database backend fails to connect + */ + protected void initBackend () throws UnsupportedDatabaseBackendException, SQLException { + // Trace message + this.getLogger().trace("CALLED!"); //NOI18N + + // Try it + try { + // Try to get get instance from factory + DatabaseBackend backend = BackendFactory.createInstance(this); + + // Try to run a connect on it + backend.connectToDatabase(); + + // All fine so far, then set it here + this.setBackend(backend); + } catch (final ClassNotFoundException | NoSuchMethodException | InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException ex) { + // Continue to throw + throw new UnsupportedDatabaseBackendException(ex); + } + + // Trace message + this.getLogger().trace("EXIT!"); //NOI18N + } } -- 2.39.5