@SuppressWarnings("unchecked") public IConfiguredScheduledJob[] getConfiguredScheduledJobs() { DomainFactory factory = getDomainFactory(); String hqlString = "from ConfiguredJob as configuredJob where configuredJob.isActive = 1"; List jobs = factory.find(hqlString, new String[] {}, new Object[] {}); return ConfiguredJobVoAssembler.createConfiguredJobVoCollectionFromConfiguredJob(jobs).toIConfiguredScheduledJobArray(); }
public ConfiguredJobVo saveSystemJobDetails(ConfiguredJobVo jobDetails) throws StaleObjectException { if (!jobDetails.isValidated()) { throw new DomainRuntimeException("This ConfiguredJobVo has not been validated"); } DomainFactory factory = getDomainFactory(); ConfiguredJob jobDetailsBo = ConfiguredJobVoAssembler.extractConfiguredJob(factory, jobDetails); factory.save(jobDetailsBo); return ConfiguredJobVoAssembler.create(jobDetailsBo); }
public ConfiguredJobVo getConfiguredJobVo(Integer id) { if(id == null) { throw new CodingRuntimeException("SystemJobVo id is null"); } DomainFactory factory = getDomainFactory(); ConfiguredJob doConfiguredJob = (ConfiguredJob) factory.getDomainObject(ConfiguredJob.class, id); return ConfiguredJobVoAssembler.create(doConfiguredJob); }
public ConfiguredJobVoCollection listConfiguredSystemJobs() { DomainFactory factory = getDomainFactory(); String hqlString = "from ConfiguredJob"; List jobs = factory.find(hqlString, new String[] {}, new Object[] {}); return ConfiguredJobVoAssembler.createConfiguredJobVoCollectionFromConfiguredJob(jobs); }
public ConfiguredJobVo getSystemJobDetailsByImsId(Integer imsId) { DomainFactory factory = getDomainFactory(); String hqlString = "from ConfiguredJob configuredJob where configuredJob.id = :imsID"; List jobDetails = factory.find(hqlString, new String[] {"imsID"}, new Object[] {new Integer(imsId)}); if (jobDetails != null && jobDetails.size() > 0) { return ConfiguredJobVoAssembler.createConfiguredJobVoCollectionFromConfiguredJob(jobDetails).get(0); } return null; }
public ConfiguredJobVo getConfiguredScheduledJobVo(int id) { return ConfiguredJobVoAssembler.create((ConfiguredJob)getDomainFactory().getDomainObject(ConfiguredJob.class, id)); }