ClusterGroup clusterGroup = null;
if (parameters.getClusterGroupId() != null) {
clusterGroup = businessEntityDao.findById(ClusterGroup.class, parameters.getClusterGroupId());
if (clusterGroup == null) {
throw new MissingEntityException(ClusterGroup.class, parameters.getClusterGroupId());
}
}
ScheduleGroup scheduleGroup = businessEntityDao.findById(ScheduleGroup.class, parameters.getScheduleGroupId());
if (scheduleGroup == null) {
throw new MissingEntityException(ScheduleGroup.class, parameters.getScheduleGroupId());
}
Date now = chronometer.getCurrentMoment();
ScheduleAction scheduleAction = new ScheduleAction();