]> git.mxchange.org Git - jfinancials-ejb.git/commitdiff
Don't cherry-pick:
authorRoland Häder <roland@mxchange.org>
Fri, 24 Apr 2020 21:16:12 +0000 (23:16 +0200)
committerRoland Häder <roland@mxchange.org>
Fri, 24 Apr 2020 21:16:12 +0000 (23:16 +0200)
- set foo-updated on the detached instance, not on managed
- renamed variables

Signed-off-by: Roland Häder <roland@mxchange.org>
src/java/org/mxchange/jfinancials/enterprise/financial/receipt/BaseFinancialsReceiptEnterpriseBean.java
src/java/org/mxchange/jfinancials/enterprise/financial/receipt_item/BaseFinancialsReceiptItemEnterpriseBean.java
src/java/org/mxchange/jfinancials/model/receipt/FinancialAdminReceiptSessionBean.java
src/java/org/mxchange/jfinancials/model/receipt_item/FinancialAdminReceiptItemSessionBean.java

index 40e5f20c52ebcf8b7224ef25d5190167e32d0b01..0c0b5032fcd102163a5304a691eb2bc38aa60f52 100644 (file)
@@ -65,7 +65,8 @@ public abstract class BaseFinancialsReceiptEnterpriseBean extends BaseFinancials
                }
 
                // Set updated timestamp
-               // @TODO detachedReceipt.setReceiptUpdated(new Date());
+               detachedReceipt.setReceiptEntryUpdated(new Date());
+
                // Get receipt from it and find it
                final BillableReceipt foundReceipt = this.getEntityManager().find(detachedReceipt.getClass(), detachedReceipt.getReceiptId());
 
@@ -81,9 +82,6 @@ public abstract class BaseFinancialsReceiptEnterpriseBean extends BaseFinancials
                // Merge receipt instance
                final BillableReceipt managedReceipt = this.getEntityManager().merge(foundReceipt);
 
-               // Set updated timestamp
-               managedReceipt.setReceiptEntryUpdated(new Date());
-
                // Trace message
                this.getLoggerBeanLocal().logTrace(MessageFormat.format("mergeReceipt: managedReceipt={0} - EXIT!", managedReceipt)); //NOI18N
 
index ad06ce1efd5d27471b57c2158c0dab849af954c2..51e27e81efadaabb867ce39057a1953326ff71e3 100644 (file)
@@ -65,7 +65,8 @@ public abstract class BaseFinancialsReceiptItemEnterpriseBean extends BaseFinanc
                }
 
                // Set updated timestamp
-               // @TODO detachedReceipt.setReceiptUpdated(new Date());
+               detachedReceiptItem.setItemEntryUpdated(new Date());
+
                // Get receipt from it and find it
                final BillableReceiptItem foundReceiptItem = this.getEntityManager().find(detachedReceiptItem.getClass(), detachedReceiptItem.getItemId());
 
@@ -81,9 +82,6 @@ public abstract class BaseFinancialsReceiptItemEnterpriseBean extends BaseFinanc
                // Merge receipt item instance
                final BillableReceiptItem managedReceiptItem = this.getEntityManager().merge(foundReceiptItem);
 
-               // Set updated timestamp
-               managedReceiptItem.setItemEntryUpdated(new Date());
-
                // Trace message
                this.getLoggerBeanLocal().logTrace(MessageFormat.format("mergeReceiptItem: managedReceiptItem={0} - EXIT!", managedReceiptItem)); //NOI18N
 
index 9a4b692687b45c6496db209074c71f8b6a3b63d8..0fd9e3a30d803034b2e13345e02c0448bcbe23b5 100644 (file)
@@ -171,13 +171,13 @@ public class FinancialAdminReceiptSessionBean extends BaseFinancialsReceiptEnter
                }
 
                // Merge data
-               final BillableReceipt managedReceipt = this.mergeReceipt(receipt);
+               final BillableReceipt updatedReceipt = this.mergeReceipt(receipt);
 
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateReceipt(): managedReceipt.receiptId={1} - EXIT!", this.getClass().getSimpleName(), managedReceipt.getReceiptId())); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateReceipt(): updatedReceipt.receiptId={1} - EXIT!", this.getClass().getSimpleName(), updatedReceipt.getReceiptId())); //NOI18N
 
                // Return it
-               return managedReceipt;
+               return updatedReceipt;
        }
 
 }
index 61a239c19d5fd6992dce1188860aab2603a73263..b85d41d14f7b53432a633d2636527294f533f496 100644 (file)
@@ -138,7 +138,7 @@ public class FinancialAdminReceiptItemSessionBean extends BaseFinancialsReceiptI
                final BillableReceiptItem updatedReceiptItem = this.mergeReceiptItem(receiptItem);
 
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateReceiptItem(): updatedReceiptItem={1} - CALLED!", this.getClass().getSimpleName(), updatedReceiptItem)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateReceiptItem(): updatedReceiptItem.itemId={1} - EXIT!", this.getClass().getSimpleName(), updatedReceiptItem.getItemId())); //NOI18N
 
                // Return it
                return updatedReceiptItem;