From dc2c4b2f79687c9fba2ea1c452519d62a5b1c4d3 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 --- .../jcontacts/contact/FinancialsContactSessionBean.java | 1 - .../jusercore/model/user/FinancialsUserSessionBean.java | 7 ++++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/java/org/mxchange/jcontacts/contact/FinancialsContactSessionBean.java b/src/java/org/mxchange/jcontacts/contact/FinancialsContactSessionBean.java index a0975b5..72f618d 100644 --- a/src/java/org/mxchange/jcontacts/contact/FinancialsContactSessionBean.java +++ b/src/java/org/mxchange/jcontacts/contact/FinancialsContactSessionBean.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.jfinancials.database.BaseFinancialsDatabaseBean; diff --git a/src/java/org/mxchange/jusercore/model/user/FinancialsUserSessionBean.java b/src/java/org/mxchange/jusercore/model/user/FinancialsUserSessionBean.java index 2da8f20..9594d7e 100644 --- a/src/java/org/mxchange/jusercore/model/user/FinancialsUserSessionBean.java +++ b/src/java/org/mxchange/jusercore/model/user/FinancialsUserSessionBean.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.jfinancials.database.BaseFinancialsDatabaseBean; import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber; import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber; @@ -587,7 +588,7 @@ public class FinancialsUserSessionBean extends BaseFinancialsDatabaseBean implem assert (detachedUser instanceof User) : MessageFormat.format("User with id {0} not merged, but should be.", user.getUserId()); //NOI18N // Copy all data - detachedUser.copyAll(user); + UserUtils.copyAll(user, detachedUser); // Set as updated detachedUser.setUserUpdated(new GregorianCalendar()); @@ -698,7 +699,7 @@ public class FinancialsUserSessionBean extends BaseFinancialsDatabaseBean implem assert (detachedUser instanceof User) : MessageFormat.format("User with id {0} not merged, but should be.", user.getUserId()); //NOI18N // Copy all data - detachedUser.copyAll(user); + UserUtils.copyAll(user, detachedUser); // Set as updated detachedUser.setUserUpdated(new GregorianCalendar()); @@ -717,7 +718,7 @@ public class FinancialsUserSessionBean extends BaseFinancialsDatabaseBean implem Contact detachedContact = this.getEntityManager().merge(foundContact); // Copy all - detachedContact.copyAll(user.getUserContact()); + ContactUtils.copyAll(user.getUserContact(), detachedContact); // Set it back in user user.setUserContact(detachedContact); -- 2.39.5