]> git.mxchange.org Git - jfinancials-ejb.git/commitdiff
Please cherry-pick:
authorRoland Häder <roland@mxchange.org>
Wed, 20 May 2020 18:34:41 +0000 (20:34 +0200)
committerRoland Häder <roland@mxchange.org>
Wed, 20 May 2020 18:34:41 +0000 (20:34 +0200)
- always set EntryUpdated in the managed (and merged) instance, as the
  copyFooData() methods do no longer copy timestamps

Signed-off-by: Roland Häder <roland@mxchange.org>
src/java/org/mxchange/jfinancials/enterprise/BaseFinancialsEnterpriseBean.java

index 2a198076acd4956806a7e1b5616d9e02e5902f64..08ac5561cdb7190077c4cec828fadb9e3bfb1ca7 100644 (file)
@@ -757,9 +757,6 @@ public abstract class BaseFinancialsEnterpriseBean extends BaseEnterpriseBean {
                        throw new IllegalStateException(MessageFormat.format("detachedBranchOffice.branchId ={0} is not valid.", detachedBranchOffice.getBranchId())); //NOI18N
                }
 
-               // Set updated timestamp
-               detachedBranchOffice.setBranchEntryUpdated(new Date());
-
                // Get contact from it and find it
                final BranchOffice foundBranchOffice = this.getEntityManager().find(detachedBranchOffice.getClass(), detachedBranchOffice.getBranchId());
 
@@ -775,6 +772,9 @@ public abstract class BaseFinancialsEnterpriseBean extends BaseEnterpriseBean {
                // Merge contact instance
                final BranchOffice managedBranchOffice = this.getEntityManager().merge(foundBranchOffice);
 
+               // Set updated timestamp
+               managedBranchOffice.setBranchEntryUpdated(new Date());
+
                // Trace message
                this.getLoggerBeanLocal().logTrace(MessageFormat.format("mergeBranchOfficeData: managedBranchOffice={0} - EXIT!", managedBranchOffice)); //NOI18N
 
@@ -805,9 +805,6 @@ public abstract class BaseFinancialsEnterpriseBean extends BaseEnterpriseBean {
                        throw new IllegalStateException(MessageFormat.format("detachedContact.contactId={0} is not valid.", detachedContact.getContactId())); //NOI18N
                }
 
-               // Set updated timestamp
-               detachedContact.setContactEntryUpdated(new Date());
-
                // Get contact from it and find it
                final Contact foundContact = this.createManaged(detachedContact);
 
@@ -820,6 +817,9 @@ public abstract class BaseFinancialsEnterpriseBean extends BaseEnterpriseBean {
                // Merge contact instance
                final Contact managedContact = this.getEntityManager().merge(foundContact);
 
+               // Set updated timestamp
+               managedContact.setContactEntryUpdated(new Date());
+
                // Trace message
                this.getLoggerBeanLocal().logTrace(MessageFormat.format("mergeContactData: managedContact={0} - EXIT!", managedContact)); //NOI18N
 
@@ -952,9 +952,6 @@ public abstract class BaseFinancialsEnterpriseBean extends BaseEnterpriseBean {
                        throw new IllegalStateException(MessageFormat.format("detachedDepartment.departmentId ={0} is not valid.", detachedDepartment.getDepartmentId())); //NOI18N
                }
 
-               // Set updated timestamp
-               detachedDepartment.setDepartmentEntryUpdated(new Date());
-
                // Get contact from it and find it
                final Department foundDepartment = this.createManaged(detachedDepartment);
 
@@ -967,6 +964,9 @@ public abstract class BaseFinancialsEnterpriseBean extends BaseEnterpriseBean {
                // Merge contact instance
                final Department managedDepartment = this.getEntityManager().merge(foundDepartment);
 
+               // Set updated timestamp
+               managedDepartment.setDepartmentEntryUpdated(new Date());
+
                // Trace message
                this.getLoggerBeanLocal().logTrace(MessageFormat.format("mergeDepartmentData: managedDepartment={0} - EXIT!", managedDepartment)); //NOI18N