@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;
 }
  @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;
  }
  @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;
  }