use of com.linkedin.thirdeye.datalayer.dto.TaskDTO in project pinot by linkedin.
the class TaskManagerImpl method findByStatusNotIn.
@Override
@Transactional
public List<TaskDTO> findByStatusNotIn(TaskStatus status) {
Predicate statusPredicate = Predicate.NEQ("status", status.toString());
List<TaskBean> list = genericPojoDao.get(statusPredicate, TaskBean.class);
List<TaskDTO> result = new ArrayList<>();
for (TaskBean bean : list) {
result.add((TaskDTO) MODEL_MAPPER.map(bean, TaskDTO.class));
}
return result;
}
use of com.linkedin.thirdeye.datalayer.dto.TaskDTO in project pinot by linkedin.
the class TaskManagerImpl method updateStatusAndTaskEndTime.
@Override
public void updateStatusAndTaskEndTime(Long id, TaskStatus oldStatus, TaskStatus newStatus, Long taskEndTime) {
TaskDTO task = findById(id);
if (task.getStatus().equals(oldStatus)) {
task.setStatus(newStatus);
task.setEndTime(taskEndTime);
save(task);
}
}
Aggregations