]> git.mxchange.org Git - pizzaservice-ejb.git/commitdiff
Renaming season has started:
authorRoland Häder <roland@mxchange.org>
Tue, 16 Aug 2016 08:04:17 +0000 (10:04 +0200)
committerRoland Haeder <roland@mxchange.org>
Tue, 16 Aug 2016 18:10:46 +0000 (20:10 +0200)
- renamed cellphone to mobile (all occurences)
- let's don't discrimite other mobile phones, right?

Signed-off-by: Roland Häder <roland@mxchange.org>
src/java/org/mxchange/jcontacts/contact/PizzaContactSessionBean.java
src/java/org/mxchange/jcontacts/phone/PizzaAdminContactPhoneSessionBean.java
src/java/org/mxchange/jphone/phonenumbers/phone/PizzaAdminPhoneSessionBean.java
src/java/org/mxchange/jphone/phonenumbers/phone/PizzaPhoneSessionBean.java
src/java/org/mxchange/jusercore/model/user/PizzaUserSessionBean.java

index 5b002df26135cdff9507961cb2015cf894774e96..63d9261d3f0c2203a87445afa0ec5a277583c92d 100644 (file)
@@ -313,7 +313,7 @@ public class PizzaContactSessionBean extends BasePizzaDatabaseBean implements Co
                }
 
                // Is cell phone/land-line/fax number unlinked?
-               boolean isCellphoneUnlinked = (contact.getContactCellphoneNumber() == null);
+               boolean isCellphoneUnlinked = (contact.getContactMobileNumber() == null);
                boolean isLandLineUnlinked = (contact.getContactLandLineNumber() == null);
                boolean isFaxUnlinked = (contact.getContactFaxNumber() == null);
 
index 91234772b955b6f962581f32e66301f0b60d6462..6a58401e14c2d669e3242591d6acf435102569b1 100644 (file)
@@ -22,9 +22,9 @@ import javax.ejb.EJB;
 import javax.ejb.Stateless;
 import org.mxchange.jcontacts.contact.Contact;
 import org.mxchange.jcontacts.contact.ContactSessionBeanRemote;
-import org.mxchange.jphone.exceptions.CellphoneNotLinkedException;
-import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber;
 import org.mxchange.pizzaaplication.database.BasePizzaDatabaseBean;
