5556575859606162636465
if (Strings.isNullOrEmpty(firm.getFirmName())) { rh.addMessage(CommonMessageID.MISSING_ARG.getMessage("Name")); return; } CommonRequestArgs cra = ctx.getRequest(); FirmKey ck = firmDao.insertFirm(firm, cra); if (ck == null) { rh.addMessage(CommonMessageID.SERVICE_FAILURE.getMessage()); return; } rh.addRow(ck);
7273747576777879808182
if (Strings.isNullOrEmpty(firm.getFirmName())) { rh.addMessage(CommonMessageID.MISSING_ARG.getMessage("Name")); return; } CommonRequestArgs cra = ctx.getRequest(); FirmKey ck = firmDao.updateFirm(firm, cra); if (ck == null) { rh.addMessage(CommonMessageID.NOT_FOUND.getMessage()); return; } rh.addRow(ck);
107108109110111112113
UpdateResult ur = insert(PROC_INSERT_FIRM, insertSql, firm, cra); if (ur.numberOfRowAffected == 0) { ApplicationException.exception(DAOMessageID.UNAUTHORIZED.getMessage()); } return new FirmKey(ur.key, 0); }
128129130131132133134
ApplicationException.exception(DAOMessageID.UPDATE_FAILURE.getMessage()); } else { ApplicationException.exception(DAOMessageID.UNAUTHORIZED.getMessage()); } } return new FirmKey(firm.getFirmId(), firm.getRevNo() +1); }