Account account = null;
getDbTrans().startTrans();
getDbTrans().setComplete();
try {
final IEntityDao dao = getDao();
account = getEntityBeanFactory().getEntityCopy(Asp.class, false);
final AccountAddress aa = getEntityBeanFactory().getEntityCopy(AccountAddress.class, false);
final Address a = getEntityBeanFactory().getEntityCopy(Address.class, false);
aa.setAddress(a);
account.addAccountAddress(aa);
final Currency c = dao.persist(getEntityBeanFactory().getEntityCopy(Currency.class, false));
account.setCurrency(c);
pi = dao.persist(getEntityBeanFactory().getEntityCopy(PaymentInfo.class, false));
account.setPaymentInfo(pi);
if(persist) {
account = dao.persist(account);
}
}
finally {
getDbTrans().endTrans();
}