From: Roland Häder Date: Tue, 26 Apr 2016 07:44:34 +0000 (+0200) Subject: Returned finished customer number X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b47f949f2052194851a81bc85f15063edd6335b8;p=pizzaservice-ejb.git Returned finished customer number --- diff --git a/src/java/org/mxchange/pizzaapplication/model/customer/PizzaAdminCustomerSessionBean.java b/src/java/org/mxchange/pizzaapplication/model/customer/PizzaAdminCustomerSessionBean.java index 6a9b845..64f9db5 100644 --- a/src/java/org/mxchange/pizzaapplication/model/customer/PizzaAdminCustomerSessionBean.java +++ b/src/java/org/mxchange/pizzaapplication/model/customer/PizzaAdminCustomerSessionBean.java @@ -60,7 +60,7 @@ public class PizzaAdminCustomerSessionBean extends BasePizzaDatabaseBean impleme @Override public String createCustomerNumber () { // Init named query - Query query = this.getEntityManager().createNamedQuery("SearchCustomerByNumber", Customer.class); + Query query = this.getEntityManager().createNamedQuery("SearchCustomerByNumber", Customer.class); //NOI18N // Default is not found String customerNumber = null; @@ -71,7 +71,7 @@ public class PizzaAdminCustomerSessionBean extends BasePizzaDatabaseBean impleme String cn = CustomerUtils.generateCustomerNumber(PizzaAdminCustomerSessionBeanRemote.CUSTOMER_NUMBER_LENGTH, PizzaAdminCustomerSessionBeanRemote.CUSTOMER_NUMBER_BLOCK_SIZE, PizzaAdminCustomerSessionBeanRemote.CUSTOMER_NUMBER_SEPARATOR); // Set the generated number as param - query.setParameter("customerNumber", cn); + query.setParameter("customerNumber", cn); //NOI18N // Try to find it try { @@ -82,6 +82,9 @@ public class PizzaAdminCustomerSessionBean extends BasePizzaDatabaseBean impleme customerNumber = cn; } } + + // Return generated number + return customerNumber; } }