// Parameters must be valid
if (null == customer) {
// Throw NPE
- throw new NullPointerException("customer is null");
+ throw new NullPointerException("customer is null"); //NOI18N
} else if (customer.getCustomerId() == null) {
// Throw again ...
- throw new NullPointerException("customer.customerId is null");
+ throw new NullPointerException("customer.customerId is null"); //NOI18N
} else if (customer.getCustomerId() < 1) {
// Invalid id number
- throw new IllegalArgumentException(MessageFormat.format("customer.customerId={0} is not valid", customer.getCustomerId()));
+ throw new IllegalArgumentException(MessageFormat.format("customer.customerId={0} is not valid", customer.getCustomerId())); //NOI18N
} else if (customer.getCustomerContact() == null) {
// Throw NPE again
- throw new NullPointerException("customer.customerContact is null");
+ throw new NullPointerException("customer.customerContact is null"); //NOI18N
} else if (customer.getCustomerContact().getContactId() == null) {
// .. and again
- throw new NullPointerException("customer.customerContact.contactId is null");
+ throw new NullPointerException("customer.customerContact.contactId is null"); //NOI18N
} else if (customer.getCustomerContact().getContactId() < 1) {
// Invalid id
- throw new IllegalArgumentException(MessageFormat.format("customer.customerContact.contactId={0} is not valid", customer.getCustomerContact().getContactId()));
+ throw new IllegalArgumentException(MessageFormat.format("customer.customerContact.contactId={0} is not valid", customer.getCustomerContact().getContactId())); //NOI18N
}
// @TODO Set all data