private void updateRowRecord(grdListRow row, PropertyChecklistVo record) { if (row == null || record == null) return; row.setColType(record.getMovementType().toString()); row.setColWard(record.getWard().toString()); row.setColDate(record.getAuthoringDateTime().toString()); row.setColAuthoring(record.getAuthoringHCP().toString()); row.setValue(record); }
private void updateRowRecord(PropertyChecklistVo record) { if (record == null) return; for (int j = 0; j < form.grdList().getRows().size(); j++) { PropertyChecklistShortVo existingRecord = form.grdList().getRows().get(j).getValue(); if (existingRecord != null && existingRecord.equals(record)) { updateRowRecord(form.grdList().getRows().get(j), record); break; } } if (form.ctnDetails().cmbMoveType().getValue().equals(MovementType.TRANSFER)) { showWardDest(); } else { showOnlyWard(); } }
public PropertyChecklistVo save(PropertyChecklistVo record) throws StaleObjectException { if(record == null) { throw new DomainRuntimeException("Invalid record"); } if(!record.isValidated()) { throw new CodingRuntimeException("Record not validated"); } DomainFactory factory = getDomainFactory(); PropertyChecklist domainRecord = PropertyChecklistVoAssembler.extractPropertyChecklist(factory, record); factory.save(domainRecord); return PropertyChecklistVoAssembler.create(domainRecord); }
private boolean save() { PropertyChecklistVo record = populateDataFromScreen(form.getLocalContext().getEditedRecord()); String[] uiErrors = getUiErrors(); String[] errors = record.validate(uiErrors); if(errors != null && errors.length > 0) { engine.showErrors(errors); return false; } try { record = domain.save(record); } catch(StaleObjectException e) { engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue()); PropertyChecklistVo updatedRecord = getAndDisplayRecord(record); updateRowRecord(updatedRecord); return false; } form.getLocalContext().setEditedRecord(record); return true; }
private PropertyChecklistVo getAndDisplayRecord(PropertyChecklistShortVo refRecord) { clear(); if(refRecord == null) return null; PropertyChecklistVo record = domain.get(refRecord); form.getLocalContext().setEditedRecord(record); populateScreenFromData(record); return record; }
public PropertyChecklistVo get(PropertyChecklistRefVo record) { if(record == null || record.getID_PropertyChecklist() == null) { throw new DomainRuntimeException("Invalid record"); } DomainFactory factory = getDomainFactory(); PropertyChecklist domainRecord = (PropertyChecklist)factory.getDomainObject (PropertyChecklist.class, record.getID_PropertyChecklist().intValue()); return PropertyChecklistVoAssembler.create(domainRecord); }
private PropertyChecklistVo getAndDisplayRecord() { return getAndDisplayRecord(form.grdList().getValue()); }
protected PropertyChecklistVo populateDataFromScreen() { return populateDataFromScreen(form.getLocalContext().getEditedRecord()); }