]> git.mxchange.org Git - jjobs-ejb.git/commitdiff
Please cherry-pick:
authorRoland Häder <roland@mxchange.org>
Tue, 14 Apr 2020 08:03:54 +0000 (10:03 +0200)
committerRoland Häder <roland@mxchange.org>
Fri, 17 Apr 2020 16:41:13 +0000 (18:41 +0200)
- updated jphone-core.jar requires now some new getter/setter names like
  getMobileEntryUpdated(), setContactEntry<Created|Updated>() and many more

Signed-off-by: Roland Häder <roland@mxchange.org>
src/java/org/mxchange/jcontacts/model/contact/JobsAdminContactSessionBean.java
src/java/org/mxchange/jcontacts/model/phone/JobsAdminContactPhoneSessionBean.java
src/java/org/mxchange/jcontactsbusiness/model/basicdata/JobsAdminBusinessDataSessionBean.java
src/java/org/mxchange/jcontactsbusiness/model/employee/JobsAdminCompanyEmployeeSessionBean.java
src/java/org/mxchange/jjobs/enterprise/BaseJobsEnterpriseBean.java
src/java/org/mxchange/jphone/model/phonenumbers/phone/JobsAdminPhoneSessionBean.java
src/java/org/mxchange/jusercore/model/user/JobsAdminUserSessionBean.java
src/java/org/mxchange/jusercore/model/user/JobsUserSessionBean.java

index fd38cf2cf8cf3d57b5e63775db0d710d5bf3e2d9..5897e08cfad79a8eb29132fff70444b5eb35dfaf 100644 (file)
@@ -70,7 +70,7 @@ public class JobsAdminContactSessionBean extends BaseJobsEnterpriseBean implemen
                }
 
                // Set created timestamp
-               contact.setContactCreated(new Date());
+               contact.setContactEntryCreated(new Date());
 
                // Set all created timestamps, if instance is there
                this.setAllPhoneEntriesCreated(contact);
index 8450069ba61a07ca8b10c8340bd6262ad471b579..68f3348e7ea98dc25e18de742a0ce2981fa12050 100644 (file)
@@ -192,12 +192,12 @@ public class JobsAdminContactPhoneSessionBean extends BaseJobsEnterpriseBean imp
                } else if (null == mobileNumber) {
                        // Throw NPE
                        throw new NullPointerException("mobileNumber is null"); //NOI18N
-               } else if (mobileNumber.getPhoneId() == null) {
+               } else if (mobileNumber.getMobileId() == null) {
                        // Throw it again
                        throw new NullPointerException("mobileNumber.phoneId is null"); //NOI18N
-               } else if (mobileNumber.getPhoneId() < 1) {
+               } else if (mobileNumber.getMobileId() < 1) {
                        // Invalid id
-                       throw new IllegalArgumentException(MessageFormat.format("mobileNumber.phoneId={0} is not valid", mobileNumber.getPhoneId())); //NOI18N
+                       throw new IllegalArgumentException(MessageFormat.format("mobileNumber.phoneId={0} is not valid", mobileNumber.getMobileId())); //NOI18N
                } else if (mobileNumber.getMobileProvider() == null) {
                        // Throw NPE again
                        throw new NullPointerException("mobileNumber.mobileProvider is null"); //NOI18N
@@ -357,9 +357,9 @@ public class JobsAdminContactPhoneSessionBean extends BaseJobsEnterpriseBean imp
                } else if (null == mobileNumber) {
                        // Throw NPE
                        throw new NullPointerException("mobileNumber is null"); //NOI18N
-               } else if (mobileNumber.getPhoneId() instanceof Long) {
+               } else if (mobileNumber.getMobileId() instanceof Long) {
                        // Throw it again
-                       throw new IllegalStateException(MessageFormat.format("mobileNumber.phoneId={0} is not null", mobileNumber.getPhoneId())); //NOI18N
+                       throw new IllegalStateException(MessageFormat.format("mobileNumber.phoneId={0} is not null", mobileNumber.getMobileId())); //NOI18N
                } else if (mobileNumber.getMobileProvider() == null) {
                        // Throw NPE again
                        throw new NullPointerException("mobileNumber.mobileProvider is null"); //NOI18N
@@ -372,7 +372,7 @@ public class JobsAdminContactPhoneSessionBean extends BaseJobsEnterpriseBean imp
                }
 
                // Set created instance
-               mobileNumber.setPhoneEntryCreated(new Date());
+               mobileNumber.setMobileEntryCreated(new Date());
 
                // Set mobile number in contact
                contact.setContactMobileNumber(mobileNumber);
