if (!authDao.hasAccess(SecurityConstants.SYSTEM_ID, SecurityConstants.SEC_FUNC_FIRMS, AccessMode.WRITE, cra)) {
ApplicationException.exception(DAOMessageID.UNAUTHORIZED.getMessage());
}
if (firm.getAttributesMap() != null) {
JsonHelper jsh = new JsonHelper();
firm.setAttributes(jsh.serialize(firm.getAttributesMap()));
}
UpdateResult ur = update(PROC_UPDATE_FIRM, updateSql, firm, cra);
if (ur.numberOfRowAffected == 0) {
Firm ef = readFirm(firm.getFirmId(), cra);
if (ef == null || ef.getRevNo() != firm.getRevNo()) {