+import org.mxchange.jphone.exceptions.MobileNumberNotLinkedException;
+import org.mxchange.jphone.phonenumbers.mobile.DialableMobileNumber;
 
 /**
  * A session EJB for administrative contact's phone number purposes
@@ -46,9 +46,9 @@ public class PizzaAdminContactPhoneSessionBean extends BasePizzaDatabaseBean imp
        private ContactSessionBeanRemote contactBean;
 
        @Override
-       public Contact unlinkCellphoneDataFromContact (final Contact contact, final DialableCellphoneNumber cellphoneNumber) throws CellphoneNotLinkedException {
+       public Contact unlinkMobileDataFromContact (final Contact contact, final DialableMobileNumber mobileNumber) throws MobileNumberNotLinkedException {
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.unlinkCellphoneDataFromContact: contact={1},cellphoneNumber={2} - CALLED!", this.getClass().getSimpleName(), contact, cellphoneNumber)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.unlinkMobileDataFromContact: contact={1},mobileNumber={2} - CALLED!", this.getClass().getSimpleName(), contact, mobileNumber)); //NOI18N
 
                // Is the contact set?
                if (null == contact) {
@@ -60,28 +60,28 @@ public class PizzaAdminContactPhoneSessionBean extends BasePizzaDatabaseBean imp
                } else if (contact.getContactId() < 1) {
                        // Invalid id number
                        throw new IllegalArgumentException(MessageFormat.format("contact.contactId={0} is not valid.", contact.getContactId())); //NOI18N
-               } else if (contact.getContactCellphoneNumber() == null) {
+               } else if (contact.getContactMobileNumber() == null) {
                        // Not set cell phone instance
-                       throw new CellphoneNotLinkedException(cellphoneNumber);
-               } else if (contact.getContactCellphoneNumber().getPhoneId() == null) {
+                       throw new MobileNumberNotLinkedException(mobileNumber);
+               } else if (contact.getContactMobileNumber().getPhoneId() == null) {
                        // Throw NPE again
                        throw new NullPointerException("contact.contactCellphoneNumber.phoneId is null"); //NOI18N
-               } else if (contact.getContactCellphoneNumber().getPhoneId() < 1) {
+               } else if (contact.getContactMobileNumber().getPhoneId() < 1) {
                        // Invalid id number
-                       throw new IllegalArgumentException(MessageFormat.format("contact.contactCellphoneNumber.phoneId={0} is invalid.", contact.getContactCellphoneNumber().getPhoneId())); //NOI18N
-               } else if (!Objects.equals(cellphoneNumber.getPhoneId(), contact.getContactCellphoneNumber().getPhoneId())) {
+                       throw new IllegalArgumentException(MessageFormat.format("contact.contactCellphoneNumber.phoneId={0} is invalid.", contact.getContactMobileNumber().getPhoneId())); //NOI18N
+               } else if (!Objects.equals(mobileNumber.getPhoneId(), contact.getContactMobileNumber().getPhoneId())) {
                        // Not same object
-                       throw new IllegalArgumentException(MessageFormat.format("contact.contactCellphoneNumber.phoneId={0} and cellphoneNumber.phoneId={1} are not the same.", contact.getContactCellphoneNumber().getPhoneId(), cellphoneNumber.getPhoneId())); //NOI18N
+                       throw new IllegalArgumentException(MessageFormat.format("contact.contactCellphoneNumber.phoneId={0} and mobileNumber.phoneId={1} are not the same.", contact.getContactMobileNumber().getPhoneId(), mobileNumber.getPhoneId())); //NOI18N
                }
 
                // Remove it from contact
-               contact.setContactCellphoneNumber(null);
+               contact.setContactMobileNumber(null);
 
                // Update database
                Contact updatedContact = this.contactBean.updateContactData(contact);
 
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.unlinkCellphoneDataFromContact: updatedContact={1} - EXIT!", this.getClass().getSimpleName(), updatedContact)); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.unlinkMobileDataFromContact: updatedContact={1} - EXIT!", this.getClass().getSimpleName(), updatedContact)); //NOI18N
 
                // Return it
                return updatedContact;
index 46f8f7abadc82e84f4f0682c1caf0d9904360746..575123f1f4470abf922c5039a7827d934ee7c063 100644 (file)
@@ -19,7 +19,7 @@ package org.mxchange.jphone.phonenumbers.phone;
 import java.text.MessageFormat;
 import java.util.GregorianCalendar;
 import javax.ejb.Stateless;
-import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber;
+import org.mxchange.jphone.phonenumbers.mobile.DialableMobileNumber;
 import org.mxchange.pizzaaplication.database.BasePizzaDatabaseBean;
 
 /**
@@ -27,7 +27,7 @@ import org.mxchange.pizzaaplication.database.BasePizzaDatabaseBean;
  * <p>
  * @author Roland Haeder<roland@mxchange.org>
  */
