protected void lookup_depositAccount_Account(FinancialAccountAcctDs ds, FinancialAccountAcct e) throws Exception { if (ds.getDepositAccount() != null && !ds.getDepositAccount().equals("")) { Account x = null; try { x = ((IAccountService) findEntityService(Account.class)).findByCode(ds.getDepositAccount()); } catch (javax.persistence.NoResultException exception) { throw new Exception( "Invalid value provided to find `Account` reference: `depositAccount` = " + ds.getDepositAccount() + " "); } e.setDepositAccount(x); } else { e.setDepositAccount(null); } }