/*
- * 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
}
// Set created instance
- product.setProductCreated(new Date());
+ product.setProductEntryCreated(new Date());
// Persist it
this.getEntityManager().persist(product);
}
// 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;
}
/**
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) {