Commit 2a50e491 authored by Roberto Loayza's avatar Roberto Loayza

SchedulerTask

parent 0f43298e
......@@ -23,6 +23,8 @@ public class SchedulerTaskBean implements Serializable {
@Expose
private String stringParameters;
@Expose
private Long etlId;
@Expose
private String calendarID;
@Expose
private String calendarName;
......
......@@ -44,6 +44,9 @@ public class SchedulerTask implements Serializable {
@Column(name = "SHTA_CROEX", nullable = false)
private String cronExpression;
@Column(name = "ETL_ID")
private Long etlId;
@Column(name = "SHTA_PARAM")
private String stringParameters;
......
......@@ -37,7 +37,7 @@ public class SchedulerTaskService extends XDFService<SchedulerTask, SchedulerTas
}
BeanUtils.copyProperties(bean, model);
model.setInternals("Y".equals(bean.getInternals()));
model.setEtlId(bean.getEtlId());
if (bean.getCalendarID() == null) {
throw new NotFoundException("Calendar can not be null");
}
......@@ -47,7 +47,6 @@ public class SchedulerTaskService extends XDFService<SchedulerTask, SchedulerTas
throw new NotFoundException("Calendar not found " + bean.getCalendarID());
}
// model.setCalendar(calendarOptional.get());
return model;
}
......@@ -57,7 +56,7 @@ public class SchedulerTaskService extends XDFService<SchedulerTask, SchedulerTas
BeanUtils.copyProperties(model, bean);
bean.setInternals(model.getInternals().booleanValue() ? "Y" : "N");
bean.setCalendarID(bean.getCalendarID().trim());
bean.setEtlId(bean.getEtlId());
// CalendarBean found = this.CalendarService.getById(bean.getCalendarID());
Optional<Calendar> calendarOptional = this.calendarRepository.findById(bean.getCalendarID());
if (!calendarOptional.isPresent()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment