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); }
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); }