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=20cb7f3e04e01528e5939d725cd632947d14478e;p=jfinancials-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/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