this.getLoggerBeanLocal().logDebug(MessageFormat.format("mergeContactData: foundContact.contactId={0}", foundContact.getContactId())); //NOI18N
// Copy all
- Contacts.copyAll(detachedContact, foundContact);
+ Contacts.copyContactData(detachedContact, foundContact);
// Merge contact instance
final Contact managedContact = this.getEntityManager().merge(foundContact);
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);
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);
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);
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
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
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
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.", user.getUserId()); //NOI18N
+ 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);
// Should be found!
assert (managedUser instanceof User) : MessageFormat.format("User with id {0} not found, but should be.", user.getUserId()); //NOI18N
- // Copy all data
- Users.copyAll(managedUser, managedUser);
-
// Set as updated
managedUser.setUserUpdated(new Date());
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());
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);
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);
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);