From: Roland Haeder Date: Thu, 13 Apr 2017 13:11:21 +0000 (+0200) Subject: renamed cellphone -> mobile X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=abd5ca3138caa70d5d71fa19ce90b0de3b6d5a15;p=jbonuscard-core.git renamed cellphone -> mobile Signed-off-by: Roland Häder --- diff --git a/src/org/mxchange/jfinancials/database/BaseFinancialsDatabaseBean.java b/src/org/mxchange/jfinancials/database/BaseFinancialsDatabaseBean.java index b17fdca..ce4345d 100644 --- a/src/org/mxchange/jfinancials/database/BaseFinancialsDatabaseBean.java +++ b/src/org/mxchange/jfinancials/database/BaseFinancialsDatabaseBean.java @@ -129,7 +129,7 @@ public abstract class BaseFinancialsDatabaseBean extends BaseDatabaseBean { 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)) { @@ -152,7 +152,7 @@ public abstract class BaseFinancialsDatabaseBean extends BaseDatabaseBean { // 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()); @@ -163,21 +163,21 @@ public abstract class BaseFinancialsDatabaseBean extends BaseDatabaseBean { } /** - * Returnes a detached instance from given cellphone instance + * Returnes a detached instance from given mobile instance *

* @param mobileNumber Mobile instance - * @param fetchedNumber Found cellphone number in database + * @param fetchedNumber Found mobile number in database *

* @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 @@ -396,7 +396,7 @@ public abstract class BaseFinancialsDatabaseBean extends BaseDatabaseBean { } /** - * Merges given (detached) contact's cellphone, land-line and fax numbers + * Merges given (detached) contact's mobile, land-line and fax numbers *

* @param detachedContact Detached contact instance */ @@ -417,17 +417,17 @@ public abstract class BaseFinancialsDatabaseBean extends BaseDatabaseBean { } // 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 @@ -588,14 +588,14 @@ public abstract class BaseFinancialsDatabaseBean extends BaseDatabaseBean { // 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 @@ -606,7 +606,7 @@ public abstract class BaseFinancialsDatabaseBean extends BaseDatabaseBean { // 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 @@ -624,7 +624,7 @@ public abstract class BaseFinancialsDatabaseBean extends BaseDatabaseBean { // 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 @@ -647,7 +647,7 @@ public abstract class BaseFinancialsDatabaseBean extends BaseDatabaseBean { * Updates all contacts's phone entry's updated timestamps *

* @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 @@ -673,12 +673,12 @@ public abstract class BaseFinancialsDatabaseBean extends BaseDatabaseBean { // 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 @@ -706,12 +706,12 @@ public abstract class BaseFinancialsDatabaseBean extends BaseDatabaseBean { } // 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