From b47f949f2052194851a81bc85f15063edd6335b8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 26 Apr 2016 09:44:34 +0200 Subject: [PATCH] Returned finished customer number --- .../model/customer/PizzaAdminCustomerSessionBean.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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; } } -- 2.39.5