From 1ee9017493b5217a88e450bb0ccee1030591a4e2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 18 Apr 2020 15:50:44 +0200 Subject: [PATCH] Please cherry-pick: - updated JARs have new copyFooData() method names MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../BaseAddressbookEnterpriseBean.java | 8 ++++---- .../AddressbookAdminMobileSessionBean.java | 2 +- .../phone/AddressbookAdminPhoneSessionBean.java | 4 ++-- .../model/user/AddressbookUserSessionBean.java | 16 ++++++++-------- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/java/org/mxchange/addressbook/enterprise/BaseAddressbookEnterpriseBean.java b/src/java/org/mxchange/addressbook/enterprise/BaseAddressbookEnterpriseBean.java index 5c0659c..361b58b 100644 --- a/src/java/org/mxchange/addressbook/enterprise/BaseAddressbookEnterpriseBean.java +++ b/src/java/org/mxchange/addressbook/enterprise/BaseAddressbookEnterpriseBean.java @@ -867,7 +867,7 @@ public abstract class BaseAddressbookEnterpriseBean extends BaseEnterpriseBean { this.getLoggerBeanLocal().logDebug(MessageFormat.format("mergeContactData: foundContact.contactId={0}", foundContact.getContactId())); //NOI18N // Copy all - Contacts.copyAll(detachedContact, foundContact); + Contacts.copyContactData(detachedContact, foundContact); // Merge contact instance final Contact managedContact = this.getEntityManager().merge(foundContact); @@ -917,7 +917,7 @@ public abstract class BaseAddressbookEnterpriseBean extends BaseEnterpriseBean { assert (foundMobile instanceof DialableMobileNumber) : MessageFormat.format("Mobile number with id {0} not found but should be.", foundMobile.getMobileId()); //NOI18N // Copy all - MobileNumbers.copyMobileNumber(detachedContact.getContactMobileNumber(), foundMobile); + MobileNumbers.copyMobileNumberData(detachedContact.getContactMobileNumber(), foundMobile); // Then merge it, too final DialableMobileNumber managedMobile = this.getEntityManager().merge(foundMobile); @@ -941,7 +941,7 @@ public abstract class BaseAddressbookEnterpriseBean extends BaseEnterpriseBean { assert (foundFax instanceof DialableFaxNumber) : MessageFormat.format("Fax number with id {0} not found but should be.", foundFax.getPhoneId()); //NOI18N // Copy all - FaxNumbers.copyFaxNumber(detachedContact.getContactFaxNumber(), foundFax); + FaxNumbers.copyFaxNumberData(detachedContact.getContactFaxNumber(), foundFax); // Then merge it, too final DialableFaxNumber managedFax = this.getEntityManager().merge(foundFax); @@ -965,7 +965,7 @@ public abstract class BaseAddressbookEnterpriseBean extends BaseEnterpriseBean { assert (foundLandLine instanceof DialableLandLineNumber) : MessageFormat.format("Land line number with id {0} not found but should be.", foundLandLine.getPhoneId()); //NOI18N // Copy all - LandLineNumbers.copyLandLineNumber(detachedContact.getContactLandLineNumber(), foundLandLine); + LandLineNumbers.copyLandLineNumberData(detachedContact.getContactLandLineNumber(), foundLandLine); // Then merge it, too final DialableLandLineNumber managedLandLine = this.getEntityManager().merge(foundLandLine); diff --git a/src/java/org/mxchange/jphone/model/phonenumbers/mobile/AddressbookAdminMobileSessionBean.java b/src/java/org/mxchange/jphone/model/phonenumbers/mobile/AddressbookAdminMobileSessionBean.java index 8fc58c3..72cbccf 100644 --- a/src/java/org/mxchange/jphone/model/phonenumbers/mobile/AddressbookAdminMobileSessionBean.java +++ b/src/java/org/mxchange/jphone/model/phonenumbers/mobile/AddressbookAdminMobileSessionBean.java @@ -126,7 +126,7 @@ public class AddressbookAdminMobileSessionBean extends BaseAddressbookEnterprise this.getLoggerBeanLocal().logDebug(MessageFormat.format("{0}.updateMobileData: managedNumber.phoneId={1}", this.getClass().getSimpleName(), managedNumber.getMobileId())); //NOI18N // Set updated timestamp - MobileNumbers.copyMobileNumber(mobileNumber, managedNumber); + MobileNumbers.copyMobileNumberData(mobileNumber, managedNumber); managedNumber.setMobileEntryUpdated(new Date()); // Trace message diff --git a/src/java/org/mxchange/jphone/model/phonenumbers/phone/AddressbookAdminPhoneSessionBean.java b/src/java/org/mxchange/jphone/model/phonenumbers/phone/AddressbookAdminPhoneSessionBean.java index ca0be6d..c6dde24 100644 --- a/src/java/org/mxchange/jphone/model/phonenumbers/phone/AddressbookAdminPhoneSessionBean.java +++ b/src/java/org/mxchange/jphone/model/phonenumbers/phone/AddressbookAdminPhoneSessionBean.java @@ -190,7 +190,7 @@ public class AddressbookAdminPhoneSessionBean extends BaseAddressbookEnterpriseB this.getLoggerBeanLocal().logDebug(MessageFormat.format("{0}.updateFaxData: managedNumber.phoneId={1}", this.getClass().getSimpleName(), managedNumber.getPhoneId())); //NOI18N // Set updated timestamp - FaxNumbers.copyFaxNumber(faxNumber, managedNumber); + FaxNumbers.copyFaxNumberData(faxNumber, managedNumber); managedNumber.setPhoneEntryUpdated(new Date()); // Trace message @@ -248,7 +248,7 @@ public class AddressbookAdminPhoneSessionBean extends BaseAddressbookEnterpriseB this.getLoggerBeanLocal().logDebug(MessageFormat.format("{0}.updateLandLineData: managedNumber.phoneId={1}", this.getClass().getSimpleName(), managedNumber.getPhoneId())); //NOI18N // Set updated timestamp - LandLineNumbers.copyLandLineNumber(landLineNumber, managedNumber); + LandLineNumbers.copyLandLineNumberData(landLineNumber, managedNumber); managedNumber.setPhoneEntryUpdated(new Date()); // Trace message diff --git a/src/java/org/mxchange/jusercore/model/user/AddressbookUserSessionBean.java b/src/java/org/mxchange/jusercore/model/user/AddressbookUserSessionBean.java index f0d38d1..7ffc1c1 100644 --- a/src/java/org/mxchange/jusercore/model/user/AddressbookUserSessionBean.java +++ b/src/java/org/mxchange/jusercore/model/user/AddressbookUserSessionBean.java @@ -285,7 +285,10 @@ public class AddressbookUserSessionBean extends BaseAddressbookEnterpriseBean im final User foundUser = this.getEntityManager().find(user.getClass(), user.getUserId()); // Should be found! - assert (foundUser instanceof User) : MessageFormat.format("User with id {0} not found, but should be.", user.getUserId()); //NOI18N + assert (foundUser instanceof User) : MessageFormat.format("User with id {0} not found, but should be.", detachedUser.getUserId()); //NOI18N + + // Copy all data + Users.copyUserData(detachedUser, foundUser); // Merge user final User managedUser = this.getEntityManager().merge(foundUser); @@ -293,9 +296,6 @@ public class AddressbookUserSessionBean extends BaseAddressbookEnterpriseBean im // Should be found! assert (managedUser instanceof User) : MessageFormat.format("User with id {0} not merged, but should be.", managedUser.getUserId()); //NOI18N - // Copy all data - Users.copyAll(managedUser, managedUser); - // Set as updated managedUser.setUserUpdated(new Date()); @@ -412,7 +412,7 @@ public class AddressbookUserSessionBean extends BaseAddressbookEnterpriseBean im assert (managedUser instanceof User) : MessageFormat.format("User with id {0} not found, but should be.", user.getUserId()); //NOI18N // Copy all data - Users.copyAll(user, managedUser); + Users.copyUserData(user, managedUser); // Set as updated managedUser.setUserUpdated(new Date()); @@ -454,7 +454,7 @@ public class AddressbookUserSessionBean extends BaseAddressbookEnterpriseBean im assert (foundMobile instanceof DialableMobileNumber) : MessageFormat.format("Mobile number with id {0} not found but should be.", foundMobile.getMobileId()); //NOI18N // Copy all - MobileNumbers.copyMobileNumber(managedUser.getUserContact().getContactMobileNumber(), foundMobile); + MobileNumbers.copyMobileNumberData(managedUser.getUserContact().getContactMobileNumber(), foundMobile); // Then merge it, too final DialableMobileNumber managedMobile = this.getEntityManager().merge(foundMobile); @@ -484,7 +484,7 @@ public class AddressbookUserSessionBean extends BaseAddressbookEnterpriseBean im assert (foundFax instanceof DialableFaxNumber) : MessageFormat.format("Fax number with id {0} not found but should be.", foundFax.getPhoneId()); //NOI18N // Copy all - FaxNumbers.copyFaxNumber(managedUser.getUserContact().getContactFaxNumber(), foundFax); + FaxNumbers.copyFaxNumberData(managedUser.getUserContact().getContactFaxNumber(), foundFax); // Then merge it, too final DialableFaxNumber managedFax = this.getEntityManager().merge(foundFax); @@ -514,7 +514,7 @@ public class AddressbookUserSessionBean extends BaseAddressbookEnterpriseBean im assert (foundLandLine instanceof DialableLandLineNumber) : MessageFormat.format("Land line number with id {0} not found but should be.", foundLandLine.getPhoneId()); //NOI18N // Copy all - LandLineNumbers.copyLandLineNumber(managedUser.getUserContact().getContactLandLineNumber(), foundLandLine); + LandLineNumbers.copyLandLineNumberData(managedUser.getUserContact().getContactLandLineNumber(), foundLandLine); // Then merge it, too final DialableLandLineNumber managedLandLine = this.getEntityManager().merge(foundLandLine); -- 2.39.5