@@ -489,15 +489,15 @@ public class JobsAdminContactPhoneSessionBean extends BaseJobsEnterpriseBean imp
                } else if (contact.getContactMobileNumber() == null) {
                        // Not set cell phone instance
                        throw new PhoneNumberNotLinkedException(mobileNumber);
-               } else if (contact.getContactMobileNumber().getPhoneId() == null) {
+               } else if (contact.getContactMobileNumber().getMobileId() == null) {
                        // Throw NPE again
                        throw new NullPointerException("contact.contactMobileNumber.phoneId is null"); //NOI18N
-               } else if (contact.getContactMobileNumber().getPhoneId() < 1) {
+               } else if (contact.getContactMobileNumber().getMobileId() < 1) {
                        // Invalid id number
-                       throw new IllegalArgumentException(MessageFormat.format("contact.contactMobileNumber.phoneId={0} is invalid.", contact.getContactMobileNumber().getPhoneId())); //NOI18N
-               } else if (!Objects.equals(mobileNumber.getPhoneId(), contact.getContactMobileNumber().getPhoneId())) {
+                       throw new IllegalArgumentException(MessageFormat.format("contact.contactMobileNumber.phoneId={0} is invalid.", contact.getContactMobileNumber().getMobileId())); //NOI18N
+               } else if (!Objects.equals(mobileNumber.getMobileId(), contact.getContactMobileNumber().getMobileId())) {
                        // Not same object
-                       throw new IllegalArgumentException(MessageFormat.format("contact.contactMobileNumber.phoneId={0} and mobileNumber.phoneId={1} are not the same.", contact.getContactMobileNumber().getPhoneId(), mobileNumber.getPhoneId())); //NOI18N
+                       throw new IllegalArgumentException(MessageFormat.format("contact.contactMobileNumber.phoneId={0} and mobileNumber.phoneId={1} are not the same.", contact.getContactMobileNumber().getMobileId(), mobileNumber.getMobileId())); //NOI18N
                }
 
                // Remove it from contact
index 6837702ea44e53b6b440e84893602d870bc03737..ffc02d4acd76acda189b9e17eb30a40f4c5dac81 100644 (file)
@@ -18,7 +18,6 @@ package org.mxchange.jcontactsbusiness.model.basicdata;
 
 import java.text.MessageFormat;
 import java.util.Date;
-import java.util.List;
 import java.util.Objects;
 import javax.ejb.EJB;
 import javax.ejb.Stateless;
@@ -85,7 +84,7 @@ public class JobsAdminBusinessDataSessionBean extends BaseJobsEnterpriseBean imp
                }
 
                // Now add current date
