From 90c84d73c744c7a5e682906013fd28939145c813 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Tue, 13 Oct 2015 12:33:55 +0200 Subject: [PATCH] =?utf8?q?added=20logger=20messages=20Signed-off-by:Roland?= =?utf8?q?=20H=C3=A4der=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../model/addressbook/AddressbookSessionBean.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/java/org/mxchange/addressbook/model/addressbook/AddressbookSessionBean.java b/src/java/org/mxchange/addressbook/model/addressbook/AddressbookSessionBean.java index b79f78b..f75aeb3 100644 --- a/src/java/org/mxchange/addressbook/model/addressbook/AddressbookSessionBean.java +++ b/src/java/org/mxchange/addressbook/model/addressbook/AddressbookSessionBean.java @@ -111,6 +111,9 @@ public class AddressbookSessionBean extends BaseDatabaseBean implements Addressb @Override public boolean isAddressbookIdUsed (final Long addressbookId) { + // Trace message + this.getLoggerBeanLocal().logTrace(MessageFormat.format("isAddressbookIdUsed: addressbookId={0} - CALLED!", addressbookId)); //NOI18N + // Is it null or zero? if (null == addressbookId) { // Throw NPE @@ -134,6 +137,9 @@ public class AddressbookSessionBean extends BaseDatabaseBean implements Addressb // Get single result Addressbook addressbook = (Addressbook) query.getSingleResult(); + // Debug message + this.getLoggerBeanLocal().logDebug(MessageFormat.format("isAddressbookIdUsed: addressbook={0} - FOUND!", addressbook)); //NOI18N + // Found one! isValid = true; } catch (final NoResultException ex) { @@ -141,6 +147,9 @@ public class AddressbookSessionBean extends BaseDatabaseBean implements Addressb this.getLoggerBeanLocal().logDebug(MessageFormat.format("isAddressbookIdUsed: addressbookId={0} is not valid: {1}", addressbookId, ex)); //NOI18N } + // Trace message + this.getLoggerBeanLocal().logTrace(MessageFormat.format("isAddressbookIdUsed: isValid={0} - EXIT!", isValid)); //NOI18N + // Return result return isValid; } -- 2.39.5