-@Stateless (name = "adminphone", description = "Administrative bean handling phone data")
+@Stateless (name = "adminPhone", description = "An administrative bean handling phone data")
 public class PizzaAdminPhoneSessionBean extends BasePizzaDatabaseBean implements AdminPhoneSessionBeanRemote {
 
        /**
@@ -36,93 +36,93 @@ public class PizzaAdminPhoneSessionBean extends BasePizzaDatabaseBean implements
        private static final long serialVersionUID = 18_597_165_817_401_853L;
 
        @Override
-       public void deleteCellphoneData (final DialableCellphoneNumber cellPhoneNumber) {
+       public void deleteMobileData (final DialableMobileNumber mobileNumber) {
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.deleteCellphoneData: cellPhoneNumber={1} - CALLED!", this.getClass().getSimpleName(), cellPhoneNumber));
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.deleteMobileData: mobileNumber={1} - CALLED!", this.getClass().getSimpleName(), mobileNumber));
 
                // Is all data set
-               if (null == cellPhoneNumber) {
+               if (null == mobileNumber) {
                        // Not set, throw NPE
-                       throw new NullPointerException("cellphoneNumber is null"); //NOI18N
-               } else if (cellPhoneNumber.getPhoneId() == null) {
+                       throw new NullPointerException("mobileNumber is null"); //NOI18N
+               } else if (mobileNumber.getPhoneId() == null) {
                        // Throw NPE again
-                       throw new NullPointerException("cellphoneNumber.phoneId is null"); //NOI18N
-               } else if (cellPhoneNumber.getPhoneId() < 1) {
+                       throw new NullPointerException("mobileNumber.phoneId is null"); //NOI18N
+               } else if (mobileNumber.getPhoneId() < 1) {
                        // Invalid number
-                       throw new IllegalArgumentException(MessageFormat.format("cellphoneNumber.phoneId={0} is not valid", cellPhoneNumber.getPhoneId())); //NOI18N
-               } else if (cellPhoneNumber.getCellphoneProvider() == null) {
+                       throw new IllegalArgumentException(MessageFormat.format("mobileNumber.phoneId={0} is not valid", mobileNumber.getPhoneId())); //NOI18N
+               } else if (mobileNumber.getMobileProvider() == null) {
                        // Throw NPE
-                       throw new NullPointerException("cellphoneNumber.cellphoneProvider is null"); //NOI18N
-               } else if (cellPhoneNumber.getCellphoneProvider().getProviderId() == null) {
+                       throw new NullPointerException("mobileNumber.cellphoneProvider is null"); //NOI18N
+               } else if (mobileNumber.getMobileProvider().getProviderId() == null) {
                        // ... throw again
-                       throw new NullPointerException("cellphoneNumber.cellphoneProvider.providerId is null"); //NOI18N
-               } else if (cellPhoneNumber.getCellphoneProvider().getProviderId() < 1) {
+                       throw new NullPointerException("mobileNumber.cellphoneProvider.providerId is null"); //NOI18N
+               } else if (mobileNumber.getMobileProvider().getProviderId() < 1) {
                        // Id not valid
-                       throw new IllegalArgumentException(MessageFormat.format("cellphoneNumber.cellphoneProvider.providerId={0} is not valid.", cellPhoneNumber.getCellphoneProvider().getProviderId())); //NOI18N
-               } else if (cellPhoneNumber.getPhoneNumber() == null) {
+                       throw new IllegalArgumentException(MessageFormat.format("mobileNumber.cellphoneProvider.providerId={0} is not valid.", mobileNumber.getMobileProvider().getProviderId())); //NOI18N
+               } else if (mobileNumber.getPhoneNumber() == null) {
                        // Throw NPE again
-                       throw new NullPointerException("cellphoneNumber.phoneNumber is null"); //NOI18N
-               } else if (cellPhoneNumber.getPhoneNumber() < 1) {
+                       throw new NullPointerException("mobileNumber.phoneNumber is null"); //NOI18N
+               } else if (mobileNumber.getPhoneNumber() < 1) {
                        // Throw NPE again
-                       throw new NullPointerException(MessageFormat.format("cellphoneNumber.phoneNumber={0} is not valid.", cellPhoneNumber.getPhoneNumber())); //NOI18N
+                       throw new NullPointerException(MessageFormat.format("mobileNumber.phoneNumber={0} is not valid.", mobileNumber.getPhoneNumber())); //NOI18N
                }
 
                // Merge it to get a managed entity back
-               DialableCellphoneNumber managedNumber = this.getEntityManager().getReference(cellPhoneNumber.getClass(), cellPhoneNumber.getPhoneId());
+               DialableMobileNumber managedNumber = this.getEntityManager().getReference(mobileNumber.getClass(), mobileNumber.getPhoneId());
 
                // Remove it from database
                this.getEntityManager().remove(managedNumber);
 
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.deleteCellphoneData: EXIT!", this.getClass().getSimpleName()));
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.deleteMobileData: EXIT!", this.getClass().getSimpleName()));
        }
 
        @Override
-       public DialableCellphoneNumber updateCellphoneData (final DialableCellphoneNumber cellPhoneNumber) {
+       public DialableMobileNumber updateMobileData (final DialableMobileNumber mobileNumber) {
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateCellphoneData: cellPhoneNumber={1} - CALLED!", this.getClass().getSimpleName(), cellPhoneNumber));
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateCellphoneData: mobileNumber={1} - CALLED!", this.getClass().getSimpleName(), mobileNumber));
 
                // Is all data set
-               if (null == cellPhoneNumber) {
+               if (null == mobileNumber) {
                        // Not set, throw NPE
-                       throw new NullPointerException("cellphoneNumber is null"); //NOI18N
-               } else if (cellPhoneNumber.getPhoneId() == null) {
+                       throw new NullPointerException("mobileNumber is null"); //NOI18N
+               } else if (mobileNumber.getPhoneId() == null) {
                        // Throw NPE again
-                       throw new NullPointerException("cellphoneNumber.phoneId is null"); //NOI18N
-               } else if (cellPhoneNumber.getPhoneId() < 1) {
+                       throw new NullPointerException("mobileNumber.phoneId is null"); //NOI18N
+               } else if (mobileNumber.getPhoneId() < 1) {
                        // Invalid number
-                       throw new IllegalArgumentException(MessageFormat.format("cellphoneNumber.phoneId={0} is not valid", cellPhoneNumber.getPhoneId())); //NOI18N
-               } else if (cellPhoneNumber.getCellphoneProvider() == null) {
+                       throw new IllegalArgumentException(MessageFormat.format("mobileNumber.phoneId={0} is not valid", mobileNumber.getPhoneId())); //NOI18N
+               } else if (mobileNumber.getMobileProvider() == null) {
                        // Throw NPE
-                       throw new NullPointerException("cellphoneNumber.cellphoneProvider is null"); //NOI18N
-               } else if (cellPhoneNumber.getCellphoneProvider().getProviderId() == null) {
+                       throw new NullPointerException("mobileNumber.cellphoneProvider is null"); //NOI18N
+               } else if (mobileNumber.getMobileProvider().getProviderId() == null) {
                        // ... throw again
-                       throw new NullPointerException("cellphoneNumber.cellphoneProvider.providerId is null"); //NOI18N
-               } else if (cellPhoneNumber.getCellphoneProvider().getProviderId() < 1) {
+                       throw new NullPointerException("mobileNumber.cellphoneProvider.providerId is null"); //NOI18N
+               } else if (mobileNumber.getMobileProvider().getProviderId() < 1) {
                        // Id not valid
-                       throw new IllegalArgumentException(MessageFormat.format("cellphoneNumber.cellphoneProvider.providerId={0} is not valid.", cellPhoneNumber.getCellphoneProvider().getProviderId())); //NOI18N
-               } else if (cellPhoneNumber.getPhoneNumber() == null) {
+                       throw new IllegalArgumentException(MessageFormat.format("mobileNumber.cellphoneProvider.providerId={0} is not valid.", mobileNumber.getMobileProvider().getProviderId())); //NOI18N
+               } else if (mobileNumber.getPhoneNumber() == null) {
                        // Throw NPE again
-                       throw new NullPointerException("cellphoneNumber.phoneNumber is null"); //NOI18N
-               } else if (cellPhoneNumber.getPhoneNumber() < 1) {
+                       throw new NullPointerException("mobileNumber.phoneNumber is null"); //NOI18N
+               } else if (mobileNumber.getPhoneNumber() < 1) {
                        // Throw NPE again
-                       throw new NullPointerException(MessageFormat.format("cellphoneNumber.phoneNumber={0} is not valid.", cellPhoneNumber.getPhoneNumber())); //NOI18N
+                       throw new NullPointerException(MessageFormat.format("mobileNumber.phoneNumber={0} is not valid.", mobileNumber.getPhoneNumber())); //NOI18N
                }
 
                // Set updated timestamp
-               cellPhoneNumber.setPhoneEntryUpdated(new GregorianCalendar());
+               mobileNumber.setPhoneEntryUpdated(new GregorianCalendar());
 
                // Get contact from it and find it
-               DialableCellphoneNumber foundNumber = this.getEntityManager().find(cellPhoneNumber.getClass(), cellPhoneNumber.getPhoneId());
+               DialableMobileNumber foundNumber = this.getEntityManager().find(mobileNumber.getClass(), mobileNumber.getPhoneId());
 
                // Should be found
-               assert (foundNumber instanceof DialableCellphoneNumber) : MessageFormat.format("Cell phone number with id {0} not found, but should be.", cellPhoneNumber.getPhoneId()); //NOI18N
+               assert (foundNumber instanceof DialableMobileNumber) : MessageFormat.format("Cell phone number with id {0} not found, but should be.", mobileNumber.getPhoneId()); //NOI18N
 
                // Debug message
                this.getLoggerBeanLocal().logDebug(MessageFormat.format("updateCellphoneData: foundNumber.phoneId={0}", foundNumber.getPhoneId())); //NOI18N
 
                // Merge contact instance
-               DialableCellphoneNumber detachedNumber = this.getEntityManager().merge(foundNumber);
+               DialableMobileNumber detachedNumber = this.getEntityManager().merge(foundNumber);
 
                // Trace message
                this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateCellphoneData: detachedNumber={1} - EXIT!", this.getClass().getSimpleName(), detachedNumber)); //NOI18N
index 698e67dd763a9db39fec5eea0992c47e614c1b26..dba096db368c9d15dd4e8b14a2747df971c122b8 100644 (file)
@@ -22,12 +22,13 @@ import javax.ejb.Stateless;
 import javax.persistence.NoResultException;
 import javax.persistence.Query;
 import org.mxchange.jphone.exceptions.PhoneEntityNotFoundException;
-import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber;
 import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
 import org.mxchange.jphone.phonenumbers.fax.FaxNumber;
 import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
 import org.mxchange.jphone.phonenumbers.landline.LandLineNumber;
 import org.mxchange.pizzaaplication.database.BasePizzaDatabaseBean;
+import org.mxchange.jphone.phonenumbers.mobile.DialableMobileNumber;
+import org.mxchange.jphone.phonenumbers.mobile.MobileNumber;
 
 /**
  * A general phone EJB
@@ -50,18 +51,18 @@ public class PizzaPhoneSessionBean extends BasePizzaDatabaseBean implements Phon
 
        @SuppressWarnings ("unchecked")
        @Override
-       public List<DialableCellphoneNumber> allCellphoneNumbers () {
+       public List<DialableMobileNumber> allMobileNumbers () {
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.allCellphoneNumbers: CALLED!", this.getClass().getSimpleName())); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.allMobileNumbers: CALLED!", this.getClass().getSimpleName())); //NOI18N
 
                // Get query
-               Query query = this.getEntityManager().createNamedQuery("AllCellphoneNumbers", CellphoneNumber.class); //NOI18N
+               Query query = this.getEntityManager().createNamedQuery("AllCellphoneNumbers", MobileNumber.class); //NOI18N
 
                // Get list from it
-               List<DialableCellphoneNumber> list = query.getResultList();
+               List<DialableMobileNumber> list = query.getResultList();
 
                // Trace message
-               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.allCellphoneNumbers: list.size()={1} - EXIT!", this.getClass().getSimpleName(), list.size())); //NOI18N
+               this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.allMobileNumbers: list.size()={1} - EXIT!", this.getClass().getSimpleName(), list.size())); //NOI18N
 
                // Return it
                return list;
@@ -106,7 +107,7 @@ public class PizzaPhoneSessionBean extends BasePizzaDatabaseBean implements Phon
        }
 
        @Override
-       public DialableCellphoneNumber findCellphoneById (final Long cellphoneId) throws PhoneEntityNotFoundException {
+       public DialableMobileNumber findMobileNumberById (final Long cellphoneId) throws PhoneEntityNotFoundException {
                // Trace message
                this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.findCellphoneById: cellphoneId={1} - CALLED!", this.getClass().getSimpleName(), cellphoneId)); //NOI18N
 
@@ -120,18 +121,18 @@ public class PizzaPhoneSessionBean extends BasePizzaDatabaseBean implements Phon
                }
 
                // Now find it
-               Query query = this.getEntityManager().createNamedQuery("SearchCellphoneId", CellphoneNumber.class); //NOI18N
+               Query query = this.getEntityManager().createNamedQuery("SearchCellphoneId", MobileNumber.class); //NOI18N
 
                // Set parameter
                query.setParameter("cellphoneId", cellphoneId); //NOI18N
 
                // Init instance
-               DialableCellphoneNumber cellphone = null;
+               DialableMobileNumber cellphone = null;
 
                // Try to get a result
                try {
                        // Get a single result
-                       cellphone = (DialableCellphoneNumber) query.getSingleResult();
+                       cellphone = (DialableMobileNumber) query.getSingleResult();
                } catch (NoResultException ex) {
                        // The entry was not found, so throw it again
                        throw new PhoneEntityNotFoundException(cellphoneId, ex);
index 5953b711eb423899449c1f1cca110a86db9cf831..b73c9b58c3abf631ca43d61d731b373aa9bd4eeb 100644 (file)
@@ -29,9 +29,9 @@ import javax.persistence.NoResultException;
 import javax.persistence.PersistenceException;
 import javax.persistence.Query;
 import org.mxchange.jcontacts.contact.Contact;
-import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber;
 import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
 import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
+import org.mxchange.jphone.phonenumbers.mobile.DialableMobileNumber;
 import org.mxchange.jusercore.exceptions.UserNotFoundException;
 import org.mxchange.jusercore.exceptions.UserStatusConfirmedException;
 import org.mxchange.jusercore.exceptions.UserStatusLockedException;
@@ -705,34 +705,34 @@ public class PizzaUserSessionBean extends BasePizzaDatabaseBean implements UserS
                // Should be found!
                assert (detachedContact instanceof Contact) : MessageFormat.format("Contact with id {0} not merged, but should be.", user.getUserContact().getContactId()); //NOI18N
 
-               // Get cellphone instance
-               DialableCellphoneNumber cellphone = detachedContact.getContactCellphoneNumber();
+               // Get mobile instance
+               DialableMobileNumber mobileNumber = detachedContact.getContactMobileNumber();
 
-               // Is there a  cellphone instance set?
-               if (cellphone instanceof DialableCellphoneNumber) {
+               // Is there a  mobile instance set?
+               if (mobileNumber 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 ...", mobileNumber.getPhoneId())); //NOI18N
 
                        // Then find it, too
-                       DialableCellphoneNumber foundCellphone = this.getEntityManager().find(cellphone.getClass(), cellphone.getPhoneId());
+                       DialableMobileNumber foundMobile = this.getEntityManager().find(mobileNumber.getClass(), mobileNumber.getPhoneId());
 
                        // Should be there
-                       assert (foundCellphone instanceof DialableCellphoneNumber) : 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
-                       DialableCellphoneNumber detachedCellphone = this.getEntityManager().merge(foundCellphone);
+                       DialableMobileNumber detachedMobile = this.getEntityManager().merge(foundMobile);
 
                        // Should be there
-                       assert (detachedCellphone instanceof DialableCellphoneNumber) : 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(user.getUserContact().getContactCellphoneNumber());
+                       detachedMobile.copyAll(user.getUserContact().getContactMobileNumber());
 
                        // Set it back
-                       detachedContact.setContactCellphoneNumber(detachedCellphone);
+                       detachedContact.setContactMobileNumber(detachedMobile);
                }
 
-               // Get cellphone instance
+               // Get mobile instance
                DialableFaxNumber fax = detachedContact.getContactFaxNumber();
 
                // Is there a  fax instance set?
@@ -759,7 +759,7 @@ public class PizzaUserSessionBean extends BasePizzaDatabaseBean implements UserS
                        detachedContact.setContactFaxNumber(detachedFax);
                }
 
-               // Get cellphone instance
+               // Get mobile instance
                DialableLandLineNumber landLine = detachedContact.getContactLandLineNumber();
 
                // Is there a  fax instance set?