private synchronized void saveJob(EDDischargeSummaryScheduleVo job) { if(job == null) return; job.setGeneratedLettersNo(job.getGeneratedLettersNo() != null ? job.getGeneratedLettersNo() + GeneratedLettersNo : GeneratedLettersNo); job.setPrintedLettersNo(job.getPrintedLettersNo() != null ? job.getPrintedLettersNo() + PrintedLettersNo : PrintedLettersNo); if (!Boolean.TRUE.equals(job.getPrintLettersOnly())) { job.setSuccessfulEmailsNo(job.getSuccessfulEmailsNo() != null ? job.getSuccessfulEmailsNo() + SuccessfulEmailsNo : SuccessfulEmailsNo); job.setFailedEmailsNo(job.getFailedEmailsNo() != null ? job.getFailedEmailsNo() + FailedEmailsNo : FailedEmailsNo); } DomainFactoryBridge factory = getDomainFactory(); EDDischargeSummarySchedule doJob = EDDischargeSummaryScheduleVoAssembler.extractEDDischargeSummarySchedule(factory, job); try { factory.save(doJob); } catch (StaleObjectException e) { trace("Job details save failed! " + e.getMessage()); return; } }
public ims.emergency.vo.EDDischargeSummaryScheduleVo saveConfiguration(ims.emergency.vo.EDDischargeSummaryScheduleVo record) throws ims.domain.exceptions.StaleObjectException { if(record == null) throw new CodingRuntimeException("Invalid configuration"); if(!record.isValidated()) throw new CodingRuntimeException("Configuration not validated"); DomainFactory factory = getDomainFactory(); EDDischargeSummarySchedule bo = EDDischargeSummaryScheduleVoAssembler.extractEDDischargeSummarySchedule(factory, record); getDomainFactory().save(bo); return EDDischargeSummaryScheduleVoAssembler.create(bo); }
public ims.emergency.vo.EDDischargeSummaryScheduleVo getConfiguration(ims.admin.vo.ConfiguredJobVo configuredJob) { if(configuredJob == null) throw new CodingRuntimeException("Invalid job"); DomainFactory factory = getDomainFactory(); EDDischargeSummarySchedule bo = EDDischargeSummarySchedule.getEDDischargeSummaryScheduleFromConfiguredJobDetails(factory, configuredJob.getBoId()); return EDDischargeSummaryScheduleVoAssembler.create(bo); }
private EDDischargeSummaryScheduleVo getJobDetails() { EDDischargeSummarySchedule doEDDischargeSummarySchedule = EDDischargeSummarySchedule.getEDDischargeSummaryScheduleFromConfiguredJobDetails(getDomainFactory(), super.getConfiguredJob().getConfiguredScheduledJobID()); return EDDischargeSummaryScheduleVoAssembler.create(doEDDischargeSummarySchedule); }