| 1 | package edu.ucsb.cs156.courses.documents; | |
| 2 | ||
| 3 | import com.fasterxml.jackson.annotation.JsonIgnore; | |
| 4 | import edu.ucsb.cs156.courses.entities.EnrollmentDataPoint; | |
| 5 | import lombok.AllArgsConstructor; | |
| 6 | import lombok.Builder; | |
| 7 | import lombok.Data; | |
| 8 | import lombok.NoArgsConstructor; | |
| 9 | import org.bson.types.ObjectId; | |
| 10 | import org.springframework.data.mongodb.core.mapping.Document; | |
| 11 | ||
| 12 | @Data | |
| 13 | @Builder | |
| 14 | @NoArgsConstructor | |
| 15 | @AllArgsConstructor | |
| 16 | @Document(collection = "courses") | |
| 17 | public class ConvertedSection { | |
| 18 |   private ObjectId _id; | |
| 19 |   private CourseInfo courseInfo; | |
| 20 |   private Section section; | |
| 21 | ||
| 22 |   @Override | |
| 23 |   public Object clone() throws CloneNotSupportedException { | |
| 24 | ||
| 25 |     ConvertedSection newConvertedSection = new ConvertedSection(); | |
| 26 | ||
| 27 | 
1
1. clone : removed call to edu/ucsb/cs156/courses/documents/ConvertedSection::set_id → KILLED | 
    newConvertedSection.set_id(this._id); | 
| 28 | ||
| 29 |     CourseInfo newCourseInfo = (CourseInfo) this.getCourseInfo().clone(); | |
| 30 | 
1
1. clone : removed call to edu/ucsb/cs156/courses/documents/ConvertedSection::setCourseInfo → KILLED | 
    newConvertedSection.setCourseInfo(newCourseInfo); | 
| 31 | ||
| 32 |     Section newSection = (Section) this.getSection().clone(); | |
| 33 | 
1
1. clone : removed call to edu/ucsb/cs156/courses/documents/ConvertedSection::setSection → KILLED | 
    newConvertedSection.setSection(newSection); | 
| 34 | ||
| 35 | 
1
1. clone : replaced return value with null for edu/ucsb/cs156/courses/documents/ConvertedSection::clone → KILLED | 
    return newConvertedSection; | 
| 36 |   } | |
| 37 | ||
| 38 |   @JsonIgnore | |
| 39 |   public EnrollmentDataPoint getEnrollmentDataPoint() { | |
| 40 |     EnrollmentDataPoint edp = | |
| 41 |         EnrollmentDataPoint.builder() | |
| 42 |             .yyyyq(this.getCourseInfo().getQuarter()) | |
| 43 |             .enrollCd(this.getSection().getEnrollCode()) | |
| 44 |             .enrollment(this.getSection().getEnrolledTotal()) | |
| 45 |             .courseId(this.getCourseInfo().getCourseId()) | |
| 46 |             .section(this.getSection().getSection()) | |
| 47 |             .build(); | |
| 48 | 
1
1. getEnrollmentDataPoint : replaced return value with null for edu/ucsb/cs156/courses/documents/ConvertedSection::getEnrollmentDataPoint → KILLED | 
    return edp; | 
| 49 |   } | |
| 50 | } | |
Mutations | ||
| 27 | 
 
 1.1  | 
|
| 30 | 
 
 1.1  | 
|
| 33 | 
 
 1.1  | 
|
| 35 | 
 
 1.1  | 
|
| 48 | 
 
 1.1  |