DialableMobileNumber mobileNumber = contact.getContactMobileNumber();
// Debug message
- this.getLoggerBeanLocal().logDebug(MessageFormat.format("setAllContactPhoneEntriesCreated: landLineNumber={0},faxNumber={1},cellphoneNumber={2}", landLineNumber, faxNumber, mobileNumber)); //NOI18N
+ this.getLoggerBeanLocal().logDebug(MessageFormat.format("setAllContactPhoneEntriesCreated: landLineNumber={0},faxNumber={1},mobileNumber={2}", landLineNumber, faxNumber, mobileNumber)); //NOI18N
// Is a phone number instance set?
if ((landLineNumber instanceof DialableLandLineNumber) && (landLineNumber.getPhoneId() == null)) {
// Is a mobile number instance set?
if ((mobileNumber instanceof DialableMobileNumber) && (mobileNumber.getPhoneId() == null)) {
// Debug message
- this.getLoggerBeanLocal().logDebug("setAllContactPhoneEntriesCreated: Setting created timestamp for cellphone number ..."); //NOI18N
+ this.getLoggerBeanLocal().logDebug("setAllContactPhoneEntriesCreated: Setting created timestamp for mobile number ..."); //NOI18N
// Set updated timestamp
mobileNumber.setPhoneEntryCreated(new GregorianCalendar());
}
/**
- * Returnes a detached instance from given cellphone instance
+ * Returnes a detached instance from given mobile instance
* <p>
* @param mobileNumber Mobile instance
- * @param fetchedNumber Found cellphone number in database
+ * @param fetchedNumber Found mobile number in database
* <p>
* @return Detached instance
*/
protected DialableMobileNumber getDetached (final DialableMobileNumber mobileNumber, final DialableMobileNumber fetchedNumber) {
// Trace message
- this.getLoggerBeanLocal().logTrace(MessageFormat.format("getDetached: cellphoneNumber={0},fetchedNumber={1} - CALLED!", mobileNumber, fetchedNumber)); //NOI18N
+ this.getLoggerBeanLocal().logTrace(MessageFormat.format("getDetached: mobileNumber={0},fetchedNumber={1} - CALLED!", mobileNumber, fetchedNumber)); //NOI18N
// Should be valid
if (null == mobileNumber) {
// Throw NPE
- throw new NullPointerException("cellphoneNumber is null"); //NOI18N
+ throw new NullPointerException("mobileNumber is null"); //NOI18N
} else if (fetchedNumber.getPhoneId() == null) {
// ..and again
throw new NullPointerException("fetchedNumber.phoneId is null"); //NOI18N
}
/**
- * Merges given (detached) contact's cellphone, land-line and fax numbers
+ * Merges given (detached) contact's mobile, land-line and fax numbers
* <p>
* @param detachedContact Detached contact instance
*/
}
// Get all instances
- DialableMobileNumber cellphone = detachedContact.getContactMobileNumber();
+ DialableMobileNumber mobile = detachedContact.getContactMobileNumber();
DialableLandLineNumber landLine = detachedContact.getContactLandLineNumber();
DialableFaxNumber fax = detachedContact.getContactFaxNumber();
- // Is there a cellphone instance set?
- if (cellphone instanceof DialableMobileNumber) {
+ // Is there a mobile instance set?
+ if (mobile instanceof DialableMobileNumber) {
// Debug message
- this.getLoggerBeanLocal().logDebug(MessageFormat.format("updateUserPersonalData: cellphone.phoneId={0} is being updated ...", cellphone.getPhoneId())); //NOI18N
+ this.getLoggerBeanLocal().logDebug(MessageFormat.format("updateUserPersonalData: mobile.phoneId={0} is being updated ...", mobile.getPhoneId())); //NOI18N
// Then find it, too
- DialableMobileNumber foundMobile = this.getEntityManager().find(cellphone.getClass(), cellphone.getPhoneId());
+ DialableMobileNumber foundMobile = this.getEntityManager().find(mobile.getClass(), mobile.getPhoneId());
// Should be there
assert (foundMobile instanceof DialableMobileNumber) : MessageFormat.format("Mobile number with id {0} not found but should be.", foundMobile.getPhoneId()); //NOI18N
// Debug message
this.getLoggerBeanLocal().logDebug(MessageFormat.format("setAllContactPhoneEntries: other.contactMobileNumber={0}", other.getContactMobileNumber())); //NOI18N
- // Is other cellphone not set?
+ // Is other mobile not set?
if ((other.getContactMobileNumber() == null) || (PhoneUtils.isSameMobileNumber(contact.getContactMobileNumber(), other.getContactMobileNumber()))) {
// Debug message
- this.getLoggerBeanLocal().logDebug("setAllContactPhoneEntries: Copying cellphone entry ..."); //NOI18N
+ this.getLoggerBeanLocal().logDebug("setAllContactPhoneEntries: Copying mobile entry ..."); //NOI18N
// Is the fax number set?
if (other.getContactMobileNumber() instanceof DialableMobileNumber) {
- // Copy cellphone number
+ // Copy mobile number
contact.setContactMobileNumber(this.getDetached(other.getContactMobileNumber(), contact.getContactMobileNumber()));
} else {
// Null it
// Debug message
this.getLoggerBeanLocal().logDebug(MessageFormat.format("setAllContactPhoneEntries: other.contactLandLineNumber={0}", other.getContactLandLineNumber())); //NOI18N
- // Is other cellphone not set?
+ // Is other mobile not set?
if ((other.getContactLandLineNumber() == null) || (PhoneUtils.isSameLandLineNumber(contact.getContactLandLineNumber(), other.getContactLandLineNumber()))) {
// Debug message
this.getLoggerBeanLocal().logDebug("setAllContactPhoneEntries: Copying land-line entry ..."); //NOI18N
// Debug message
this.getLoggerBeanLocal().logDebug(MessageFormat.format("setAllContactPhoneEntries: other.contactFaxNumber={0}", other.getContactFaxNumber())); //NOI18N
- // Is other cellphone not set?
+ // Is other mobile not set?
if ((other.getContactFaxNumber() == null) || (PhoneUtils.isSameFaxNumber(contact.getContactFaxNumber(), other.getContactFaxNumber()))) {
// Debug message
this.getLoggerBeanLocal().logDebug("setAllContactPhoneEntries: Copying fax entry ..."); //NOI18N
* Updates all contacts's phone entry's updated timestamps
* <p>
* @param contact Contact instance to update
- * @param isMobileUnlinked Whether a cellphone entry has been unlinked in
+ * @param isMobileUnlinked Whether a mobile entry has been unlinked in
* contact instance
* @param isLandlineUnlinked Whether a land-line entry has been unlinked in
* contact instance
// Get all phone instances
DialableLandLineNumber landLineNumber = contact.getContactLandLineNumber();
DialableFaxNumber faxNumber = contact.getContactFaxNumber();
- DialableMobileNumber cellphoneNumber = contact.getContactMobileNumber();
+ DialableMobileNumber mobileNumber = contact.getContactMobileNumber();
// Flags and instances must be constistent
- if (isMobileUnlinked && cellphoneNumber instanceof DialableMobileNumber) {
+ if (isMobileUnlinked && mobileNumber instanceof DialableMobileNumber) {
// Bad state
- throw new IllegalStateException("isCellPhoneUnlinked is TRUE, but cellphoneNumber is set."); //NOI18N
+ throw new IllegalStateException("isCellPhoneUnlinked is TRUE, but mobileNumber is set."); //NOI18N
} else if (isLandlineUnlinked && landLineNumber instanceof DialableLandLineNumber) {
// Bad state
throw new IllegalStateException("isLandlineUnlinked is TRUE, but landLineNumber is set."); //NOI18N
}
// Is a mobile number instance set?
- if ((cellphoneNumber instanceof DialableMobileNumber) && (cellphoneNumber.getPhoneId() instanceof Long) && (cellphoneNumber.getPhoneId() > 0)) {
+ if ((mobileNumber instanceof DialableMobileNumber) && (mobileNumber.getPhoneId() instanceof Long) && (mobileNumber.getPhoneId() > 0)) {
// Debug message
- this.getLoggerBeanLocal().logDebug("setAllContactPhoneEntriesUpdated: Setting updated timestamp for cellphone number ..."); //NOI18N
+ this.getLoggerBeanLocal().logDebug("setAllContactPhoneEntriesUpdated: Setting updated timestamp for mobile number ..."); //NOI18N
// Set updated timestamp
- cellphoneNumber.setPhoneEntryUpdated(new GregorianCalendar());
+ mobileNumber.setPhoneEntryUpdated(new GregorianCalendar());
}
// Trace message