]> git.mxchange.org Git - jjobs-ejb.git/commitdiff
Please cherry-pick:
authorRoland Häder <roland@mxchange.org>
Fri, 23 Jun 2017 18:23:39 +0000 (20:23 +0200)
committerRoland Häder <roland@mxchange.org>
Fri, 23 Jun 2017 18:35:04 +0000 (20:35 +0200)
- rewrote to new copyAll() methods as having them in POJOs is no good idea
  anyway as you should keep those objects as simple as possible.

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

index 88956b70e86b0e37e39038ffa8982152904c31b4..a08542a8b0716cd3ec16e4cbd67cf5072b685ce0 100644 (file)
@@ -23,7 +23,6 @@ import java.util.Objects;
 import javax.ejb.Stateless;
 import javax.persistence.NoResultException;
 import javax.persistence.Query;
-import org.mxchange.jcontacts.contact.utils.ContactUtils;
 import org.mxchange.jcontacts.exceptions.ContactNotFoundException;
 import org.mxchange.jjobs.database.BaseJobsDatabaseBean;
 
index 4598a86847c11ba0945c2aa3b4886c142b65dec8..efe3c1255bf4a9d8fbec3ed2eb4c94f430366f61 100644 (file)
@@ -29,6 +29,7 @@ import javax.persistence.NoResultException;
 import javax.persistence.PersistenceException;
 import javax.persistence.Query;
 import org.mxchange.jcontacts.contact.Contact;
+import org.mxchange.jcontacts.contact.ContactUtils;
 import org.mxchange.jjobs.database.BaseJobsDatabaseBean;
 import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
 import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
@@ -584,7 +585,7 @@ public class JobsUserSessionBean extends BaseJobsDatabaseBean implements UserSes
                assert (managedUser instanceof User) : MessageFormat.format("User with id {0} not found, but should be.", user.getUserId()); //NOI18N
 
                // Copy all data
-               managedUser.copyAll(user);
+               UserUtils.copyAll(user, managedUser);
 
                // Set as updated
                managedUser.setUserUpdated(new GregorianCalendar());
@@ -713,7 +714,7 @@ public class JobsUserSessionBean extends BaseJobsDatabaseBean implements UserSes
                assert (managedUser instanceof User) : MessageFormat.format("User with id {0} not found, but should be.", user.getUserId()); //NOI18N
 
                // Copy all data
-               managedUser.copyAll(user);
+               UserUtils.copyAll(user, managedUser);
 
                // Set as updated
                managedUser.setUserUpdated(new GregorianCalendar());
@@ -729,7 +730,7 @@ public class JobsUserSessionBean extends BaseJobsDatabaseBean implements UserSes
                this.getLoggerBeanLocal().logDebug(MessageFormat.format("updateUserPersonalData: managedContact.contactId={0}", managedContact.getContactId())); //NOI18N
 
                // Copy all
-               managedContact.copyAll(user.getUserContact());
+               ContactUtils.copyAll(user.getUserContact(), managedContact);
 
                // Set it back in user
                user.setUserContact(managedContact);