private boolean isLandLineUnlinked;
/**
- * Whether a mobile entry has been unlinked
+ * Whether a cellphone entry has been unlinked
*/
- private boolean isMobileUnlinked;
+ private boolean isMobileNumberUnlinked;
/**
- * Land-line id number
+ * Phone number area code
*/
- private Long landLineId;
+ private Integer landLineAreaCode;
/**
- * Mobile number's carrier
+ * Country instance for phone number
*/
- private MobileProvider mobileCarrier;
+ private Country landLineCountry;
/**
- * Mobile id number
+ * Land-line id number
*/
- private Long mobileId;
+ private Long landLineId;
/**
- * Mobile number
+ * Phone number
*/
- private Long mobileNumber;
+ private Long landLineNumber;
/**
- * Phone number area code
+ * Mobile id number
*/
- private Integer phoneAreaCode;
+ private Long mobileId;
/**
- * Country instance for phone number
+ * Mobile number
*/
- private Country phoneCountry;
+ private Long mobileNumber;
/**
- * Phone number
+ * Mobile number's provider
*/
- private Long phoneNumber;
+ private MobileProvider mobileProvider;
/**
* Street
@Override
public void copyContactToController (final Contact contact) {
+ // Log message
+ //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("AdminContactController::copyContactToController(): contact={0} - CALLED!", contact)); //NOI18N
+
// The contact instance must be valid
if (null == contact) {
// Throw NPE again
this.setStreet(contact.getContactStreet());
this.setZipCode(contact.getContactZipCode());
- // ... mobile data
+ // Is the cell phone set?
if (contact.getContactMobileNumber() instanceof DialableMobileNumber) {
+ // ... cellphone data
this.setMobileId(contact.getContactMobileNumber().getPhoneId());
- this.setMobileCarrier(contact.getContactMobileNumber().getMobileProvider());
+ this.setMobileProvider(contact.getContactMobileNumber().getMobileProvider());
this.setMobileNumber(contact.getContactMobileNumber().getPhoneNumber());
}
- // ... fax data
+ // Is the fax set?
if (contact.getContactFaxNumber() instanceof DialableFaxNumber) {
+ // ... fax data
this.setFaxId(contact.getContactFaxNumber().getPhoneId());
this.setFaxAreaCode(contact.getContactFaxNumber().getPhoneAreaCode());
this.setFaxCountry(contact.getContactFaxNumber().getPhoneCountry());
this.setFaxNumber(contact.getContactFaxNumber().getPhoneNumber());
}
- // .. land-line data
+ // Is the land-line number set?
if (contact.getContactLandLineNumber() instanceof DialableLandLineNumber) {
+ // .. land-line data
this.setLandLineId(contact.getContactLandLineNumber().getPhoneId());
- this.setPhoneAreaCode(contact.getContactLandLineNumber().getPhoneAreaCode());
- this.setPhoneCountry(contact.getContactLandLineNumber().getPhoneCountry());
- this.setPhoneNumber(contact.getContactLandLineNumber().getPhoneNumber());
+ this.setLandLineAreaCode(contact.getContactLandLineNumber().getPhoneAreaCode());
+ this.setLandLineCountry(contact.getContactLandLineNumber().getPhoneCountry());
+ this.setLandLineNumber(contact.getContactLandLineNumber().getPhoneNumber());
}
+
+ // Log message
+ //* NOISY-DEBUG: */ System.out.println("AdminContactController::copyContactToController(): EXIT!"); //NOI18N
}
@Override
public Contact createContactInstance () {
+ // Are all minimum fields set?
+ if (this.getGender() == null) {
+ // Throw NPE
+ throw new NullPointerException("gender is null"); //NOI18N
+ } else if (this.getFirstName() == null) {
+ // Throw NPE
+ throw new NullPointerException("firstName is null"); //NOI18N
+ } else if (this.getFirstName().isEmpty()) {
+ // Empty string
+ throw new IllegalStateException("firstName is empty"); //NOI18N
+ } else if (this.getFamilyName() == null) {
+ // Throw NPE
+ throw new NullPointerException("familyName is null"); //NOI18N
+ } else if (this.getFamilyName().isEmpty()) {
+ // Empty string
+ throw new IllegalStateException("familyName is empty"); //NOI18N
+ }
+
// Generate phone number
- DialableLandLineNumber phone = new LandLineNumber(this.getPhoneCountry(), this.getPhoneAreaCode(), this.getPhoneNumber());
- DialableMobileNumber mobile = new MobileNumber(this.getMobileCarrier(), this.getMobileNumber());
+ DialableLandLineNumber landLine = new LandLineNumber(this.getLandLineCountry(), this.getLandLineAreaCode(), this.getLandLineNumber());
+ DialableMobileNumber mobile = new MobileNumber(this.getMobileProvider(), this.getMobileNumber());
DialableFaxNumber fax = new FaxNumber(this.getFaxCountry(), this.getFaxAreaCode(), this.getFaxNumber());
// Create new instance
Contact contact = new UserContact(this.getGender(), this.getFirstName(), this.getFamilyName());
- // Check if contact instance is in helper and valid
- if (null == contact) {
- // Throw NPE
- throw new NullPointerException("beanHelper.contact is null"); //NOI18N
- } else if (contact.getContactId() == null) {
- // Throw NPE again
- throw new NullPointerException("beanHelper.contact.contactId is null"); //NOI18N //NOI18N
- } else if (contact.getContactId() < 1) {
- // Invalid id
- throw new IllegalStateException(MessageFormat.format("beanHelper.contact.contactId={0} is invalid", contact.getContactId())); //NOI18N
+ // Add all others
+ contact.setContactBirthday(this.getBirthday());
+ contact.setContactStreet(this.getStreet());
+ contact.setContactHouseNumber(this.getHouseNumber());
+ contact.setContactZipCode(this.getZipCode());
+ contact.setContactCity(this.getCity());
+ contact.setContactCountry(this.getCountry());
+ contact.setContactEmailAddress(this.getEmailAddress());
+ contact.setContactBirthday(this.getBirthday());
+ contact.setContactComment(this.getComment());
+
+ // Set ownContact
+ contact.setContactOwnContact(Boolean.TRUE);
+
+ // Don't set null or wrong references
+ if ((landLine instanceof DialableLandLineNumber) && (landLine.getPhoneCountry() instanceof Country) && (this.getLandLineAreaCode() != null) && (this.getLandLineNumber() != null) && (this.getLandLineAreaCode() > 0) && (this.getLandLineNumber() > 0)) {
+ // Now the number must be given
+ if (landLine.getPhoneAreaCode() == null) {
+ // Is null
+ throw new NullPointerException("phone.phoneAreaCode is null"); //NOI18N
+ } else if (landLine.getPhoneAreaCode() < 1) {
+ // Abort here
+ throw new IllegalArgumentException("phone.phoneAreaCode is zero or below."); //NOI18N
+ } else if (landLine.getPhoneNumber() == null) {
+ // Is null
+ throw new NullPointerException("phone.phoneNumber is null"); //NOI18N
+ } else if (landLine.getPhoneNumber() < 1) {
+ // Abort here
+ throw new IllegalArgumentException("phone.phoneNumber is zero or below."); //NOI18N
+ }
+
+ // Set phone number
+ contact.setContactLandLineNumber(landLine);
}
- // Update all data in contact
- this.updateContactData(contact);
+ // Don't set null or wrong references
+ if ((fax instanceof DialableFaxNumber) && (fax.getPhoneCountry() instanceof Country) && (this.getFaxAreaCode() != null) && (this.getFaxNumber() != null) && (this.getFaxAreaCode() > 0) && (this.getFaxNumber() > 0)) {
+ // Now the number must be given
+ if (fax.getPhoneAreaCode() == null) {
+ // Is null
+ throw new NullPointerException("fax.phoneAreaCode is null"); //NOI18N
+ } else if (fax.getPhoneAreaCode() < 1) {
+ // Abort here
+ throw new IllegalArgumentException("fax.phoneAreaCode is zero or below."); //NOI18N
+ } else if (fax.getPhoneNumber() == null) {
+ // Is null
+ throw new NullPointerException("fax.phoneNumber is null"); //NOI18N
+ } else if (fax.getPhoneNumber() < 1) {
+ // Abort here
+ throw new IllegalArgumentException("fax.phoneNumber is zero or below."); //NOI18N
+ }
- // Call EJB for updating contact data
- Contact updatedContact = this.contactBean.updateContactData(contact, this.isMobileUnlinked, this.isLandLineUnlinked, this.isFaxUnlinked);
+ // Set fax number
+ contact.setContactFaxNumber(fax);
+ }
- // Fire event
- this.updatedContactEvent.fire(new AdminUpdatedContactEvent(updatedContact));
+ // Is the provider set?
+ if ((mobile instanceof DialableMobileNumber) && (this.getMobileProvider() instanceof MobileProvider) && (this.getMobileNumber() != null) && (this.getMobileNumber() > 0)) {
+ // Is the number set?
+ if (mobile.getPhoneNumber() == null) {
+ // Is null
+ throw new NullPointerException("cellphone.phoneNumber is null"); //NOI18N
+ } else if (mobile.getPhoneNumber() < 1) {
+ // Abort here
+ throw new IllegalArgumentException("cellphone.phoneNumber is zero or below."); //NOI18N
+ }
- // Clear bean
- this.clear();
+ // Set cellphone number
+ contact.setContactMobileNumber(mobile);
+ }
// Return it
return contact;
this.updateContactData(contact);
// Call EJB for updating contact data
- Contact updatedContact = this.contactBean.updateContactData(contact, this.isMobileUnlinked, this.isLandLineUnlinked, this.isFaxUnlinked);
+ Contact updatedContact = this.contactBean.updateContactData(contact, this.isMobileNumberUnlinked, this.isLandLineUnlinked, this.isFaxUnlinked);
// Fire event
this.updatedContactEvent.fire(new AdminUpdatedContactEvent(updatedContact));
this.contactId = contactId;
}
+ @Override
+ public String getControllerType () {
+ return "admin"; //NOI18N
+ }
+
+ @Override
+ @Deprecated
+ public void setControllerType (final String controllerType) {
+ throw new UnsupportedOperationException("Setting controller type is not supported."); //NOI18N
+ }
+
@Override
public Country getCountry () {
return this.country;
}
@Override
- public Long getLandLineId () {
- return this.landLineId;
+ public Integer getLandLineAreaCode () {
+ return this.landLineAreaCode;
}
@Override
- public void setLandLineId (final Long landLineId) {
- this.landLineId = landLineId;
+ public void setLandLineAreaCode (final Integer landLineAreaCode) {
+ this.landLineAreaCode = landLineAreaCode;
}
@Override
- public MobileProvider getMobileCarrier () {
- return this.mobileCarrier;
+ public Country getLandLineCountry () {
+ return this.landLineCountry;
}
@Override
- public void setMobileCarrier (final MobileProvider mobileCarrier) {
- this.mobileCarrier = mobileCarrier;
+ public void setLandLineCountry (final Country landLineCountry) {
+ this.landLineCountry = landLineCountry;
}
@Override
- public Long getMobileId () {
- return this.mobileId;
+ public Long getLandLineId () {
+ return this.landLineId;
}
@Override
- public void setMobileId (final Long mobileId) {
- this.mobileId = mobileId;
+ public void setLandLineId (final Long landLineId) {
+ this.landLineId = landLineId;
}
@Override
- public Long getMobileNumber () {
- return this.mobileNumber;
+ public Long getLandLineNumber () {
+ return this.landLineNumber;
}
@Override
- public void setMobileNumber (Long mobileNumber) {
- this.mobileNumber = mobileNumber;
+ public void setLandLineNumber (final Long landLineNumber) {
+ this.landLineNumber = landLineNumber;
}
@Override
- public Integer getPhoneAreaCode () {
- return this.phoneAreaCode;
+ public Long getMobileId () {
+ return this.mobileId;
}
@Override
- public void setPhoneAreaCode (final Integer phoneAreaCode) {
- this.phoneAreaCode = phoneAreaCode;
+ public void setMobileId (final Long mobileId) {
+ this.mobileId = mobileId;
}
@Override
- public Country getPhoneCountry () {
- return this.phoneCountry;
+ public Long getMobileNumber () {
+ return this.mobileNumber;
}
@Override
- public void setPhoneCountry (final Country phoneCountry) {
- this.phoneCountry = phoneCountry;
+ public void setMobileNumber (Long mobileNumber) {
+ this.mobileNumber = mobileNumber;
}
@Override
- public Long getPhoneNumber () {
- return this.phoneNumber;
+ public MobileProvider getMobileProvider () {
+ return this.mobileProvider;
}
@Override
- public void setPhoneNumber (final Long phoneNumber) {
- this.phoneNumber = phoneNumber;
+ public void setMobileProvider (final MobileProvider mobileProvider) {
+ this.mobileProvider = mobileProvider;
}
@Override
Context context = new InitialContext();
// Try to lookup
- this.contactBean = (ContactSessionBeanRemote) context.lookup("java:global/jfinancials-ejb/contact!org.mxchange.jcontacts.contact.ContactSessionBeanRemote"); //NOI18N
+ this.contactBean = (ContactSessionBeanRemote) context.lookup("java:global/pizzaservice-ejb/contact!org.mxchange.jcontacts.contact.ContactSessionBeanRemote"); //NOI18N
+
+ // Try to lookup (administative)
+ this.adminContactBean = (AdminContactSessionBeanRemote) context.lookup("java:global/pizzaservice-ejb/adminContact!org.mxchange.jcontacts.contact.AdminContactSessionBeanRemote"); //NOI18N
} catch (final NamingException e) {
// Throw again
throw new FaceletException(e);
private void clear () {
// Clear all data
// - personal data
- this.setGender(null);
this.setTitle(null);
this.setFirstName(null);
this.setFamilyName(null);
// - contact data
this.setEmailAddress(null);
- this.setPhoneCountry(null);
- this.setPhoneAreaCode(null);
- this.setPhoneNumber(null);
- this.setMobileCarrier(null);
+ this.setLandLineCountry(null);
+ this.setLandLineAreaCode(null);
+ this.setLandLineNumber(null);
+ this.setMobileProvider(null);
this.setMobileNumber(null);
this.setFaxCountry(null);
this.setFaxAreaCode(null);
contact.setContactCity(this.getCity());
contact.setContactCountry(this.getCountry());
- // Update contact's mobile number
- this.isMobileUnlinked = ContactUtils.updateMobileNumber(contact, this.getMobileCarrier(), this.getMobileNumber());
+ // Update contact's cellphone number
+ this.isMobileNumberUnlinked = ContactUtils.updateMobileNumber(contact, this.getMobileProvider(), this.getMobileNumber());
// Update contact's land-line number
- this.isLandLineUnlinked = ContactUtils.updateLandLineNumber(contact, this.getPhoneCountry(), this.getPhoneAreaCode(), this.getPhoneNumber());
+ this.isLandLineUnlinked = ContactUtils.updateLandLineNumber(contact, this.getLandLineCountry(), this.getLandLineAreaCode(), this.getLandLineNumber());
// Update contact's fax number
this.isFaxUnlinked = ContactUtils.updateFaxNumber(contact, this.getFaxCountry(), this.getFaxAreaCode(), this.getFaxNumber());
String editContactData ();
/**
- * Getter for mobile id
+ * Getter for cellphone id
* <p>
* @return Mobile id
*/
Long getMobileId ();
/**
- * Setter for mobile id
+ * Setter for cellphone id
* <p>
- * @param mobileId Mobile id
+ * @param cellphoneId Mobile id
*/
- void setMobileId (final Long mobileId);
+ void setMobileId (final Long cellphoneId);
/**
* Getter for fax id
void setBirthday (final Date birthday);
/**
- * Getter for mobile number's carrier
+ * Getter for ellphone number's carrier
* <p>
* @return Mobile number's carrier
*/
- MobileProvider getMobileCarrier ();
+ MobileProvider getMobileProvider ();
/**
- * Setter for mobile number's carrier prefix
+ * Setter for cellphone number's carrier prefix
* <p>
- * @param mobileCarrier Mobile number's carrier prefix
+ * @param cellphoneCarrier Mobile number's carrier prefix
*/
- void setMobileCarrier (final MobileProvider mobileCarrier);
+ void setMobileProvider (final MobileProvider cellphoneCarrier);
/**
- * Getter for mobile number
+ * Getter for ellphone number
* <p>
* @return Mobile number
*/
Long getMobileNumber ();
/**
- * Setter for mobile number
+ * Setter for ellphone number
* <p>
* @param mobileNumber Mobile number
*/
* <p>
* @return Phone number's area code
*/
- Integer getPhoneAreaCode ();
+ Integer getLandLineAreaCode ();
/**
* Setter for phone number's area code
* <p>
* @param phoneAreaCode Phone number's area code
*/
- void setPhoneAreaCode (final Integer phoneAreaCode);
+ void setLandLineAreaCode (final Integer phoneAreaCode);
/**
* Getter for phone number's country instance
* <p>
* @return Phone number's country instance
*/
- Country getPhoneCountry ();
+ Country getLandLineCountry ();
/**
* Setter for phone number's country instance
* <p>
* @param phoneCountry Phone number's country instance
*/
- void setPhoneCountry (final Country phoneCountry);
+ void setLandLineCountry (final Country phoneCountry);
/**
* Getter for phone number
* <p>
* @return Phone number
*/
- Long getPhoneNumber ();
+ Long getLandLineNumber ();
/**
* Setter for phone number
* <p>
* @param phoneNumber Phone number
*/
- void setPhoneNumber (final Long phoneNumber);
+ void setLandLineNumber (final Long phoneNumber);
/**
* Street
*/
void setZipCode (final Integer zipCode);
+ /**
+ * Getter for controller type
+ * <p>
+ * @return controller type
+ */
+ String getControllerType ();
+
+ /**
+ * Setter for controller type
+ * <p>
+ * @param controllerType Controller type
+ * <p>
+ * @deprecated Don't use this method
+ */
+ @Deprecated
+ void setControllerType (final String controllerType);
+
/**
* Returns a text respresentation of given phone number or null if not set.
* <p>
String generatePhoneNumber (final DialableNumber phoneNumber);
/**
- * Returns a text representation of given mobile number or null if not
+ * Returns a text representation of given cellphone number or null if not
* set.
* <p>
* @param mobileNumber Mobile number
private boolean isMobileUnlinked;
/**
- * Mobile number's carrier
+ * Phone number area code
*/
- private MobileProvider mobileCarrier;
+ private Integer landLineAreaCode;
/**
- * Mobile number
+ * Country instance for phone number
*/
- private Long mobileNumber;
+ private Country landLineCountry;
/**
- * Phone number area code
+ * Phone number
*/
- private Integer phoneAreaCode;
+ private Long landLineNumber;
/**
- * Country instance for phone number
+ * Mobile number
*/
- private Country phoneCountry;
+ private Long mobileNumber;
/**
- * Phone number
+ * Mobile number's carrier
*/
- private Long phoneNumber;
+ private MobileProvider mobileProvider;
/**
* A list of all selectable contacts
assert (this.isRequiredPersonalDataSet()) : "not all personal data is set"; //NOI18N
// Generate phone number
- DialableLandLineNumber phone = new LandLineNumber(this.getPhoneCountry(), this.getPhoneAreaCode(), this.getPhoneNumber());
- DialableMobileNumber mobile = new MobileNumber(this.getMobileCarrier(), this.getMobileNumber());
+ DialableLandLineNumber phone = new LandLineNumber(this.getLandLineCountry(), this.getLandLineAreaCode(), this.getLandLineNumber());
+ DialableMobileNumber mobile = new MobileNumber(this.getMobileProvider(), this.getMobileNumber());
DialableFaxNumber fax = new FaxNumber(this.getFaxCountry(), this.getFaxAreaCode(), this.getFaxNumber());
// Create new contact
contact.setContactComment(this.getComment());
// Don't set null or wrong references
- if ((phone instanceof DialableLandLineNumber) && (phone.getPhoneCountry() instanceof Country) && (this.getPhoneAreaCode() != null) && (this.getPhoneNumber() != null) && (this.getPhoneAreaCode() > 0) && (this.getPhoneNumber() > 0)) {
+ if ((phone instanceof DialableLandLineNumber) && (phone.getPhoneCountry() instanceof Country) && (this.getLandLineAreaCode() != null) && (this.getLandLineNumber() != null) && (this.getLandLineAreaCode() > 0) && (this.getLandLineNumber() > 0)) {
// Now the number must be given
if (phone.getPhoneAreaCode() == null) {
// Is null
}
// Is the provider set?
- if ((mobile instanceof DialableMobileNumber) && (this.getMobileCarrier() instanceof MobileProvider) && (this.getMobileNumber() != null) && (this.getMobileNumber() > 0)) {
+ if ((mobile instanceof DialableMobileNumber) && (this.getMobileProvider() instanceof MobileProvider) && (this.getMobileNumber() != null) && (this.getMobileNumber() > 0)) {
// Is the number set?
if (mobile.getPhoneNumber() == null) {
// Is null
contact.setContactCountry(this.getCountry());
// Update contact's mobile number
- this.isMobileUnlinked = ContactUtils.updateMobileNumber(contact, this.getMobileCarrier(), this.getMobileNumber());
+ this.isMobileUnlinked = ContactUtils.updateMobileNumber(contact, this.getMobileProvider(), this.getMobileNumber());
// Update contact's land-line number
- this.isLandLineUnlinked = ContactUtils.updateLandLineNumber(contact, this.getPhoneCountry(), this.getPhoneAreaCode(), this.getPhoneNumber());
+ this.isLandLineUnlinked = ContactUtils.updateLandLineNumber(contact, this.getLandLineCountry(), this.getLandLineAreaCode(), this.getLandLineNumber());
// Update contact's fax number
this.isFaxUnlinked = ContactUtils.updateFaxNumber(contact, this.getFaxCountry(), this.getFaxAreaCode(), this.getFaxNumber());
}
@Override
- public MobileProvider getMobileCarrier () {
- return this.mobileCarrier;
+ public Integer getLandLineAreaCode () {
+ return this.landLineAreaCode;
}
@Override
- public void setMobileCarrier (final MobileProvider mobileCarrier) {
- this.mobileCarrier = mobileCarrier;
+ public void setLandLineAreaCode (final Integer landLineAreaCode) {
+ this.landLineAreaCode = landLineAreaCode;
}
@Override
- public Long getMobileNumber () {
- return this.mobileNumber;
+ public Country getLandLineCountry () {
+ return this.landLineCountry;
}
@Override
- public void setMobileNumber (final Long mobileNumber) {
- this.mobileNumber = mobileNumber;
+ public void setLandLineCountry (final Country landLineCountry) {
+ this.landLineCountry = landLineCountry;
}
@Override
- public Integer getPhoneAreaCode () {
- return this.phoneAreaCode;
+ public Long getLandLineNumber () {
+ return this.landLineNumber;
}
@Override
- public void setPhoneAreaCode (final Integer phoneAreaCode) {
- this.phoneAreaCode = phoneAreaCode;
+ public void setLandLineNumber (final Long landLineNumber) {
+ this.landLineNumber = landLineNumber;
}
@Override
- public Country getPhoneCountry () {
- return this.phoneCountry;
+ public Long getMobileNumber () {
+ return this.mobileNumber;
}
@Override
- public void setPhoneCountry (final Country phoneCountry) {
- this.phoneCountry = phoneCountry;
+ public void setMobileNumber (final Long mobileNumber) {
+ this.mobileNumber = mobileNumber;
}
@Override
- public Long getPhoneNumber () {
- return this.phoneNumber;
+ public MobileProvider getMobileProvider () {
+ return this.mobileProvider;
}
@Override
- public void setPhoneNumber (final Long phoneNumber) {
- this.phoneNumber = phoneNumber;
+ public void setMobileProvider (final MobileProvider mobileProvider) {
+ this.mobileProvider = mobileProvider;
}
@Override
// - contact data
this.setEmailAddress(null);
this.setEmailAddressRepeat(null);
- this.setPhoneAreaCode(null);
- this.setPhoneCountry(null);
- this.setPhoneNumber(null);
- this.setMobileCarrier(null);
+ this.setLandLineAreaCode(null);
+ this.setLandLineCountry(null);
+ this.setLandLineNumber(null);
+ this.setMobileProvider(null);
this.setMobileNumber(null);
this.setFaxAreaCode(null);
this.setFaxCountry(null);
// - contact data
if ((phone instanceof DialableLandLineNumber) && (phone.getPhoneAreaCode() > 0)) {
- this.setPhoneCountry(phone.getPhoneCountry());
- this.setPhoneAreaCode(phone.getPhoneAreaCode());
- this.setPhoneNumber(phone.getPhoneNumber());
+ this.setLandLineCountry(phone.getPhoneCountry());
+ this.setLandLineAreaCode(phone.getPhoneAreaCode());
+ this.setLandLineNumber(phone.getPhoneNumber());
}
if ((mobile instanceof DialableMobileNumber) && (mobile.getMobileProvider() instanceof MobileProvider)) {
- this.setMobileCarrier(mobile.getMobileProvider());
+ this.setMobileProvider(mobile.getMobileProvider());
this.setMobileNumber(mobile.getPhoneNumber());
}