From 056987fac61dbde2725982d76761a6baa8755c25 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 25 Apr 2020 20:37:02 +0200 Subject: [PATCH] Product-only: - removed no longer used business method, should be done in backing bean (web container) - renamed method fetchAllProducts() to fetchAllGenericProducts() - renamed method fetchAllCategories() to fetchAllProductCategories() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../PizzaAdminProductCategorySessionBean.java | 2 +- .../PizzaProductCategorySessionBean.java | 2 +- .../PizzaAdminGenericProductSessionBean.java | 2 +- .../PizzaGenericProductSessionBean.java | 21 +------------------ 4 files changed, 4 insertions(+), 23 deletions(-) diff --git a/src/java/org/mxchange/jproduct/model/category/PizzaAdminProductCategorySessionBean.java b/src/java/org/mxchange/jproduct/model/category/PizzaAdminProductCategorySessionBean.java index b8a34a1..37b92ae 100644 --- a/src/java/org/mxchange/jproduct/model/category/PizzaAdminProductCategorySessionBean.java +++ b/src/java/org/mxchange/jproduct/model/category/PizzaAdminProductCategorySessionBean.java @@ -166,7 +166,7 @@ public class PizzaAdminProductCategorySessionBean extends BasePizzaProductEnterp boolean isFound = false; // Get full list from other EJB - final List list = this.categoryBean.fetchAllCategories(); + final List list = this.categoryBean.fetchAllProductCategories(); // Check each entry for (final Category createdCategory : list) { diff --git a/src/java/org/mxchange/jproduct/model/category/PizzaProductCategorySessionBean.java b/src/java/org/mxchange/jproduct/model/category/PizzaProductCategorySessionBean.java index 5f3b9b0..def3631 100644 --- a/src/java/org/mxchange/jproduct/model/category/PizzaProductCategorySessionBean.java +++ b/src/java/org/mxchange/jproduct/model/category/PizzaProductCategorySessionBean.java @@ -45,7 +45,7 @@ public class PizzaProductCategorySessionBean extends BasePizzaEnterpriseBean imp @Override @SuppressWarnings ("unchecked") - public List fetchAllCategories () { + public List fetchAllProductCategories () { // Trace message this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.allCategories: CALLED!", this.getClass().getSimpleName())); //NOI18N diff --git a/src/java/org/mxchange/jproduct/model/product/PizzaAdminGenericProductSessionBean.java b/src/java/org/mxchange/jproduct/model/product/PizzaAdminGenericProductSessionBean.java index 6e88679..e13f982 100644 --- a/src/java/org/mxchange/jproduct/model/product/PizzaAdminGenericProductSessionBean.java +++ b/src/java/org/mxchange/jproduct/model/product/PizzaAdminGenericProductSessionBean.java @@ -158,7 +158,7 @@ public class PizzaAdminGenericProductSessionBean extends BasePizzaProductEnterpr boolean isFound = false; // Get full list from other EJB - final List list = this.productBean.fetchAllProducts(); + final List list = this.productBean.fetchAllGenericProducts(); // Check each entry for (final Product createdProduct : list) { diff --git a/src/java/org/mxchange/jproduct/model/product/PizzaGenericProductSessionBean.java b/src/java/org/mxchange/jproduct/model/product/PizzaGenericProductSessionBean.java index 178e3cd..648e881 100644 --- a/src/java/org/mxchange/jproduct/model/product/PizzaGenericProductSessionBean.java +++ b/src/java/org/mxchange/jproduct/model/product/PizzaGenericProductSessionBean.java @@ -37,26 +37,7 @@ public class PizzaGenericProductSessionBean extends BasePizzaEnterpriseBean impl @Override @SuppressWarnings ("unchecked") - public List fetchAllAvailableProducts () { - // Trace message - this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.allAvailableProducts: CALLED!", this.getClass().getSimpleName())); //NOI18N - - // Get query - final Query query = this.getEntityManager().createNamedQuery("AllAvailableProducts", GenericProduct.class); //NOI18N - - // Get list from it - final List list = query.getResultList(); - - // Trace message - this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.allAvailableProducts: list.size()={1} - EXIT!", this.getClass().getSimpleName(), list.size())); //NOI18N - - // Return it - return list; - } - - @Override - @SuppressWarnings ("unchecked") - public List fetchAllProducts () { + public List fetchAllGenericProducts () { // Trace message this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.allProducts: CALLED!", this.getClass().getSimpleName())); //NOI18N -- 2.39.5