@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
// 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) {
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;
}