
Chapter 7. Migrating from JBoss 211
public void updateCustomer(CustomerValue customer, AccountValue account) throws
DuplicateEmailException, FinderException
{
/* Make sure that the email is unique */
CustomerLocalHome home = getCustomerLocalHome();
CustomerLocal cst = null;
/* Update the customer */
if (cst == null) {
cst = home.findByPrimaryKey(customer.getUserId());
}
cst.setCustomerValue(customer);
if ((account!=null)&&(account.getPassword()!=null)&&(account.getPassword().length()>0))
{
cst.getAccount().setAccountValue(account);
}
}
37.And finally, because CustomerValue does not include account information,
you need to add a new method to the ...