public DischargeSummaryScheduleVo getJob(String jobDesc) { DomainFactory factory = getDomainFactory(); String sql = "from DischargeSummarySchedule"; List jobs = factory.find(sql); if (jobs.size() > 0) { for (int i = 0 ; i < jobs.size(); i ++) { DischargeSummaryScheduleVo voDSS = DischargeSummaryScheduleVoAssembler.create((DischargeSummarySchedule) jobs.get(i)); StringBuffer sb = new StringBuffer(); sb.append(voDSS.getJobType().getText().toString()); if (jobDesc.equals(sb.toString())) { return voDSS; } } } return null; }
public void save(DischargeSummaryScheduleVo batch) throws StaleObjectException { if(batch == null) { throw new CodingRuntimeException("DischargeSummaryScheduleVo is null"); } if (!batch.isValidated()) { throw new DomainRuntimeException("DischargeSummaryScheduleVo not validated"); } DomainFactory factory = getDomainFactory(); factory.save(DischargeSummaryScheduleVoAssembler.extractDischargeSummarySchedule(factory, batch)); }
public DischargeSummaryScheduleVo getDischargeSummarySchedule(DischargeSummaryScheduleRefVo voRef) { if(voRef == null) throw new CodingRuntimeException("Cannot get DischargeSummaryScheduleVo for null DischargeSummaryScheduleRefVo"); DomainFactory factory = getDomainFactory(); DischargeSummarySchedule doDischargeSummarySchedule = (DischargeSummarySchedule) factory.getDomainObject(DischargeSummarySchedule.class, voRef.getID_DischargeSummarySchedule()); return DischargeSummaryScheduleVoAssembler.create(doDischargeSummarySchedule); }
public DischargeSummaryScheduleVoCollection getJobs() { DomainFactory factory = getDomainFactory(); String sql = "from DischargeSummarySchedule"; List jobs = factory.find(sql); if (jobs.size() > 0) { return DischargeSummaryScheduleVoAssembler.createDischargeSummaryScheduleVoCollectionFromDischargeSummarySchedule(jobs); } return null; }