From 09a492fd7f4053debf02fa0ceb55e2f699fc4ff2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Fri, 23 Jun 2017 20:23:39 +0200 Subject: [PATCH] Please cherry-pick: - 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. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../mxchange/jcontacts/contact/JobsContactSessionBean.java | 1 - .../mxchange/jusercore/model/user/JobsUserSessionBean.java | 7 ++++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/java/org/mxchange/jcontacts/contact/JobsContactSessionBean.java b/src/java/org/mxchange/jcontacts/contact/JobsContactSessionBean.java index 88956b7..a08542a 100644 --- a/src/java/org/mxchange/jcontacts/contact/JobsContactSessionBean.java +++ b/src/java/org/mxchange/jcontacts/contact/JobsContactSessionBean.java @@ -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; diff --git a/src/java/org/mxchange/jusercore/model/user/JobsUserSessionBean.java b/src/java/org/mxchange/jusercore/model/user/JobsUserSessionBean.java index 4598a86..efe3c12 100644 --- a/src/java/org/mxchange/jusercore/model/user/JobsUserSessionBean.java +++ b/src/java/org/mxchange/jusercore/model/user/JobsUserSessionBean.java @@ -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); -- 2.39.5