From: Roland Haeder Date: Sat, 12 Mar 2016 18:16:43 +0000 (+0100) Subject: Implemented allQueuedAddressesAsList() + updated jar(s) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=65fd8d6cfcd1bc8c2dafae91719f017534a603d6;p=jfinancials-mailer-ejb.git Implemented allQueuedAddressesAsList() + updated jar(s) --- diff --git a/lib/juser-core.jar b/lib/juser-core.jar index 1924b0b..a9550a8 100644 Binary files a/lib/juser-core.jar and b/lib/juser-core.jar differ diff --git a/src/java/org/mxchange/jusercore/model/email_address/EmailChangeSessionBean.java b/src/java/org/mxchange/jusercore/model/email_address/EmailChangeSessionBean.java index a049514..cbda9e2 100644 --- a/src/java/org/mxchange/jusercore/model/email_address/EmailChangeSessionBean.java +++ b/src/java/org/mxchange/jusercore/model/email_address/EmailChangeSessionBean.java @@ -34,7 +34,6 @@ import org.mxchange.jusercore.model.user.UserSessionBeanRemote; @Stateless (name = "email-change", mappedName = "ejb/stateless-addressbook-email-change", description = "A bean handling email changes") public class EmailChangeSessionBean extends BaseDatabaseBean implements EmailChangeSessionBeanRemote { - /** * Serial number */ @@ -53,8 +52,22 @@ public class EmailChangeSessionBean extends BaseDatabaseBean implements EmailCha } @Override + @SuppressWarnings ("unchecked") public List allQueuedAddressesAsList () { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + // Trace message + this.getLoggerBeanLocal().logTrace("allQueuedAddressesAsList: CALLED!"); //NOI18N + + // Get named query + Query query = this.getEntityManager().createNamedQuery("AllEmailAddressChanges", List.class); + + // Get all entries + List emailAddresses = query.getResultList(); + + // Trace message + this.getLoggerBeanLocal().logTrace(MessageFormat.format("allQueuedAddressesAsList: emailAddresses.size()={0} - EXIT!", emailAddresses.size())); //NOI18N + + // Return it + return emailAddresses; } @Override