From 20cb7f3e04e01528e5939d725cd632947d14478e 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 --- ...ncialsAdminProductCategorySessionBean.java | 2 +- .../FinancialsProductCategorySessionBean.java | 2 +- ...ancialsAdminGenericProductSessionBean.java | 2 +- .../FinancialsGenericProductSessionBean.java | 21 +------------------ 4 files changed, 4 insertions(+), 23 deletions(-) diff --git a/src/java/org/mxchange/jproduct/model/category/FinancialsAdminProductCategorySessionBean.java b/src/java/org/mxchange/jproduct/model/category/FinancialsAdminProductCategorySessionBean.java index db6e507..82da89f 100644 --- a/src/java/org/mxchange/jproduct/model/category/FinancialsAdminProductCategorySessionBean.java +++ b/src/java/org/mxchange/jproduct/model/category/FinancialsAdminProductCategorySessionBean.java @@ -166,7 +166,7 @@ public class FinancialsAdminProductCategorySessionBean extends BaseFinancialsPro 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/FinancialsProductCategorySessionBean.java b/src/java/org/mxchange/jproduct/model/category/FinancialsProductCategorySessionBean.java index cda9d7f..3b5f26d 100644 --- a/src/java/org/mxchange/jproduct/model/category/FinancialsProductCategorySessionBean.java +++ b/src/java/org/mxchange/jproduct/model/category/FinancialsProductCategorySessionBean.java @@ -45,7 +45,7 @@ public class FinancialsProductCategorySessionBean extends BaseFinancialsEnterpri @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/FinancialsAdminGenericProductSessionBean.java b/src/java/org/mxchange/jproduct/model/product/FinancialsAdminGenericProductSessionBean.java index 26aa418..1bc5a2a 100644 --- a/src/java/org/mxchange/jproduct/model/product/FinancialsAdminGenericProductSessionBean.java +++ b/src/java/org/mxchange/jproduct/model/product/FinancialsAdminGenericProductSessionBean.java @@ -158,7 +158,7 @@ public class FinancialsAdminGenericProductSessionBean extends BaseFinancialsProd 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/FinancialsGenericProductSessionBean.java b/src/java/org/mxchange/jproduct/model/product/FinancialsGenericProductSessionBean.java index 6630748..8b72639 100644 --- a/src/java/org/mxchange/jproduct/model/product/FinancialsGenericProductSessionBean.java +++ b/src/java/org/mxchange/jproduct/model/product/FinancialsGenericProductSessionBean.java @@ -37,26 +37,7 @@ public class FinancialsGenericProductSessionBean extends BaseFinancialsEnterpris @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