]> git.mxchange.org Git - jbonuscard-core.git/commitdiff
Renaming season has started:
authorRoland Häder <roland@mxchange.org>
Tue, 16 Aug 2016 09:16:22 +0000 (11:16 +0200)
committerRoland Haeder <roland@mxchange.org>
Tue, 16 Aug 2016 17:28:17 +0000 (19:28 +0200)
- renamed cellphone to mobile (all occurences)
- let's don't discrimite other mobile phones, right?

src/org/mxchange/addressbook/database/BaseAddressbookDatabaseBean.java

index 0843b7501820b97b290ba85e5c56ab361a668a18..d699c018a83fad25933029b8be1681cf3fc8dd00 100644 (file)
@@ -164,17 +164,17 @@ public abstract class BaseAddressbookDatabaseBean extends BaseDatabaseBean {
        /**
         * Returnes a detached instance from given cellphone instance
         * <p>
-        * @param cellphoneNumber Cellphone instance
+        * @param mobileNumber Mobile instance
         * @param fetchedNumber Found cellphone number in database
         * <p>
         * @return Detached instance
         */
-       protected DialableMobileNumber getDetached (final DialableMobileNumber cellphoneNumber, final DialableMobileNumber fetchedNumber) {
+       protected DialableMobileNumber getDetached (final DialableMobileNumber mobileNumber, final DialableMobileNumber fetchedNumber) {
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("getDetached: cellphoneNumber={0},fetchedNumber={1} - CALLED!", cellphoneNumber, fetchedNumber)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("getDetached: cellphoneNumber={0},fetchedNumber={1} - CALLED!", mobileNumber, fetchedNumber)); //NOI18N
 
                // Should be valid
-               if (null == cellphoneNumber) {
+               if (null == mobileNumber) {
                        // Throw NPE
                        throw new NullPointerException("cellphoneNumber is null"); //NOI18N
                } else if (fetchedNumber.getPhoneId() == null) {
@@ -195,7 +195,7 @@ public abstract class BaseAddressbookDatabaseBean extends BaseDatabaseBean {
                DialableMobileNumber detachedNumber = null;
 
                // Is there a difference?
-               if (!PhoneUtils.isSameCellphoneNumber(cellphoneNumber, fetchedNumber)) {
+               if (!PhoneUtils.isSameMobileNumber(mobileNumber, fetchedNumber)) {
                        // Merge this entry
                        detachedNumber = this.getEntityManager().merge(foundNumber);
 
@@ -354,9 +354,9 @@ public abstract class BaseAddressbookDatabaseBean extends BaseDatabaseBean {
         * <p>
         * @param detachedContact Detached contact instance
         */
-       protected void mergeContactsCellphoneLandLineFaxNumbers (final Contact detachedContact) {
+       protected void mergeContactsMobileLandLineFaxNumbers (final Contact detachedContact) {
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("mergeContactsCellphoneLandLineFaxNumbers: detachedContact={0} - CALLED!", detachedContact)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("mergeContactsMobileLandLineFaxNumbers: detachedContact={0} - CALLED!", detachedContact)); //NOI18N
 
                // The contact instance must be valid
                if (null == detachedContact) {
@@ -381,22 +381,22 @@ public abstract class BaseAddressbookDatabaseBean extends BaseDatabaseBean {
                        this.getLoggerBeanLocal().logDebug(MessageFormat.format("updateUserPersonalData: cellphone.phoneId={0} is being updated ...", cellphone.getPhoneId())); //NOI18N
 
                        // Then find it, too
-                       DialableMobileNumber foundCellphone = this.getEntityManager().find(cellphone.getClass(), cellphone.getPhoneId());
+                       DialableMobileNumber foundMobile = this.getEntityManager().find(cellphone.getClass(), cellphone.getPhoneId());
 
                        // Should be there
-                       assert (foundCellphone instanceof DialableMobileNumber) : MessageFormat.format("Cellphone number with id {0} not found but should be.", foundCellphone.getPhoneId()); //NOI18N
+                       assert (foundMobile instanceof DialableMobileNumber) : MessageFormat.format("Mobile number with id {0} not found but should be.", foundMobile.getPhoneId()); //NOI18N
 
                        // Then merge it, too
-                       DialableMobileNumber detachedCellphone = this.getEntityManager().merge(foundCellphone);
+                       DialableMobileNumber detachedMobile = this.getEntityManager().merge(foundMobile);
 
                        // Should be there
-                       assert (detachedCellphone instanceof DialableMobileNumber) : MessageFormat.format("Cellphone number with id {0} not found but should be.", detachedCellphone.getPhoneId()); //NOI18N
+                       assert (detachedMobile instanceof DialableMobileNumber) : MessageFormat.format("Mobile number with id {0} not found but should be.", detachedMobile.getPhoneId()); //NOI18N
 
                        // Copy all
-                       detachedCellphone.copyAll(detachedContact.getContactMobileNumber());
+                       detachedMobile.copyAll(detachedContact.getContactMobileNumber());
 
                        // Set it back
-                       detachedContact.setContactMobileNumber(detachedCellphone);
+                       detachedContact.setContactMobileNumber(detachedMobile);
                }
 
                // Is there a  fax instance set?
@@ -448,7 +448,7 @@ public abstract class BaseAddressbookDatabaseBean extends BaseDatabaseBean {
                }
 
                // Trace message
-               this.getLoggerBeanLocal().logTrace("mergeContactsCellphoneLandLineFaxNumbers: EXIT!"); //NOI18N
+               this.getLoggerBeanLocal().logTrace("mergeContactsMobileLandLineFaxNumbers: EXIT!"); //NOI18N
        }
 
        /**
@@ -540,10 +540,10 @@ public abstract class BaseAddressbookDatabaseBean extends BaseDatabaseBean {
                }
 
                // Debug message
-               this.getLoggerBeanLocal().logDebug(MessageFormat.format("setAllContactPhoneEntries: other.contactCellphoneNumber={0}", other.getContactMobileNumber())); //NOI18N
+               this.getLoggerBeanLocal().logDebug(MessageFormat.format("setAllContactPhoneEntries: other.contactMobileNumber={0}", other.getContactMobileNumber())); //NOI18N
 
                // Is other cellphone not set?
-               if ((other.getContactMobileNumber() == null) || (PhoneUtils.isSameCellphoneNumber(contact.getContactMobileNumber(), other.getContactMobileNumber()))) {
+               if ((other.getContactMobileNumber() == null) || (PhoneUtils.isSameMobileNumber(contact.getContactMobileNumber(), other.getContactMobileNumber()))) {
                        // Debug message
                        this.getLoggerBeanLocal().logDebug("setAllContactPhoneEntries: Copying cellphone entry ..."); //NOI18N
 
@@ -601,16 +601,16 @@ public abstract class BaseAddressbookDatabaseBean extends BaseDatabaseBean {
         * Updates all contacts's phone entry's updated timestamps
         * <p>
         * @param contact Contact instance to update
-        * @param isCellphoneUnlinked Whether a cellphone entry has been unlinked in
+        * @param isMobileUnlinked Whether a cellphone entry has been unlinked in
         * contact instance
         * @param isLandlineUnlinked Whether a land-line entry has been unlinked in
         * contact instance
         * @param isFaxUnlinked Whether a fax entry has been unlinked in contact
         * instance
         */
-       protected void setAllContactPhoneEntriesUpdated (final Contact contact, final boolean isCellphoneUnlinked, final boolean isLandlineUnlinked, final boolean isFaxUnlinked) {
+       protected void setAllContactPhoneEntriesUpdated (final Contact contact, final boolean isMobileUnlinked, final boolean isLandlineUnlinked, final boolean isFaxUnlinked) {
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("setAllContactPhoneEntriesUpdated: contact={0},isCellphoneUnlinked={1},isLandlineUnlinked={2},isFaxUnlinked={3} - CALLED", contact, isCellphoneUnlinked, isLandlineUnlinked, isFaxUnlinked)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("setAllContactPhoneEntriesUpdated: contact={0},isMobileUnlinked={1},isLandlineUnlinked={2},isFaxUnlinked={3} - CALLED", contact, isMobileUnlinked, isLandlineUnlinked, isFaxUnlinked)); //NOI18N
 
                // The contact instance must be valid
                if (null == contact) {
@@ -630,7 +630,7 @@ public abstract class BaseAddressbookDatabaseBean extends BaseDatabaseBean {
                DialableMobileNumber cellphoneNumber = contact.getContactMobileNumber();
 
                // Flags and instances must be constistent
-               if (isCellphoneUnlinked && cellphoneNumber instanceof DialableMobileNumber) {
+               if (isMobileUnlinked && cellphoneNumber instanceof DialableMobileNumber) {
                        // Bad state
                        throw new IllegalStateException("isCellPhoneUnlinked is TRUE, but cellphoneNumber is set."); //NOI18N
                } else if (isLandlineUnlinked && landLineNumber instanceof DialableLandLineNumber) {