]> git.mxchange.org Git - pizzaservice-ejb.git/commitdiff
Product-only:
authorRoland Häder <roland@mxchange.org>
Sat, 25 Apr 2020 18:37:02 +0000 (20:37 +0200)
committerRoland Häder <roland@mxchange.org>
Wed, 10 Jun 2020 17:19:56 +0000 (19:19 +0200)
- 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 <roland@mxchange.org>
src/java/org/mxchange/jproduct/model/category/PizzaAdminProductCategorySessionBean.java
src/java/org/mxchange/jproduct/model/category/PizzaProductCategorySessionBean.java
src/java/org/mxchange/jproduct/model/product/PizzaAdminGenericProductSessionBean.java
src/java/org/mxchange/jproduct/model/product/PizzaGenericProductSessionBean.java

index b8a34a1d78a7a32d4fcbf015ad273c15de34064f..37b92aeb4004da6e987cbbd8c3bdd4a6b07878a6 100644 (file)
@@ -166,7 +166,7 @@ public class PizzaAdminProductCategorySessionBean extends BasePizzaProductEnterp
                boolean isFound = false;
 
                // Get full list from other EJB
-               final List<Category> list = this.categoryBean.fetchAllCategories();
+               final List<Category> list = this.categoryBean.fetchAllProductCategories();
 
                // Check each entry
                for (final Category createdCategory : list) {
index 5f3b9b0e60dd45bbcc7b15d8690855e461843ff6..def363145789961d5b1e82669d037e22935c4401 100644 (file)
@@ -45,7 +45,7 @@ public class PizzaProductCategorySessionBean extends BasePizzaEnterpriseBean imp
 
        @Override
        @SuppressWarnings ("unchecked")
-       public List<Category> fetchAllCategories () {
+       public List<Category> fetchAllProductCategories () {
                // Trace message
                this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.allCategories: CALLED!", this.getClass().getSimpleName())); //NOI18N
 
index 6e8867910f9b04b0e51d28a3c06ad2b2988a73a1..e13f9820a90d1e7efcce093021faee7a44e13d62 100644 (file)
@@ -158,7 +158,7 @@ public class PizzaAdminGenericProductSessionBean extends BasePizzaProductEnterpr
                boolean isFound = false;
 
                // Get full list from other EJB
-               final List<Product> list = this.productBean.fetchAllProducts();
+               final List<Product> list = this.productBean.fetchAllGenericProducts();
 
                // Check each entry
                for (final Product createdProduct : list) {
index 178e3cdc675f0347c4376fb2fd9b1b035715dc21..648e881e69a76815b523c0b230f4dd7f616c27fc 100644 (file)
@@ -37,26 +37,7 @@ public class PizzaGenericProductSessionBean extends BasePizzaEnterpriseBean impl
 
        @Override
        @SuppressWarnings ("unchecked")
-       public List<Product> 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<Product> 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<Product> fetchAllProducts () {
+       public List<Product> fetchAllGenericProducts () {
                // Trace message
                this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.allProducts: CALLED!", this.getClass().getSimpleName())); //NOI18N