import javax.ejb.Stateless;
import javax.persistence.NoResultException;
import javax.persistence.Query;
-import org.mxchange.jfinancials.database.BaseFinancialsDatabaseBean;
import org.mxchange.jcontacts.contact.utils.ContactUtils;
import org.mxchange.jcontacts.exceptions.ContactNotFoundException;
+import org.mxchange.jfinancials.database.BaseFinancialsDatabaseBean;
/**
* A contact EJB
// Set updated timestamp
this.setAllContactPhoneEntriesUpdated(contact, isCellphoneUnlinked, isLandlineUnlinked, isFaxUnlinked);
- // Merge cellphone, land-line and fix
+ // Merge mobile, land-line and fix
Contact detachedContact = this.mergeContactData(contact);
// Trace message
throw new IllegalArgumentException(MessageFormat.format("mobileNumber.phoneId={0} is not valid", mobileNumber.getPhoneId())); //NOI18N
} else if (mobileNumber.getMobileProvider() == null) {
// Throw NPE
- throw new NullPointerException("mobileNumber.cellphoneProvider is null"); //NOI18N
+ throw new NullPointerException("mobileNumber.mobileProvider is null"); //NOI18N
} else if (mobileNumber.getMobileProvider().getProviderId() == null) {
// ... throw again
- throw new NullPointerException("mobileNumber.cellphoneProvider.providerId is null"); //NOI18N
+ throw new NullPointerException("mobileNumber.mobileProvider.providerId is null"); //NOI18N
} 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
+ throw new IllegalArgumentException(MessageFormat.format("mobileNumber.mobileProvider.providerId={0} is not valid.", mobileNumber.getMobileProvider().getProviderId())); //NOI18N
} else if (mobileNumber.getPhoneNumber() == null) {
// Throw NPE again
throw new NullPointerException("mobileNumber.phoneNumber is null"); //NOI18N
throw new IllegalArgumentException(MessageFormat.format("mobileNumber.phoneId={0} is not valid", mobileNumber.getPhoneId())); //NOI18N
} else if (mobileNumber.getMobileProvider() == null) {
// Throw NPE
- throw new NullPointerException("mobileNumber.cellphoneProvider is null"); //NOI18N
+ throw new NullPointerException("mobileNumber.mobileProvider is null"); //NOI18N
} else if (mobileNumber.getMobileProvider().getProviderId() == null) {
// ... throw again
- throw new NullPointerException("mobileNumber.cellphoneProvider.providerId is null"); //NOI18N
+ throw new NullPointerException("mobileNumber.mobileProvider.providerId is null"); //NOI18N
} 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
+ throw new IllegalArgumentException(MessageFormat.format("mobileNumber.mobileProvider.providerId={0} is not valid.", mobileNumber.getMobileProvider().getProviderId())); //NOI18N
} else if (mobileNumber.getPhoneNumber() == null) {
// Throw NPE again
throw new NullPointerException("mobileNumber.phoneNumber is null"); //NOI18N
}
// Trace message
- this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.findFaxNumberById: cellphone={1} - EXIT!", this.getClass().getSimpleName(), faxNumber)); //NOI18N
+ this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.findFaxNumberById: mobile={1} - EXIT!", this.getClass().getSimpleName(), faxNumber)); //NOI18N
// Return found instance
return faxNumber;
}
// Trace message
- this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.findLandLineNumberById: cellphone={1} - EXIT!", this.getClass().getSimpleName(), landLineNumber)); //NOI18N
+ this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.findLandLineNumberById: mobile={1} - EXIT!", this.getClass().getSimpleName(), landLineNumber)); //NOI18N
// Return found instance
return landLineNumber;
query.setParameter("mobileNumberId", mobileNumberId); //NOI18N
// Init instance
- DialableMobileNumber cellphone = null;
+ DialableMobileNumber mobile = null;
// Try to get a result
try {
// Get a single result
- cellphone = (DialableMobileNumber) query.getSingleResult();
+ mobile = (DialableMobileNumber) query.getSingleResult();
} catch (NoResultException ex) {
// The entry was not found, so throw it again
throw new PhoneEntityNotFoundException(mobileNumberId, ex);
}
// Trace message
- this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.findMobileNumberById: cellphone={1} - EXIT!", this.getClass().getSimpleName(), cellphone)); //NOI18N
+ this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.findMobileNumberById: mobile={1} - EXIT!", this.getClass().getSimpleName(), mobile)); //NOI18N
// Return found instance
- return cellphone;
+ return mobile;
}
}
user.setUserCreated(new GregorianCalendar());
user.getUserContact().setContactCreated(new GregorianCalendar());
- // Update cellphone, land-line and fax instance
+ // Update mobile, land-line and fax instance
this.setAllContactPhoneEntriesCreated(user.getUserContact());
// Persist it