@SuppressWarnings("unchecked") public IScheduledJob[] getAvailableScheduledJobs() { DomainFactory factory = getDomainFactory(); String hqlString = "from SystemJob job where job.isActive = :ACTIVE"; List jobs = factory.find(hqlString, new String[] {"ACTIVE"}, new Object[] {Boolean.TRUE}); return SystemJobVoAssembler.createSystemJobVoCollectionFromSystemJob(jobs).toIScheduledJobArray(); }
public SystemJobVoCollection listAvailableSystemJobs() { DomainFactory factory = getDomainFactory(); String hqlString = "from SystemJob job where job.isActive = :ACTIVE"; List jobs = factory.find(hqlString, new String[] {"ACTIVE"}, new Object[] {Boolean.TRUE}); return SystemJobVoAssembler.createSystemJobVoCollectionFromSystemJob(jobs); }
public SystemJobVo getSystemJobVo(Integer id) { if(id == null) { throw new CodingRuntimeException("SystemJobVo id is null"); } DomainFactory factory = getDomainFactory(); SystemJob doSystemJob = (SystemJob) factory.getDomainObject(SystemJob.class, id); return (SystemJobVoAssembler.create(doSystemJob)); }
public SystemJobVo getSystemJobByImsId(Integer imsId) { DomainFactory factory = getDomainFactory(); String hqlString = "from SystemJob job where job.isActive = :isActive and job.imsId = :imsID"; List jobs = factory.find(hqlString, new String[] {"isActive", "imsID"}, new Object[] {true, new Integer(imsId)}); if (jobs != null && jobs.size() > 0) { return SystemJobVoAssembler.createSystemJobVoCollectionFromSystemJob(jobs).get(0); } return null; }