@Override public void removeBranchBankAccount(final BranchBankAccount branchBankAccount) throws BusinessException, SystemException { final Collection<BranchBankAccountTransaction> branchBankAccountTransactions = this.branchBankAccountTransactionService .findBranchBankAccountTransactionsByBranchBankAccountId(branchBankAccount.getId()); if (branchBankAccountTransactions != null && branchBankAccountTransactions.size() > 0) { throw new ApplicationException( "Bank account cannot be deleted as transactions have be found."); } this.branchBankAccountDao.remove(branchBankAccount); }