-               basicData.setCompanyCreated(new Date());
+               basicData.setCompanyEntryCreated(new Date());
 
                // Is there a owner set?
                if (basicData.getCompanyUserOwner() instanceof User) {
@@ -144,16 +143,13 @@ public class JobsAdminBusinessDataSessionBean extends BaseJobsEnterpriseBean imp
         * @return Whether same company name has been used
         */
        private boolean isSameCompanyNameAdded (final BasicData basicData) {
-               // Get all available entries
-               final List<BasicData> list = this.businessDataBean.allBusinessBasicData();
-
                // Default is not found
                boolean isFound = false;
 
                // Then check each entry
-               for (final BasicData entry : list) {
+               for (final BasicData currentBasicData : this.businessDataBean.allBusinessBasicData()) {
                        // Is the company name matching?
-                       if (Objects.equals(entry.getCompanyName(), basicData.getCompanyName())) {
+                       if (Objects.equals(currentBasicData.getCompanyName(), basicData.getCompanyName())) {
                                // Found match
                                isFound = true;
                        }
@@ -171,16 +167,13 @@ public class JobsAdminBusinessDataSessionBean extends BaseJobsEnterpriseBean imp
         * @return Whether same company short name has been used
         */
        private boolean isSameCompanyShortNameAdded (final BasicData basicData) {
-               // Get all available entries
-               final List<BasicData> list = this.businessDataBean.allBusinessBasicData();
-
                // Default is not found
                boolean isFound = false;
 
                // Then check each entry
-               for (final BasicData entry : list) {
+               for (final BasicData currentBasicData : this.businessDataBean.allBusinessBasicData()) {
                        // Is the company name matching?
-                       if (Objects.equals(entry.getCompanyShortName(), basicData.getCompanyShortName())) {
+                       if (Objects.equals(currentBasicData.getCompanyShortName(), basicData.getCompanyShortName())) {
                                // Found match
                                isFound = true;
                        }
index 74356a6115ecb0bda6b07bc977a6f8c37f215576..3eb5489f71603cb2a542127c51b1a15e7478ab6b 100644 (file)
@@ -111,9 +111,9 @@ public class JobsAdminCompanyEmployeeSessionBean extends BaseJobsEnterpriseBean
                } else if ((employee.getEmployeeNumber() != null) && (employee.getEmployeeNumber().isEmpty())) {
                        // Throw it again
                        throw new IllegalArgumentException("employee.employeeNumber is empty"); //NOI18N
-               } else if ((employee.getEmployeeMobileNumber() != null) && (employee.getEmployeeMobileNumber().getPhoneId() != null)) {
+               } else if ((employee.getEmployeeMobileNumber() != null) && (employee.getEmployeeMobileNumber().getMobileId() != null)) {
                        // Throw once more
-                       throw new IllegalArgumentException(MessageFormat.format("employee.employeeMobileNumber.phoneId={0} is unexpected.", employee.getEmployeeMobileNumber().getPhoneId())); //NOI18N
+                       throw new IllegalArgumentException(MessageFormat.format("employee.employeeMobileNumber.phoneId={0} is unexpected.", employee.getEmployeeMobileNumber().getMobileId())); //NOI18N
                } else if ((employee.getEmployeePersonalData() != null) && (employee.getEmployeePersonalData().getContactId() == null)) {
                        // Throw NPE
                        throw new NullPointerException("employee.employeePersonalData.contactId is null"); //NOI18N
@@ -197,7 +197,7 @@ public class JobsAdminCompanyEmployeeSessionBean extends BaseJobsEnterpriseBean
                // Is mobile number set?
                if (employee.getEmployeeMobileNumber() instanceof DialableMobileNumber) {
                        // Yes, then set created there as well
-                       employee.getEmployeeMobileNumber().setPhoneEntryCreated(new Date());
+                       employee.getEmployeeMobileNumber().setMobileEntryCreated(new Date());
 
                        // Make mobile provider managed
                        final MobileProvider mobileProvider = this.createManaged(employee.getEmployeeMobileNumber().getMobileProvider());
index 0d5529f05606b903c1ed9c61427ac8b8bd3303d5..9ad42fbe1c58a9da0eb96090d456fdd5723eb3d8 100644 (file)
@@ -48,7 +48,6 @@ import org.mxchange.jphone.model.phonenumbers.landline.LandLineNumbers;
 import org.mxchange.jphone.model.phonenumbers.mobile.DialableMobileNumber;
 import org.mxchange.jphone.model.phonenumbers.mobile.MobileNumbers;
 import org.mxchange.jphone.model.phonenumbers.mobileprovider.MobileProvider;
-import org.mxchange.jphone.utils.PhoneUtils;
 import org.mxchange.jusercore.model.user.User;
 import org.mxchange.jusercore.model.user.Users;
 
@@ -565,12 +564,12 @@ public abstract class BaseJobsEnterpriseBean extends BaseEnterpriseBean {
                }
 
                // Is a mobile number instance set?
-               if ((mobileNumber instanceof DialableMobileNumber) && (mobileNumber.getPhoneId() == null)) {
+               if ((mobileNumber instanceof DialableMobileNumber) && (mobileNumber.getMobileId() == null)) {
                        // Debug message
                        this.getLoggerBeanLocal().logDebug("setAllPhoneEntriesCreated: Setting created timestamp for mobile number ..."); //NOI18N
 
                        // Set updated timestamp
-                       mobileNumber.setPhoneEntryCreated(new Date());
+                       mobileNumber.setMobileEntryCreated(new Date());
                }
 
                // Trace message
@@ -740,16 +739,16 @@ public abstract class BaseJobsEnterpriseBean extends BaseEnterpriseBean {
                if (null == mobileNumber) {
                        // Throw NPE
                        throw new NullPointerException("mobileNumber is null"); //NOI18N
-               } else if (fetchedNumber.getPhoneId() == null) {
+               } else if (fetchedNumber.getMobileId() == null) {
                        // ..and again
                        throw new NullPointerException("fetchedNumber.phoneId is null"); //NOI18N
                }
 
                // Debug message
-               this.getLoggerBeanLocal().logDebug(MessageFormat.format("getDetached: fetchedNumber.phoneId={0}", fetchedNumber.getPhoneId())); //NOI18N
+               this.getLoggerBeanLocal().logDebug(MessageFormat.format("getDetached: fetchedNumber.phoneId={0}", fetchedNumber.getMobileId())); //NOI18N
 
                // Init query instance
-               final DialableMobileNumber foundNumber = this.getEntityManager().find(fetchedNumber.getClass(), fetchedNumber.getPhoneId());
+               final DialableMobileNumber foundNumber = this.getEntityManager().find(fetchedNumber.getClass(), fetchedNumber.getMobileId());
 
                // Debug message
                this.getLoggerBeanLocal().logDebug(MessageFormat.format("getDetached: foundNumber={0}", foundNumber)); //NOI18N
@@ -758,7 +757,7 @@ public abstract class BaseJobsEnterpriseBean extends BaseEnterpriseBean {
                DialableMobileNumber detachedNumber = null;
 
                // Is there a difference?
-               if (!PhoneUtils.isSameMobileNumber(mobileNumber, fetchedNumber)) {
+               if (!MobileNumbers.isSameMobileNumber(mobileNumber, fetchedNumber)) {
                        // @TODO Copy all to foundNumber, then merge
 
                        // Merge this entry
@@ -806,7 +805,7 @@ public abstract class BaseJobsEnterpriseBean extends BaseEnterpriseBean {
                DialableLandLineNumber detachedNumber = null;
 
                // Is there a difference?
-               if (!PhoneUtils.isSameLandLineNumber(landLineNumber, fetchedNumber)) {
+               if (!LandLineNumbers.isSameLandLineNumber(landLineNumber, fetchedNumber)) {
                        // @TODO Copy all to foundNumber, then merge
 
                        // Merge this entry
@@ -854,7 +853,7 @@ public abstract class BaseJobsEnterpriseBean extends BaseEnterpriseBean {
                DialableFaxNumber detachedNumber = null;
 
                // Is there a difference?
-               if (!PhoneUtils.isSameFaxNumber(faxNumber, fetchedNumber)) {
+               if (!FaxNumbers.isSameFaxNumber(faxNumber, fetchedNumber)) {
                        // @TODO Copy all to foundNumber, then merge
 
                        // Merge this entry
@@ -892,7 +891,7 @@ public abstract class BaseJobsEnterpriseBean extends BaseEnterpriseBean {
                }
 
                // Set updated timestamp
-               detachedContact.setContactUpdated(new Date());
+               detachedContact.setContactEntryUpdated(new Date());
 
                // Get contact from it and find it
                final Contact foundContact = this.getEntityManager().find(detachedContact.getClass(), detachedContact.getContactId());
@@ -938,47 +937,47 @@ public abstract class BaseJobsEnterpriseBean extends BaseEnterpriseBean {
                }
 
                // Get all instances
-               final DialableMobileNumber mobile = detachedContact.getContactMobileNumber();
-               final DialableLandLineNumber landLine = detachedContact.getContactLandLineNumber();
-               final DialableFaxNumber fax = detachedContact.getContactFaxNumber();
+               final DialableMobileNumber mobileNumber = detachedContact.getContactMobileNumber();
+               final DialableLandLineNumber landLineNumber = detachedContact.getContactLandLineNumber();
+               final DialableFaxNumber faxNumber = detachedContact.getContactFaxNumber();
 
                // Is there a  mobile instance set?
-               if (mobile instanceof DialableMobileNumber) {
+               if (mobileNumber instanceof DialableMobileNumber) {
                        // Debug message
-                       this.getLoggerBeanLocal().logDebug(MessageFormat.format("updateUserPersonalData: mobile.phoneId={0} is being updated ...", mobile.getPhoneId())); //NOI18N
+                       this.getLoggerBeanLocal().logDebug(MessageFormat.format("updateUserPersonalData: mobile.phoneId={0} is being updated ...", mobileNumber.getMobileId())); //NOI18N
 
                        // Then find it, too
-                       final DialableMobileNumber foundMobile = this.getEntityManager().find(mobile.getClass(), mobile.getPhoneId());
+                       final DialableMobileNumber foundMobile = this.getEntityManager().find(mobileNumber.getClass(), mobileNumber.getMobileId());
 
                        // Should be there
-                       assert (foundMobile instanceof DialableMobileNumber) : MessageFormat.format("Mobile number with id {0} not found but should be.", foundMobile.getPhoneId()); //NOI18N
+                       assert (foundMobile instanceof DialableMobileNumber) : MessageFormat.format("Mobile number with id {0} not found but should be.", foundMobile.getMobileId()); //NOI18N
 
                        // Copy all
-                       MobileNumbers.copyAll(detachedContact.getContactMobileNumber(), foundMobile);
+                       MobileNumbers.copyMobileNumber(detachedContact.getContactMobileNumber(), foundMobile);
 
                        // Then merge it, too
                        final DialableMobileNumber managedMobile = this.getEntityManager().merge(foundMobile);
 
                        // Should be there
-                       assert (managedMobile instanceof DialableMobileNumber) : MessageFormat.format("Mobile number with id {0} not found but should be.", managedMobile.getPhoneId()); //NOI18N
+                       assert (managedMobile instanceof DialableMobileNumber) : MessageFormat.format("Mobile number with id {0} not found but should be.", managedMobile.getMobileId()); //NOI18N
 
                        // Set it back
                        detachedContact.setContactMobileNumber(managedMobile);
                }
 
                // Is there a  fax instance set?
-               if (fax instanceof DialableFaxNumber) {
+               if (faxNumber instanceof DialableFaxNumber) {
                        // Debug message
-                       this.getLoggerBeanLocal().logDebug(MessageFormat.format("updateUserPersonalData: fax.phoneId={0} is being updated ...", fax.getPhoneId())); //NOI18N
+                       this.getLoggerBeanLocal().logDebug(MessageFormat.format("updateUserPersonalData: fax.phoneId={0} is being updated ...", faxNumber.getPhoneId())); //NOI18N
 
                        // Then find it, too
-                       final DialableFaxNumber foundFax = this.getEntityManager().find(fax.getClass(), fax.getPhoneId());
+                       final DialableFaxNumber foundFax = this.getEntityManager().find(faxNumber.getClass(), faxNumber.getPhoneId());
 
                        // Should be there
                        assert (foundFax instanceof DialableFaxNumber) : MessageFormat.format("Fax number with id {0} not found but should be.", foundFax.getPhoneId()); //NOI18N
 
                        // Copy all
-                       FaxNumbers.copyAll(detachedContact.getContactFaxNumber(), foundFax);
+                       FaxNumbers.copyFaxNumber(detachedContact.getContactFaxNumber(), foundFax);
 
                        // Then merge it, too
                        final DialableFaxNumber managedFax = this.getEntityManager().merge(foundFax);
@@ -991,18 +990,18 @@ public abstract class BaseJobsEnterpriseBean extends BaseEnterpriseBean {
                }
 
                // Is there a  fax instance set?
-               if (landLine instanceof DialableLandLineNumber) {
+               if (landLineNumber instanceof DialableLandLineNumber) {
                        // Debug message
-                       this.getLoggerBeanLocal().logDebug(MessageFormat.format("updateUserPersonalData: landLine.phoneId={0} is being updated ...", landLine.getPhoneId())); //NOI18N
+                       this.getLoggerBeanLocal().logDebug(MessageFormat.format("updateUserPersonalData: landLine.phoneId={0} is being updated ...", landLineNumber.getPhoneId())); //NOI18N
 
                        // Then find it, too
-                       final DialableLandLineNumber foundLandLine = this.getEntityManager().find(landLine.getClass(), landLine.getPhoneId());
+                       final DialableLandLineNumber foundLandLine = this.getEntityManager().find(landLineNumber.getClass(), landLineNumber.getPhoneId());
 
                        // Should be there
                        assert (foundLandLine instanceof DialableLandLineNumber) : MessageFormat.format("Land line number with id {0} not found but should be.", foundLandLine.getPhoneId()); //NOI18N
 
                        // Copy all
-                       LandLineNumbers.copyAll(detachedContact.getContactLandLineNumber(), foundLandLine);
+                       LandLineNumbers.copyLandLineNumber(detachedContact.getContactLandLineNumber(), foundLandLine);
 
                        // Then merge it, too
                        final DialableLandLineNumber managedLandLine = this.getEntityManager().merge(foundLandLine);
@@ -1154,7 +1153,7 @@ public abstract class BaseJobsEnterpriseBean extends BaseEnterpriseBean {
                this.getLoggerBeanLocal().logDebug(MessageFormat.format("setAllContactPhoneEntries: other.contactMobileNumber={0}", other.getContactMobileNumber())); //NOI18N
 
                // Is other mobile not set?
-               if ((other.getContactMobileNumber() == null) || (PhoneUtils.isSameMobileNumber(contact.getContactMobileNumber(), other.getContactMobileNumber()))) {
+               if ((other.getContactMobileNumber() == null) || (MobileNumbers.isSameMobileNumber(contact.getContactMobileNumber(), other.getContactMobileNumber()))) {
                        // Debug message
                        this.getLoggerBeanLocal().logDebug("setAllContactPhoneEntries: Copying mobile entry ..."); //NOI18N
 
@@ -1172,7 +1171,7 @@ public abstract class BaseJobsEnterpriseBean extends BaseEnterpriseBean {
                this.getLoggerBeanLocal().logDebug(MessageFormat.format("setAllContactPhoneEntries: other.contactLandLineNumber={0}", other.getContactLandLineNumber())); //NOI18N
 
                // Is other mobile not set?
-               if ((other.getContactLandLineNumber() == null) || (PhoneUtils.isSameLandLineNumber(contact.getContactLandLineNumber(), other.getContactLandLineNumber()))) {
+               if ((other.getContactLandLineNumber() == null) || (LandLineNumbers.isSameLandLineNumber(contact.getContactLandLineNumber(), other.getContactLandLineNumber()))) {
                        // Debug message
                        this.getLoggerBeanLocal().logDebug("setAllContactPhoneEntries: Copying land-line entry ..."); //NOI18N
 
@@ -1190,7 +1189,7 @@ public abstract class BaseJobsEnterpriseBean extends BaseEnterpriseBean {
                this.getLoggerBeanLocal().logDebug(MessageFormat.format("setAllContactPhoneEntries: other.contactFaxNumber={0}", other.getContactFaxNumber())); //NOI18N
 
                // Is other mobile not set?
-               if ((other.getContactFaxNumber() == null) || (PhoneUtils.isSameFaxNumber(contact.getContactFaxNumber(), other.getContactFaxNumber()))) {
+               if ((other.getContactFaxNumber() == null) || (FaxNumbers.isSameFaxNumber(contact.getContactFaxNumber(), other.getContactFaxNumber()))) {
                        // Debug message
                        this.getLoggerBeanLocal().logDebug("setAllContactPhoneEntries: Copying fax entry ..."); //NOI18N
 
@@ -1271,12 +1270,12 @@ public abstract class BaseJobsEnterpriseBean extends BaseEnterpriseBean {
                }
 
                // Is a mobile number instance set?
-               if ((mobileNumber instanceof DialableMobileNumber) && (mobileNumber.getPhoneId() instanceof Long) && (mobileNumber.getPhoneId() > 0)) {
+               if ((mobileNumber instanceof DialableMobileNumber) && (mobileNumber.getMobileId() instanceof Long) && (mobileNumber.getMobileId() > 0)) {
                        // Debug message
                        this.getLoggerBeanLocal().logDebug("setAllContactPhoneEntriesUpdated: Setting updated timestamp for mobile number ..."); //NOI18N
 
                        // Set updated timestamp
-                       mobileNumber.setPhoneEntryUpdated(new Date());
+                       mobileNumber.setMobileEntryUpdated(new Date());
                }
 
                // Trace message
index 025eea5cd5add56b4dcd745fa601b60bc1b1fc12..cfd9aa51fd10e2a4ef5d9b61f61bc356e6616207 100644 (file)
@@ -153,12 +153,12 @@ public class JobsAdminPhoneSessionBean extends BaseJobsEnterpriseBean implements
                if (null == mobileNumber) {
                        // Not set, throw NPE
                        throw new NullPointerException("mobileNumber is null"); //NOI18N
-               } else if (mobileNumber.getPhoneId() == null) {
+               } else if (mobileNumber.getMobileId() == null) {
                        // Throw NPE again
                        throw new NullPointerException("mobileNumber.phoneId is null"); //NOI18N
-               } else if (mobileNumber.getPhoneId() < 1) {
+               } else if (mobileNumber.getMobileId() < 1) {
                        // Invalid number
-                       throw new IllegalArgumentException(MessageFormat.format("mobileNumber.phoneId={0} is not valid", mobileNumber.getPhoneId())); //NOI18N
+                       throw new IllegalArgumentException(MessageFormat.format("mobileNumber.phoneId={0} is not valid", mobileNumber.getMobileId())); //NOI18N
                } else if (mobileNumber.getMobileProvider() == null) {
                        // Throw NPE
                        throw new NullPointerException("mobileNumber.cellphoneProvider is null"); //NOI18N
@@ -168,16 +168,16 @@ public class JobsAdminPhoneSessionBean extends BaseJobsEnterpriseBean implements
                } else if (mobileNumber.getMobileProvider().getProviderId() < 1) {
                        // Id not valid
                        throw new IllegalArgumentException(MessageFormat.format("mobileNumber.cellphoneProvider.providerId={0} is not valid.", mobileNumber.getMobileProvider().getProviderId())); //NOI18N
-               } else if (mobileNumber.getPhoneNumber() == null) {
+               } else if (mobileNumber.getMobileNumber() == null) {
                        // Throw NPE again
-                       throw new NullPointerException("mobileNumber.phoneNumber is null"); //NOI18N
-               } else if (mobileNumber.getPhoneNumber() < 1) {
+                       throw new NullPointerException("mobileNumber.mobileNumber is null"); //NOI18N
+               } else if (mobileNumber.getMobileNumber() < 1) {
                        // Throw NPE again
-                       throw new NullPointerException(MessageFormat.format("mobileNumber.phoneNumber={0} is not valid.", mobileNumber.getPhoneNumber())); //NOI18N
+                       throw new NullPointerException(MessageFormat.format("mobileNumber.mobileNumber={0} is not valid.", mobileNumber.getMobileNumber())); //NOI18N
                }
 
                // Get a managed instance
-               final DialableMobileNumber managedNumber = this.getEntityManager().getReference(mobileNumber.getClass(), mobileNumber.getPhoneId());
+               final DialableMobileNumber managedNumber = this.getEntityManager().getReference(mobileNumber.getClass(), mobileNumber.getMobileId());
 
                // Remove it from database
                this.getEntityManager().remove(managedNumber);
@@ -234,7 +234,7 @@ public class JobsAdminPhoneSessionBean extends BaseJobsEnterpriseBean implements
                this.getLoggerBeanLocal().logDebug(MessageFormat.format("{0}.updateFaxData: managedNumber.phoneId={1}", this.getClass().getSimpleName(), managedNumber.getPhoneId())); //NOI18N
 
                // Set updated timestamp
-               FaxNumbers.copyAll(faxNumber, managedNumber);
+               FaxNumbers.copyFaxNumber(faxNumber, managedNumber);
                managedNumber.setPhoneEntryUpdated(new Date());
 
                // Trace message
@@ -292,7 +292,7 @@ public class JobsAdminPhoneSessionBean extends BaseJobsEnterpriseBean implements
                this.getLoggerBeanLocal().logDebug(MessageFormat.format("{0}.updateLandLineData: managedNumber.phoneId={1}", this.getClass().getSimpleName(), managedNumber.getPhoneId())); //NOI18N
 
                // Set updated timestamp
-               LandLineNumbers.copyAll(landLineNumber, managedNumber);
+               LandLineNumbers.copyLandLineNumber(landLineNumber, managedNumber);
                managedNumber.setPhoneEntryUpdated(new Date());
 
                // Trace message
@@ -311,12 +311,12 @@ public class JobsAdminPhoneSessionBean extends BaseJobsEnterpriseBean implements
                if (null == mobileNumber) {
                        // Not set, throw NPE
                        throw new NullPointerException("mobileNumber is null"); //NOI18N
-               } else if (mobileNumber.getPhoneId() == null) {
+               } else if (mobileNumber.getMobileId() == null) {
                        // Throw NPE again
                        throw new NullPointerException("mobileNumber.phoneId is null"); //NOI18N
-               } else if (mobileNumber.getPhoneId() < 1) {
+               } else if (mobileNumber.getMobileId() < 1) {
                        // Invalid number
-                       throw new IllegalArgumentException(MessageFormat.format("mobileNumber.phoneId={0} is not valid", mobileNumber.getPhoneId())); //NOI18N
+                       throw new IllegalArgumentException(MessageFormat.format("mobileNumber.phoneId={0} is not valid", mobileNumber.getMobileId())); //NOI18N
                } else if (mobileNumber.getMobileProvider() == null) {
                        // Throw NPE
                        throw new NullPointerException("mobileNumber.cellphoneProvider is null"); //NOI18N
@@ -326,26 +326,26 @@ public class JobsAdminPhoneSessionBean extends BaseJobsEnterpriseBean implements
                } else if (mobileNumber.getMobileProvider().getProviderId() < 1) {
                        // Id not valid
                        throw new IllegalArgumentException(MessageFormat.format("mobileNumber.cellphoneProvider.providerId={0} is not valid.", mobileNumber.getMobileProvider().getProviderId())); //NOI18N
-               } else if (mobileNumber.getPhoneNumber() == null) {
+               } else if (mobileNumber.getMobileNumber() == null) {
                        // Throw NPE again
-                       throw new NullPointerException("mobileNumber.phoneNumber is null"); //NOI18N
-               } else if (mobileNumber.getPhoneNumber() < 1) {
+                       throw new NullPointerException("mobileNumber.mobileNumber is null"); //NOI18N
+               } else if (mobileNumber.getMobileNumber() < 1) {
                        // Throw NPE again
-                       throw new NullPointerException(MessageFormat.format("mobileNumber.phoneNumber={0} is not valid.", mobileNumber.getPhoneNumber())); //NOI18N
+                       throw new NullPointerException(MessageFormat.format("mobileNumber.mobileNumber={0} is not valid.", mobileNumber.getMobileNumber())); //NOI18N
                }
 
                // Get contact from it and find it
-               final DialableMobileNumber managedNumber = this.getEntityManager().find(mobileNumber.getClass(), mobileNumber.getPhoneId());
+               final DialableMobileNumber managedNumber = this.getEntityManager().find(mobileNumber.getClass(), mobileNumber.getMobileId());
 
                // Should be found
-               assert (managedNumber instanceof DialableMobileNumber) : MessageFormat.format("Cell phone number with id {0} not found, but should be.", mobileNumber.getPhoneId()); //NOI18N
+               assert (managedNumber instanceof DialableMobileNumber) : MessageFormat.format("Cell phone number with id {0} not found, but should be.", mobileNumber.getMobileId()); //NOI18N
 
                // Debug message
-               this.getLoggerBeanLocal().logDebug(MessageFormat.format("{0}.updateMobileData: managedNumber.phoneId={1}", this.getClass().getSimpleName(), managedNumber.getPhoneId())); //NOI18N
+               this.getLoggerBeanLocal().logDebug(MessageFormat.format("{0}.updateMobileData: managedNumber.phoneId={1}", this.getClass().getSimpleName(), managedNumber.getMobileId())); //NOI18N
 
                // Set updated timestamp
-               MobileNumbers.copyAll(mobileNumber, managedNumber);
-               managedNumber.setPhoneEntryUpdated(new Date());
+               MobileNumbers.copyMobileNumber(mobileNumber, managedNumber);
+               managedNumber.setMobileEntryUpdated(new Date());
 
                // Trace message
                this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.updateMobileData: managedNumber={1} - EXIT!", this.getClass().getSimpleName(), managedNumber)); //NOI18N
index 7d102f3b49795f12906a5b8b7bb58bf4b26aea7c..430a1910a3a298a65e117202a10edda4f1726e0a 100644 (file)
@@ -82,7 +82,7 @@ public class JobsAdminUserSessionBean extends BaseJobsEnterpriseBean implements
 
                // Set created timestamp
                user.setUserCreated(new Date());
-               user.getUserContact().setContactCreated(new Date());
+               user.getUserContact().setContactEntryCreated(new Date());
 
                // Update mobile, land-line and fax instance
                this.setAllPhoneEntriesCreated(user.getUserContact());
index 94ec33421b8d24d6093eeb71aa1c56eb2e650b08..c4a193e19a6dab889dadf2854d3140ea57de3200 100644 (file)
@@ -588,22 +588,22 @@ public class JobsUserSessionBean extends BaseJobsEnterpriseBean implements UserS
                // Is there a  mobile instance set?
                if (mobileNumber instanceof DialableMobileNumber) {
                        // Debug message
-                       this.getLoggerBeanLocal().logDebug(MessageFormat.format("updateUserPersonalData: mobile.phoneId={0} is being updated ...", mobileNumber.getPhoneId())); //NOI18N
+                       this.getLoggerBeanLocal().logDebug(MessageFormat.format("updateUserPersonalData: mobile.phoneId={0} is being updated ...", mobileNumber.getMobileId())); //NOI18N
 
                        // Then find it, too
-                       final DialableMobileNumber foundMobile = this.getEntityManager().find(mobileNumber.getClass(), mobileNumber.getPhoneId());
+                       final DialableMobileNumber foundMobile = this.getEntityManager().find(mobileNumber.getClass(), mobileNumber.getMobileId());
 
                        // Should be there
-                       assert (foundMobile instanceof DialableMobileNumber) : MessageFormat.format("Mobile number with id {0} not found but should be.", foundMobile.getPhoneId()); //NOI18N
+                       assert (foundMobile instanceof DialableMobileNumber) : MessageFormat.format("Mobile number with id {0} not found but should be.", foundMobile.getMobileId()); //NOI18N
 
                        // Copy all
-                       MobileNumbers.copyAll(managedUser.getUserContact().getContactMobileNumber(), foundMobile);
+                       MobileNumbers.copyMobileNumber(managedUser.getUserContact().getContactMobileNumber(), foundMobile);
 
                        // Then merge it, too
                        final DialableMobileNumber managedMobile = this.getEntityManager().merge(foundMobile);
 
                        // Should be there
-                       assert (managedMobile instanceof DialableMobileNumber) : MessageFormat.format("Mobile number with id {0} not found but should be.", managedMobile.getPhoneId()); //NOI18N
+                       assert (managedMobile instanceof DialableMobileNumber) : MessageFormat.format("Mobile number with id {0} not found but should be.", managedMobile.getMobileId()); //NOI18N
 
                        // Set it back
                        managedContact.setContactMobileNumber(managedMobile);
@@ -624,7 +624,7 @@ public class JobsUserSessionBean extends BaseJobsEnterpriseBean implements UserS
                        assert (foundFax instanceof DialableFaxNumber) : MessageFormat.format("Fax number with id {0} not found but should be.", foundFax.getPhoneId()); //NOI18N
 
                        // Copy all
-                       FaxNumbers.copyAll(managedUser.getUserContact().getContactFaxNumber(), foundFax);
+                       FaxNumbers.copyFaxNumber(managedUser.getUserContact().getContactFaxNumber(), foundFax);
 
                        // Then merge it, too
                        final DialableFaxNumber managedFax = this.getEntityManager().merge(foundFax);
@@ -651,7 +651,7 @@ public class JobsUserSessionBean extends BaseJobsEnterpriseBean implements UserS
                        assert (foundLandLine instanceof DialableLandLineNumber) : MessageFormat.format("Land line number with id {0} not found but should be.", foundLandLine.getPhoneId()); //NOI18N
 
                        // Copy all
-                       LandLineNumbers.copyAll(managedUser.getUserContact().getContactLandLineNumber(), foundLandLine);
+                       LandLineNumbers.copyLandLineNumber(managedUser.getUserContact().getContactLandLineNumber(), foundLandLine);
 
                        // Then merge it, too
                        final DialableLandLineNumber managedLandLine = this.getEntityManager().merge(foundLandLine);