コード例 #1
0
 @Override
 public Job getJob(final Guid jobId) {
   Job job = jobDao.get(jobId);
   if (job != null) {
     Map<Guid, VdcObjectType> jobSubjectEntity =
         jobSubjectEntityDao.getJobSubjectEntityByJobId(jobId);
     job.setJobSubjectEntities(jobSubjectEntity);
   }
   return job;
 }
コード例 #2
0
  @Override
  public List<Job> getJobsByEntityAndAction(Guid entityId, VdcActionType actionType) {
    List<Job> jobList = new ArrayList<Job>();
    List<Guid> jobIdsList = jobSubjectEntityDao.getJobIdByEntityId(entityId);

    for (Guid jobId : jobIdsList) {
      Job job = jobDao.get(jobId);
      if (job != null && job.getActionType() == actionType) {
        jobList.add(job);
      }
    }
    return jobList;
  }
コード例 #3
0
  @Override
  public Job getJobWithSteps(final Guid jobId) {
    Job job = jobDao.get(jobId);
    if (job != null) {
      Map<Guid, VdcObjectType> jobSubjectEntity =
          jobSubjectEntityDao.getJobSubjectEntityByJobId(jobId);
      job.setJobSubjectEntities(jobSubjectEntity);

      List<Step> steps = stepDao.getStepsByJobId(jobId);
      if (!steps.isEmpty()) {
        job.setSteps(buildStepsTree(steps));
      }
    }
    return job;
  }