X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2Fjava%2Forg%2Fmxchange%2Fjcontacts%2Fmodel%2Fphone%2FJobsAdminContactPhoneSessionBean.java;fp=src%2Fjava%2Forg%2Fmxchange%2Fjcontacts%2Fmodel%2Fphone%2FJobsAdminContactPhoneSessionBean.java;h=68f3348e7ea98dc25e18de742a0ce2981fa12050;hb=7ace37b56fa5c276515a53c8d79da5aa87ef7332;hp=8450069ba61a07ca8b10c8340bd6262ad471b579;hpb=254cb0c099e8a7c69aee2a7bdccdd6b3436ba331;p=jjobs-ejb.git diff --git a/src/java/org/mxchange/jcontacts/model/phone/JobsAdminContactPhoneSessionBean.java b/src/java/org/mxchange/jcontacts/model/phone/JobsAdminContactPhoneSessionBean.java index 8450069..68f3348 100644 --- a/src/java/org/mxchange/jcontacts/model/phone/JobsAdminContactPhoneSessionBean.java +++ b/src/java/org/mxchange/jcontacts/model/phone/JobsAdminContactPhoneSessionBean.java @@ -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