}
// Call other bean
- return this.userBean.isEmailAddressReqistered(user);
+ return this.userBean.isEmailAddressRegistered(user);
}
@Override
}
// Call other bean
- return this.userBean.isUserNameReqistered(user);
+ return this.userBean.isUserNameRegistered(user);
}
@Override
}
@Override
- public boolean isEmailAddressReqistered (final User user) {
+ public boolean isEmailAddressRegistered (final User user) {
// Trace message
- this.getLoggerBeanLocal().logTrace(MessageFormat.format("isEmailAddressReqistered: user={0} - CALLED!", user)); //NOI18N
+ this.getLoggerBeanLocal().logTrace(MessageFormat.format("isEmailAddressRegistered: user={0} - CALLED!", user)); //NOI18N
// user should not be null
if (null == user) {
User dummy = (User) query.getSingleResult();
// Debug message
- this.getLoggerBeanLocal().logDebug(MessageFormat.format("isEmailAddressReqistered: dummy.id={0} found.", dummy.getUserId())); //NOI18N
+ this.getLoggerBeanLocal().logDebug(MessageFormat.format("isEmailAddressRegistered: dummy.id={0} found.", dummy.getUserId())); //NOI18N
} catch (final NoResultException ex) {
// Log it
- this.getLoggerBeanLocal().logDebug(MessageFormat.format("isEmailAddressReqistered: getSingleResult() returned no result: {0}", ex)); //NOI18N
+ this.getLoggerBeanLocal().logDebug(MessageFormat.format("isEmailAddressRegistered: getSingleResult() returned no result: {0}", ex)); //NOI18N
// Email address does not exist
return false;
}
@Override
- public boolean isUserNameReqistered (final User user) {
+ public boolean isUserNameRegistered (final User user) {
// Trace message
- this.getLoggerBeanLocal().logTrace(MessageFormat.format("isUserNameReqistered: user={0} - CALLED!", user)); //NOI18N
+ this.getLoggerBeanLocal().logTrace(MessageFormat.format("isUserNameRegistered: user={0} - CALLED!", user)); //NOI18N
// user should not be null
if (null == user) {
User dummy = (User) query.getSingleResult();
// Debug message
- this.getLoggerBeanLocal().logDebug(MessageFormat.format("isUserNameReqistered: dummy.id={0} found.", dummy.getUserId())); //NOI18N
+ this.getLoggerBeanLocal().logDebug(MessageFormat.format("isUserNameRegistered: dummy.id={0} found.", dummy.getUserId())); //NOI18N
} catch (final NoResultException ex) {
// Log it
- this.getLoggerBeanLocal().logDebug(MessageFormat.format("isUserNameReqistered: getSingleResult() returned no result: {0}", ex)); //NOI18N
+ this.getLoggerBeanLocal().logDebug(MessageFormat.format("isUserNameRegistered: getSingleResult() returned no result: {0}", ex)); //NOI18N
// User name does not exist
return false;
} else if (customer.getCustomerNumber().length() < PizzaAdminCustomerSessionBeanRemote.CUSTOMER_NUMBER_LENGTH) {
// To short number
throw new IllegalArgumentException(MessageFormat.format("customer.customerNumber.length={0} is shorter than expected: {1}", customer.getCustomerNumber().length(), PizzaAdminCustomerSessionBeanRemote.CUSTOMER_NUMBER_LENGTH)); //NOI18N
- } else if (this.customerBean.isReqistered(customer)) {
+ } else if (this.customerBean.isRegistered(customer)) {
// Throw exception
throw new CustomerAlreadyRegisteredException(customer);
}
} else if (customer.getCustomerNumber().length() < PizzaAdminCustomerSessionBeanRemote.CUSTOMER_NUMBER_LENGTH) {
// To short number
throw new IllegalArgumentException(MessageFormat.format("customer.customerNumber.length={0} is shorter than expected: {1}", customer.getCustomerNumber().length(), PizzaAdminCustomerSessionBeanRemote.CUSTOMER_NUMBER_LENGTH)); //NOI18N
- } else if (this.customerBean.isReqistered(customer)) {
+ } else if (this.customerBean.isRegistered(customer)) {
// Throw exception
throw new CustomerAlreadyRegisteredException(customer);
}
}
@Override
- public boolean isReqistered (final Customer customer) {
+ public boolean isRegistered (final Customer customer) {
// Trace message
- this.getLoggerBeanLocal().logTrace(MessageFormat.format("isReqistered: customer={0} - CALLED!", customer)); //NOI18N
+ this.getLoggerBeanLocal().logTrace(MessageFormat.format("isRegistered: customer={0} - CALLED!", customer)); //NOI18N
// Paramerter customer should be valid
if (null == customer) {
Customer dummy = (Customer) query.getSingleResult();
// Debug message
- this.getLoggerBeanLocal().logDebug(MessageFormat.format("isReqistered: Customer {0} has number{1} and contact {2}", dummy.getCustomerId(), customer.getCustomerNumber(), customer.getCustomerContact().getContactId())); //NOI18N
+ this.getLoggerBeanLocal().logDebug(MessageFormat.format("isRegistered: Customer {0} has number{1} and contact {2}", dummy.getCustomerId(), customer.getCustomerNumber(), customer.getCustomerContact().getContactId())); //NOI18N
// Mark as found
isFound = true;
} catch (final NoResultException ex) {
// Not found
- this.getLoggerBeanLocal().logDebug(MessageFormat.format("isReqistered: Not found: {0}", ex.getMessage())); //NOI18N
+ this.getLoggerBeanLocal().logDebug(MessageFormat.format("isRegistered: Not found: {0}", ex.getMessage())); //NOI18N
}
// Trace message
- this.getLoggerBeanLocal().logTrace(MessageFormat.format("isReqistered: isFound={0} - EXIT!", isFound)); //NOI18N
+ this.getLoggerBeanLocal().logTrace(MessageFormat.format("isRegistered: isFound={0} - EXIT!", isFound)); //NOI18N
// Return it
return isFound;