From: Roland Häder Date: Sat, 25 Apr 2020 18:37:02 +0000 (+0200) Subject: Product-only: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=056987fac61dbde2725982d76761a6baa8755c25;p=pizzaservice-ejb.git 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() Signed-off-by: Roland Häder --- 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