// Find contact
Contact managedContact = this.getEntityManager().find(UserContact.class, contact.getContactId());
+ // Merge phone number
+ DialableFaxNumber managedNumber = this.getEntityManager().merge(faxNumber);
+
// Set fax number in contact
- managedContact.setContactFaxNumber(faxNumber);
+ managedContact.setContactFaxNumber(managedNumber);
// Trace message
this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.linkExistingFaxNumberWithContact: managedContact={1} - EXIT!", this.getClass().getSimpleName(), managedContact)); //NOI18N
// Find contact
Contact managedContact = this.getEntityManager().find(UserContact.class, contact.getContactId());
- // Set landline number in contact
- managedContact.setContactLandLineNumber(landLineNumber);
+ // Merge phone number
+ DialableLandLineNumber managedNumber = this.getEntityManager().merge(landLineNumber);
+
+ // Set fax number in contact
+ managedContact.setContactLandLineNumber(managedNumber);
// Trace message
this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.linkExistingLandLineNumberWithContact: managedContact={1} - EXIT!", this.getClass().getSimpleName(), managedContact)); //NOI18N
// Find contact
Contact managedContact = this.getEntityManager().find(UserContact.class, contact.getContactId());
- // Set landline number in contact
- managedContact.setContactMobileNumber(mobileNumber);
+ // Merge phone number
+ DialableMobileNumber managedNumber = this.getEntityManager().merge(mobileNumber);
+
+ // Set fax number in contact
+ managedContact.setContactMobileNumber(managedNumber);
// Trace message
this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.linkExistingMobileNumberWithContact: managedContact={1} - EXIT!", this.getClass().getSimpleName(), managedContact)); //NOI18N