]> git.mxchange.org Git - pizzaservice-ejb.git/commitdiff
Please cherry-pick:
authorRoland Häder <roland@mxchange.org>
Sat, 18 Apr 2020 13:50:44 +0000 (15:50 +0200)
committerRoland Häder <roland@mxchange.org>
Sat, 18 Apr 2020 14:50:21 +0000 (16:50 +0200)
- updated JARs have new copyFooData() method names

Signed-off-by: Roland Häder <roland@mxchange.org>
src/java/org/mxchange/jphone/model/phonenumbers/mobile/PizzaAdminMobileSessionBean.java
src/java/org/mxchange/jphone/model/phonenumbers/phone/PizzaAdminPhoneSessionBean.java
src/java/org/mxchange/jusercore/model/user/PizzaUserSessionBean.java
src/java/org/mxchange/pizzaapplication/enterprise/BasePizzaEnterpriseBean.java

index afeea1e8ceeb3e55cd6ad2e1dc806b84284b85c1..471e738dae2efcd71e4caa78e7a5b8e1efe5196a 100644 (file)
@@ -126,7 +126,7 @@ public class PizzaAdminMobileSessionBean extends BasePizzaEnterpriseBean impleme
                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
index c08dda4108df12efd832858aafde9f500a8b49a2..6c0ac4c087808b9153cfbf67e5598f40b7a95562 100644 (file)
@@ -189,7 +189,7 @@ public class PizzaAdminPhoneSessionBean extends BasePizzaEnterpriseBean implemen
                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
@@ -247,7 +247,7 @@ public class PizzaAdminPhoneSessionBean extends BasePizzaEnterpriseBean implemen
                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
index 7c452d6185e225e171e6405743b99302c51ce34b..58b8c54073c94e4b6b60d8854472765a693da01b 100644 (file)
@@ -290,6 +290,9 @@ public class PizzaUserSessionBean extends BasePizzaEnterpriseBean implements Use
                // Should be found!
                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);
 
@@ -415,7 +418,7 @@ public class PizzaUserSessionBean extends BasePizzaEnterpriseBean implements Use
                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());
@@ -457,7 +460,7 @@ public class PizzaUserSessionBean extends BasePizzaEnterpriseBean implements Use
                        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);
@@ -487,7 +490,7 @@ public class PizzaUserSessionBean extends BasePizzaEnterpriseBean implements Use
                        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);
@@ -517,7 +520,7 @@ public class PizzaUserSessionBean extends BasePizzaEnterpriseBean implements Use
                        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);
index afbf55bae60dee58596b5156fd65edc63255a848..4f8907cc836d515639614c851a943a90c5634630 100644 (file)
@@ -1163,23 +1163,8 @@ public abstract class BasePizzaEnterpriseBean extends BaseEnterpriseBean {
                // Debug message
                this.getLoggerBeanLocal().logDebug(MessageFormat.format("{0}.updateUserPersonalData: foundContact.contactId={1}", this.getClass().getSimpleName(), foundContact.getContactId())); //NOI18N
 
-               // Is a fax number set?
-               if (detachedContact.getContactFaxNumber() instanceof DialableFaxNumber) {
-                       // Make fax numbers managed
-                       foundContact.setContactFaxNumber(this.createManaged(detachedContact.getContactFaxNumber(), detachedContact.getContactFaxNumber()));
-               }
-
-               // Is a land-line number set?
-               if (detachedContact.getContactLandLineNumber() instanceof DialableLandLineNumber) {
-                       // Make land-line numbers managed
-                       foundContact.setContactLandLineNumber(this.createManaged(detachedContact.getContactLandLineNumber(), detachedContact.getContactLandLineNumber()));
-               }
-
-               // Is a mobile number set?
-               if (detachedContact.getContactMobileNumber() instanceof DialableMobileNumber) {
-                       // Make mobile numbers managed
-                       foundContact.setContactMobileNumber(this.createManaged(detachedContact.getContactMobileNumber(), detachedContact.getContactMobileNumber()));
-               }
+               // Copy all
+               Contacts.copyContactData(detachedContact, foundContact);
 
                // Merge contact instance
                final Contact managedContact = this.getEntityManager().merge(foundContact);
@@ -1232,7 +1217,7 @@ public abstract class BasePizzaEnterpriseBean 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);
@@ -1259,7 +1244,7 @@ public abstract class BasePizzaEnterpriseBean 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);
@@ -1286,7 +1271,7 @@ public abstract class BasePizzaEnterpriseBean 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);