| 1 | package edu.ucsb.cs156.courses.jobs; | |
| 2 | ||
| 3 | import org.springframework.beans.factory.annotation.Autowired; | |
| 4 | import org.springframework.stereotype.Service; | |
| 5 | ||
| 6 | import edu.ucsb.cs156.courses.collections.ConvertedSectionCollection; | |
| 7 | import edu.ucsb.cs156.courses.services.UCSBCurriculumService; | |
| 8 | import edu.ucsb.cs156.courses.entities.UCSBSubject; | |
| 9 | import edu.ucsb.cs156.courses.repositories.UCSBSubjectRepository; | |
| 10 | import lombok.extern.slf4j.Slf4j; | |
| 11 | ||
| 12 | import java.util.ArrayList; | |
| 13 | import java.util.List; | |
| 14 | ||
| 15 | @Service | |
| 16 | @Slf4j | |
| 17 | public class UpdateCourseDataRangeOfQuartersJobFactory { | |
| 18 | ||
| 19 | @Autowired | |
| 20 | private UCSBCurriculumService ucsbCurriculumService; | |
| 21 | ||
| 22 | @Autowired | |
| 23 | private ConvertedSectionCollection convertedSectionCollection; | |
| 24 | ||
| 25 | @Autowired | |
| 26 | private UCSBSubjectRepository subjectRepository; | |
| 27 | ||
| 28 | public UpdateCourseDataRangeOfQuartersJob create(String start_quarterYYYYQ, String end_quarterYYYYQ) { | |
| 29 | log.info("ucsbCurriculumService = " + ucsbCurriculumService); | |
| 30 | log.info("convertedSectionCollection = " + convertedSectionCollection); | |
| 31 | ||
| 32 | List<String> subjects = new ArrayList<String>(); | |
| 33 | Iterable<UCSBSubject> UCSBSubjects = subjectRepository.findAll(); | |
| 34 | for (UCSBSubject UCSBSubject : UCSBSubjects) { | |
| 35 | subjects.add(UCSBSubject.getSubjectCode()); | |
| 36 | } | |
| 37 |
1
1. create : replaced return value with null for edu/ucsb/cs156/courses/jobs/UpdateCourseDataRangeOfQuartersJobFactory::create → KILLED |
return new UpdateCourseDataRangeOfQuartersJob(start_quarterYYYYQ, end_quarterYYYYQ, ucsbCurriculumService, convertedSectionCollection, subjects); |
| 38 | } | |
| 39 | } | |
Mutations | ||
| 37 |
1.1 |