ApplicationException.exception(AuthMessageID.FIRM_NOT_FOUND.getMessage());
}
if (firm.isActive()) {
ApplicationException.exception(AuthMessageID.FIRM_SHOULD_BE_INACTIVE_TO_BE_DELETED.getMessage());
}
ListUserCriteria crit = new ListUserCriteria();
crit.setFirmId(firm.getFirmId());
List<User> users = userDao.listUser(crit, null, cra);
if (users.size()>0) {
ApplicationException.exception(AuthMessageID.FIRM_SHOULD_NOT_HAVE_USERS_TO_BE_DELETED.getMessage());
}
firmDao.deleteFirm(firmKey, cra);