/** Update the Access Record */ public ReturnMessage updateAccessRecord(AccessRecord record) { logger.debug(" enter constructor AccessRecordController.updateAccessRecord() " + record); ReturnMessage msg = new ReturnMessage(); try { // TODO Validate all the key details. It should recalculate everything again, just to make // sure any false input // validatePartyRecord(record); // call the service method to update accessRecordService.save(record); // assuming saved successfully if no error is thrown msg.setSuccessMsg( ReturnMessage.SuccessSet.UPDATE_SUCCESS.toString() + record.getACCESSRECORDID()); msg.setObj(record.getACCESSRECORDID()); msg.setStatus(StatusOfMessage.SUCCESS); } catch (Exception e) { logger.error( " Exception caught in AccessRecordController.updateAccessRecord() -> " + e.getMessage()); e.printStackTrace(); msg.setErrMsg(ReturnMessage.ErrorSet.UNKNOWN_ERROR.toString()); } return msg; }