]> git.mxchange.org Git - jfinancials-ejb.git/blobdiff - src/java/org/mxchange/jproduct/model/product/FinancialsAdminGenericProductSessionBean.java
Product-only:
[jfinancials-ejb.git] / src / java / org / mxchange / jproduct / model / product / FinancialsAdminGenericProductSessionBean.java
index bc62f49f821e3e0bc4f82593f1ae1718521d3a5e..26aa418bc6c40d98f43661efb0971ef938bff546 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2017, 2018 Free Software Foundation
+ * Copyright (C) 2017 - 2020 Free Software Foundation
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
@@ -101,7 +101,7 @@ public class FinancialsAdminGenericProductSessionBean extends BaseFinancialsProd
                }
 
                // Set created instance
-               product.setProductCreated(new Date());
+               product.setProductEntryCreated(new Date());
 
                // Persist it
                this.getEntityManager().persist(product);
@@ -134,13 +134,16 @@ public class FinancialsAdminGenericProductSessionBean extends BaseFinancialsProd
                }
 
                // Merge data
-               final Product detachedProduct = this.mergeProductData(product);
+               final Product managedProduct = this.mergeGenericProductData(product);
+
+               // Set updated instance
+               managedProduct.setProductEntryUpdated(new Date());
 
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateProductData: detachedProduct={1} - EXIT!", this.getClass().getSimpleName(), detachedProduct)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateProductData: managedProduct={1} - EXIT!", this.getClass().getSimpleName(), managedProduct)); //NOI18N
 
                // Return it
-               return detachedProduct;
+               return managedProduct;
        }
 
        /**
@@ -155,7 +158,7 @@ public class FinancialsAdminGenericProductSessionBean extends BaseFinancialsProd
                boolean isFound = false;
 
                // Get full list from other EJB
-               final List<Product> list = this.productBean.allProducts();
+               final List<Product> list = this.productBean.fetchAllProducts();
 
                // Check each entry
                for (final Product createdProduct : list) {