]> git.mxchange.org Git - addressbook-ejb.git/commitdiff
Don't cherry-pick:
authorRoland Häder <roland@mxchange.org>
Sat, 18 Apr 2020 14:58:26 +0000 (16:58 +0200)
committerRoland Häder <roland@mxchange.org>
Sat, 18 Apr 2020 14:58:26 +0000 (16:58 +0200)
- fixed some method calls/variable names

Signed-off-by: Roland Häder <roland@mxchange.org>
src/java/org/mxchange/jcontacts/model/contact/AddressbookAdminContactSessionBean.java
src/java/org/mxchange/jusercore/model/user/AddressbookUserSessionBean.java

index 80f9255cf5cf93c62ae442e704f7d37a1311d1fb..41afe1a842b991b716e3e877c532f72edf1e2e0a 100644 (file)
@@ -21,6 +21,7 @@ import java.util.Date;
 import java.util.Objects;
 import javax.ejb.EJB;
 import javax.ejb.Stateless;
+import org.mxchange.addressbook.enterprise.BaseAddressbookEnterpriseBean;
 import org.mxchange.jcontacts.exceptions.ContactAlreadyAddedException;
 import org.mxchange.jcontacts.exceptions.ContactNotFoundException;
 
index 7ffc1c10bc3f737e8a93afa626f85f9bf6535d08..4eed341b68261f4ad9bdb9ec5bdb75d58e9deaea 100644 (file)
@@ -285,10 +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.", detachedUser.getUserId()); //NOI18N
+               assert (foundUser instanceof User) : MessageFormat.format("User with id {0} not found, but should be.", user.getUserId()); //NOI18N
 
                // Copy all data
-               Users.copyUserData(detachedUser, foundUser);
+               Users.copyUserData(user, foundUser);
 
                // Merge user
                final User managedUser = this.getEntityManager().merge(foundUser);
@@ -416,7 +416,7 @@ public class AddressbookUserSessionBean extends BaseAddressbookEnterpriseBean im
 
                // Set as updated
                managedUser.setUserUpdated(new Date());
-               managedUser.getUserContact().setContactUpdated(new Date());
+               managedUser.getUserContact().setContactEntryUpdated(new Date());
 
                // Get contact from it and find it
                final Contact foundContact = this.getEntityManager().find(managedUser.getUserContact().getClass(), managedUser.getUserContact().getContactId());
@@ -431,7 +431,7 @@ public class AddressbookUserSessionBean extends BaseAddressbookEnterpriseBean im
                final Contact managedContact = this.getEntityManager().merge(foundContact);
 
                // Copy all
-               Contacts.copyAll(managedUser.getUserContact(), managedContact);
+               Contacts.copyContactData(managedUser.getUserContact(), managedContact);
 
                // Set it back in user
                managedUser.setUserContact(managedContact);
@@ -463,7 +463,7 @@ public class AddressbookUserSessionBean extends BaseAddressbookEnterpriseBean im
                        assert (managedMobile instanceof DialableMobileNumber) : MessageFormat.format("Mobile number with id {0} not found but should be.", managedMobile.getMobileId()); //NOI18N
 
                        // Copy all
-                       MobileNumbers.copyAll(managedUser.getUserContact().getContactMobileNumber(), managedMobile);
+                       MobileNumbers.copyMobileNumberData(managedUser.getUserContact().getContactMobileNumber(), managedMobile);
 
                        // Set it back
                        managedContact.setContactMobileNumber(managedMobile);
@@ -493,7 +493,7 @@ public class AddressbookUserSessionBean extends BaseAddressbookEnterpriseBean im
                        assert (managedFax instanceof DialableFaxNumber) : MessageFormat.format("Fax number with id {0} not found but should be.", managedFax.getPhoneId()); //NOI18N
 
                        // Copy all
-                       FaxNumbers.copyAll(managedUser.getUserContact().getContactFaxNumber(), managedFax);
+                       FaxNumbers.copyFaxNumberData(managedUser.getUserContact().getContactFaxNumber(), managedFax);
 
                        // Set it back
                        managedContact.setContactFaxNumber(managedFax);
@@ -523,7 +523,7 @@ public class AddressbookUserSessionBean extends BaseAddressbookEnterpriseBean im
                        assert (managedLandLine instanceof DialableLandLineNumber) : MessageFormat.format("Land line number with id {0} not found but should be.", managedLandLine.getPhoneId()); //NOI18N
 
                        // Copy all
-                       LandLineNumbers.copyAll(managedUser.getUserContact().getContactLandLineNumber(), managedLandLine);
+                       LandLineNumbers.copyLandLineNumberData(managedUser.getUserContact().getContactLandLineNumber(), managedLandLine);
 
                        // Set it back
                        managedContact.setContactLandLineNumber(managedLandLine);