diff --git a/api/pom.xml b/api/pom.xml
index 51d4bc3..042578b 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -6,7 +6,7 @@
ca.bc.gov.educ
educ-grad-data-conversion-api
- 1.8.60
+ 1.8.61
educ-grad-data-conversion-api
Ministry of Education GRAD DATA CONVERSION API
diff --git a/api/src/main/.DS_Store b/api/src/main/.DS_Store
new file mode 100644
index 0000000..c4ea4fb
Binary files /dev/null and b/api/src/main/.DS_Store differ
diff --git a/api/src/main/java/ca/bc/gov/educ/api/dataconversion/constant/FieldName.java b/api/src/main/java/ca/bc/gov/educ/api/dataconversion/constant/FieldName.java
index 1d8cec7..28e3c51 100644
--- a/api/src/main/java/ca/bc/gov/educ/api/dataconversion/constant/FieldName.java
+++ b/api/src/main/java/ca/bc/gov/educ/api/dataconversion/constant/FieldName.java
@@ -2,6 +2,7 @@
public enum FieldName {
SCHOOL_OF_RECORD,
+ SCHOOL_OF_RECORD_ID,
GRAD_PROGRAM,
ADULT_START_DATE,
SLP_DATE,
diff --git a/api/src/main/java/ca/bc/gov/educ/api/dataconversion/constant/FieldType.java b/api/src/main/java/ca/bc/gov/educ/api/dataconversion/constant/FieldType.java
index 394bc82..fcf9ad9 100644
--- a/api/src/main/java/ca/bc/gov/educ/api/dataconversion/constant/FieldType.java
+++ b/api/src/main/java/ca/bc/gov/educ/api/dataconversion/constant/FieldType.java
@@ -2,5 +2,6 @@
public enum FieldType {
STRING,
- DATE
+ DATE,
+ GUID
}
\ No newline at end of file
diff --git a/api/src/main/java/ca/bc/gov/educ/api/dataconversion/model/ConvGradStudent.java b/api/src/main/java/ca/bc/gov/educ/api/dataconversion/model/ConvGradStudent.java
index 6aef3af..a01b9ab 100644
--- a/api/src/main/java/ca/bc/gov/educ/api/dataconversion/model/ConvGradStudent.java
+++ b/api/src/main/java/ca/bc/gov/educ/api/dataconversion/model/ConvGradStudent.java
@@ -9,6 +9,7 @@
import java.util.Date;
import java.util.List;
+import java.util.UUID;
@Data
@Builder
@@ -25,6 +26,7 @@ public class ConvGradStudent {
private String honoursStanding; // inc
private String studentGradData;
private String schoolOfRecord; // inc
+ private UUID schoolOfRecordId; // inc
private String schoolAtGrad; // inc
private String studentGrade; // inc
private String studentStatus; // inc
diff --git a/api/src/main/java/ca/bc/gov/educ/api/dataconversion/model/GraduationStudentRecord.java b/api/src/main/java/ca/bc/gov/educ/api/dataconversion/model/GraduationStudentRecord.java
index 6941df2..0088ff4 100644
--- a/api/src/main/java/ca/bc/gov/educ/api/dataconversion/model/GraduationStudentRecord.java
+++ b/api/src/main/java/ca/bc/gov/educ/api/dataconversion/model/GraduationStudentRecord.java
@@ -24,6 +24,7 @@ public class GraduationStudentRecord extends BaseModel{
private String recalculateGradStatus;
private String recalculateProjectedGrad;
private String schoolOfRecord;
+ private UUID schoolOfRecordId;
private String studentGrade;
private String studentStatus;
private UUID studentID;
diff --git a/api/src/main/java/ca/bc/gov/educ/api/dataconversion/model/StudentCommonDTO.java b/api/src/main/java/ca/bc/gov/educ/api/dataconversion/model/StudentCommonDTO.java
index ce23642..eb543ab 100644
--- a/api/src/main/java/ca/bc/gov/educ/api/dataconversion/model/StudentCommonDTO.java
+++ b/api/src/main/java/ca/bc/gov/educ/api/dataconversion/model/StudentCommonDTO.java
@@ -6,6 +6,7 @@
import java.util.ArrayList;
import java.util.List;
+import java.util.UUID;
@Slf4j
@Data
@@ -14,6 +15,7 @@ public class StudentCommonDTO extends StudentDemographicDTO {
private String program;
private String gradDate;
private String schoolOfRecord;
+ private UUID schoolOfRecordId;
private String schoolAtGrad;
private String studentGrade;
private String studentStatus;
diff --git a/api/src/main/java/ca/bc/gov/educ/api/dataconversion/model/StudentGradDTO.java b/api/src/main/java/ca/bc/gov/educ/api/dataconversion/model/StudentGradDTO.java
index 3c364a2..c3fb2d0 100644
--- a/api/src/main/java/ca/bc/gov/educ/api/dataconversion/model/StudentGradDTO.java
+++ b/api/src/main/java/ca/bc/gov/educ/api/dataconversion/model/StudentGradDTO.java
@@ -19,6 +19,7 @@ public class StudentGradDTO extends StudentCommonDTO {
private String newProgram;
private String newGradDate;
private String newSchoolOfRecord;
+ private UUID newSchoolOfRecordId;
private String newStudentGrade;
private String newStudentStatus;
private String newCitizenship;
diff --git a/api/src/main/java/ca/bc/gov/educ/api/dataconversion/model/TraxGraduationUpdateDTO.java b/api/src/main/java/ca/bc/gov/educ/api/dataconversion/model/TraxGraduationUpdateDTO.java
index f8a633b..d3e912a 100644
--- a/api/src/main/java/ca/bc/gov/educ/api/dataconversion/model/TraxGraduationUpdateDTO.java
+++ b/api/src/main/java/ca/bc/gov/educ/api/dataconversion/model/TraxGraduationUpdateDTO.java
@@ -7,6 +7,8 @@
import lombok.Data;
import lombok.NoArgsConstructor;
+import java.util.UUID;
+
@Data
@Builder
@AllArgsConstructor
@@ -20,6 +22,8 @@ public class TraxGraduationUpdateDTO extends TraxStudentUpdateDTO {
private String studentGrade;
// MINCODE
private String schoolOfRecord;
+ // SchoolId
+ private UUID schoolOfRecordId;
// SLP_DATE
private String slpDate;
// STUD_CITIZ
diff --git a/api/src/main/java/ca/bc/gov/educ/api/dataconversion/process/StudentProcess.java b/api/src/main/java/ca/bc/gov/educ/api/dataconversion/process/StudentProcess.java
index 626b671..171f1b8 100644
--- a/api/src/main/java/ca/bc/gov/educ/api/dataconversion/process/StudentProcess.java
+++ b/api/src/main/java/ca/bc/gov/educ/api/dataconversion/process/StudentProcess.java
@@ -148,7 +148,7 @@ private void processDependencies(ConvGradStudent convGradStudent,
gradStudent.setPen(convGradStudent.getPen());
result = processOptionalPrograms(gradStudent, summary, ongoingUpdate);
- if (ConversionResultType.FAILURE != result) {
+ if (!ongoingUpdate && ConversionResultType.FAILURE != result) {
result = processProgramCodes(gradStudent, convGradStudent.getProgramCodes(), summary);
}
if (ConversionResultType.FAILURE != result) {
@@ -178,6 +178,7 @@ private void convertStudentData(ConvGradStudent student, Student penStudent, Gra
gradStudent.setSchoolAtGrad(null);
gradStudent.setSchoolOfRecord(StringUtils.isNotBlank(student.getSchoolOfRecord())? student.getSchoolOfRecord() : null);
+ gradStudent.setSchoolOfRecordId(student.getSchoolOfRecordId());
gradStudent.setStudentGrade(student.getStudentGrade());
gradStudent.setStudentStatus(getGradStudentStatus(student.getStudentStatus(), student.getArchiveFlag()));
@@ -369,6 +370,7 @@ public StudentGradDTO loadStudentData(String pen, String accessToken) {
studentData.setStudentGrade(gradStudent.getStudentGrade());
studentData.setStudentStatus(gradStudent.getStudentStatus());
studentData.setSchoolOfRecord(gradStudent.getSchoolOfRecord());
+ studentData.setSchoolOfRecordId(gradStudent.getSchoolOfRecordId());
studentData.setSchoolAtGrad(gradStudent.getSchoolAtGrad());
studentData.setCitizenship(gradStudent.getStudentCitizenship());
studentData.setAdultStartDate(gradStudent.getAdultStartDate());
@@ -450,6 +452,13 @@ public void saveGraduationStudent(String pen, StudentGradDTO gradStudent, EventT
.build();
requestDTO.getUpdateFields().add(field);
}
+ // SchoolId
+ if (gradStudent.getNewSchoolOfRecordId() != null) {
+ OngoingUpdateFieldDTO field = OngoingUpdateFieldDTO.builder()
+ .type(FieldType.GUID).name(FieldName.SCHOOL_OF_RECORD_ID).value(gradStudent.getNewSchoolOfRecordId())
+ .build();
+ requestDTO.getUpdateFields().add(field);
+ }
// GRAD Program
if (StringUtils.isNotBlank(gradStudent.getNewProgram())) {
OngoingUpdateFieldDTO field = OngoingUpdateFieldDTO.builder()
diff --git a/api/src/main/java/ca/bc/gov/educ/api/dataconversion/service/student/StudentGraduationUpdateBaseService.java b/api/src/main/java/ca/bc/gov/educ/api/dataconversion/service/student/StudentGraduationUpdateBaseService.java
index 1486cfd..1b5dc13 100644
--- a/api/src/main/java/ca/bc/gov/educ/api/dataconversion/service/student/StudentGraduationUpdateBaseService.java
+++ b/api/src/main/java/ca/bc/gov/educ/api/dataconversion/service/student/StudentGraduationUpdateBaseService.java
@@ -6,6 +6,7 @@
import org.apache.commons.lang3.time.DateUtils;
import java.util.Date;
+import java.util.UUID;
public abstract class StudentGraduationUpdateBaseService extends StudentBaseService {
@@ -86,6 +87,44 @@ protected boolean processSchoolOfRecord(StudentGradDTO currentStudent, String va
return isChanged;
}
+ protected boolean processSchoolOfRecordId(StudentGradDTO currentStudent, UUID value) {
+ boolean isChanged = false;
+ switch(currentStudent.getStudentStatus()) {
+ case STUDENT_STATUS_CURRENT -> {
+ // UpdData
+ currentStudent.setNewSchoolOfRecordId(value);
+ // Transcript
+ currentStudent.setNewRecalculateGradStatus("Y");
+ // TVR
+ currentStudent.setNewRecalculateProjectedGrad("Y");
+ isChanged = true;
+ }
+ case STUDENT_STATUS_ARCHIVED -> {
+ if (!currentStudent.isGraduated()) {
+ // UpdData
+ currentStudent.setNewSchoolOfRecordId(value);
+ // Transcript
+ currentStudent.setNewRecalculateGradStatus("Y");
+ isChanged = true;
+ }
+ }
+ case STUDENT_STATUS_TERMINATED -> {
+ // UpdData
+ currentStudent.setNewSchoolOfRecordId(value);
+ // Transcript
+ currentStudent.setNewRecalculateGradStatus("Y");
+ isChanged = true;
+ }
+ default -> { // MER or DEC
+ // UpdData
+ currentStudent.setNewSchoolOfRecordId(value);
+ // Do not set flags to Y
+ isChanged = true;
+ }
+ }
+ return isChanged;
+ }
+
protected boolean processStudentGrade(StudentGradDTO currentStudent, String value) {
boolean isChanged = false;
switch(currentStudent.getStudentStatus()) {
diff --git a/api/src/main/java/ca/bc/gov/educ/api/dataconversion/service/student/StudentGraduationUpdateEventService.java b/api/src/main/java/ca/bc/gov/educ/api/dataconversion/service/student/StudentGraduationUpdateEventService.java
index 310c6b2..1785b33 100644
--- a/api/src/main/java/ca/bc/gov/educ/api/dataconversion/service/student/StudentGraduationUpdateEventService.java
+++ b/api/src/main/java/ca/bc/gov/educ/api/dataconversion/service/student/StudentGraduationUpdateEventService.java
@@ -71,11 +71,16 @@ public void processStudent(TraxGraduationUpdateDTO updateGrad, StudentGradDTO cu
log.info(" Process Student : studentID = {}, pen = {}", currentStudent.getStudentID(), updateGrad.getPen());
// Processing order is important for the first 3 fields below.
- // 1. School of record
+ // 1.1 School of Record
if (!StringUtils.equals(updateGrad.getSchoolOfRecord(), currentStudent.getSchoolOfRecord())) {
isChanged = processSchoolOfRecord(currentStudent, updateGrad.getSchoolOfRecord());
log.info(" => school of record : current = {}, request = {}", currentStudent.getSchoolOfRecord(), currentStudent.getNewSchoolOfRecord());
}
+ // 1.2 School of Record Guid
+ if (updateGrad.getSchoolOfRecordId() != null && updateGrad.getSchoolOfRecordId() != currentStudent.getSchoolOfRecordId()) {
+ isChanged = processSchoolOfRecordId(currentStudent, updateGrad.getSchoolOfRecordId());
+ log.info(" => school of record id : current = {}, request = {}", currentStudent.getSchoolOfRecordId(), currentStudent.getNewSchoolOfRecordId());
+ }
// 2. Grad Program
String gradProgram = getGradProgram(updateGrad.getGraduationRequirementYear(), currentStudent.getUpToDateSchoolOfRecord(), null);
if (!StringUtils.equals(gradProgram, currentStudent.getProgram())) {
diff --git a/api/src/test/java/ca/bc/gov/educ/api/dataconversion/process/StudentProcessTest.java b/api/src/test/java/ca/bc/gov/educ/api/dataconversion/process/StudentProcessTest.java
index fce7d4e..0f188e5 100644
--- a/api/src/test/java/ca/bc/gov/educ/api/dataconversion/process/StudentProcessTest.java
+++ b/api/src/test/java/ca/bc/gov/educ/api/dataconversion/process/StudentProcessTest.java
@@ -74,6 +74,7 @@ public void tearDown() {
public void convertStudent_forPenStudentValidation_whenGivenPen_doesNotExist_thenReturnFailure() throws Exception {
String pen = "111222333";
String mincode = "222333";
+ UUID schoolOfRecordId = UUID.randomUUID();
School school = new School();
school.setMinCode(mincode);
@@ -82,8 +83,8 @@ public void convertStudent_forPenStudentValidation_whenGivenPen_doesNotExist_the
when(this.restUtils.getStudentsByPen(pen, "123")).thenReturn(new ArrayList<>());
ConvGradStudent student = ConvGradStudent.builder().pen(pen).program("SCCP")
- .archiveFlag("A").studentStatus("A").schoolOfRecord(mincode).graduationRequirementYear("SCCP")
- .programCodes(new ArrayList<>()).build();
+ .archiveFlag("A").studentStatus("A").schoolOfRecord(mincode).schoolOfRecordId(schoolOfRecordId)
+ .graduationRequirementYear("SCCP").programCodes(new ArrayList<>()).build();
ConversionStudentSummaryDTO summary = new ConversionStudentSummaryDTO();
summary.setAccessToken("123");
var result = studentProcess.convertStudent(student, summary, false, false);
@@ -99,6 +100,7 @@ public void convertStudent_forPenStudentValidation_whenGivenPen_doesNotExist_the
public void convertStudent_forPenStudentValidation_whenPENAPI_isDown_thenReturnFailure() throws Exception {
String pen = "111222333";
String mincode = "222333";
+ UUID schoolOfRecordId = UUID.randomUUID();
School school = new School();
school.setMinCode(mincode);
@@ -107,7 +109,8 @@ public void convertStudent_forPenStudentValidation_whenPENAPI_isDown_thenReturnF
when(this.restUtils.getStudentsByPen(pen, "123")).thenThrow(new RuntimeException("Test"));
ConvGradStudent student = ConvGradStudent.builder().pen(pen).program("SCCP")
- .studentStatus("A").schoolOfRecord(mincode).graduationRequirementYear("SCCP")
+ .studentStatus("A").schoolOfRecord(mincode).schoolOfRecordId(schoolOfRecordId)
+ .graduationRequirementYear("SCCP")
.programCodes(new ArrayList<>()).build();
ConversionStudentSummaryDTO summary = new ConversionStudentSummaryDTO();
summary.setAccessToken("123");
@@ -126,6 +129,7 @@ public void convertStudent_forExistingGradStudent_whenGivenData_withSccpProgram_
UUID studentID = UUID.randomUUID();
String pen = "111222333";
String mincode = "222333";
+ UUID schoolOfRecordId = UUID.randomUUID();
School school = new School();
school.setMinCode(mincode);
@@ -148,8 +152,8 @@ public void convertStudent_forExistingGradStudent_whenGivenData_withSccpProgram_
when(this.restUtils.getStudentsByPen(pen, "123")).thenReturn(Arrays.asList(penStudent));
ConvGradStudent student = ConvGradStudent.builder().pen("111222333").program("SCCP")
- .archiveFlag("A").studentStatus("A").schoolOfRecord(mincode).graduationRequirementYear("SCCP")
- .programCodes(new ArrayList<>()).build();
+ .archiveFlag("A").studentStatus("A").schoolOfRecord(mincode).schoolOfRecordId(schoolOfRecordId)
+ .graduationRequirementYear("SCCP").programCodes(new ArrayList<>()).build();
ConversionStudentSummaryDTO summary = new ConversionStudentSummaryDTO();
summary.setAccessToken("123");
var result = studentProcess.convertStudent(student, summary, false, false);
@@ -165,6 +169,7 @@ public void convertStudent_forExistingGradStudent_whenGivenData_withAdultProgram
UUID studentID = UUID.randomUUID();
String pen = "111222333";
String mincode = "222333";
+ UUID schoolOfRecordId = UUID.randomUUID();
School school = new School();
school.setMinCode(mincode);
@@ -188,7 +193,8 @@ public void convertStudent_forExistingGradStudent_whenGivenData_withAdultProgram
ConvGradStudent student = ConvGradStudent.builder().pen("111222333").program("1950")
.studentGrade("AD").archiveFlag("A").studentStatus("A")
- .schoolOfRecord(mincode).graduationRequirementYear("1950")
+ .schoolOfRecord(mincode).schoolOfRecordId(schoolOfRecordId)
+ .graduationRequirementYear("1950")
.programCodes(new ArrayList<>()).build();
ConversionStudentSummaryDTO summary = new ConversionStudentSummaryDTO();
summary.setAccessToken("123");
@@ -205,6 +211,7 @@ public void convertStudent_forExistingGradStudent_whenGivenData_withFrenchImmers
UUID studentID = UUID.randomUUID();
String pen = "111222333";
String mincode = "222333";
+ UUID schoolOfRecordId = UUID.randomUUID();
School school = new School();
school.setMinCode(mincode);
@@ -255,7 +262,8 @@ public void convertStudent_forExistingGradStudent_whenGivenData_withFrenchImmers
when(this.restUtils.getOptionalProgram("2018-EN", "FI", "123")).thenReturn(specialProgram);
ConvGradStudent student = ConvGradStudent.builder().pen("111222333").program("2018-EN")
- .archiveFlag("A").studentStatus("A").schoolOfRecord(mincode).graduationRequirementYear("2018")
+ .archiveFlag("A").studentStatus("A").schoolOfRecord(mincode).schoolOfRecordId(schoolOfRecordId)
+ .graduationRequirementYear("2018")
.programCodes(Arrays.asList("XC")).build();
ConversionStudentSummaryDTO summary = new ConversionStudentSummaryDTO();
summary.setAccessToken("123");
@@ -274,6 +282,7 @@ public void convertStudent_whenGivenData_withFrenchImmersionSpecialProgram_thenR
UUID studentID = UUID.randomUUID();
String pen = "111222333";
String mincode = "222333";
+ UUID schoolOfRecordId = UUID.randomUUID();
School school = new School();
school.setMinCode(mincode);
@@ -330,7 +339,8 @@ public void convertStudent_whenGivenData_withFrenchImmersionSpecialProgram_thenR
when(this.restUtils.getOptionalProgram("2018-EN", "FI", "123")).thenReturn(specialProgram);
ConvGradStudent student = ConvGradStudent.builder().pen("111222333").program("2018-EN")
- .archiveFlag("A").studentStatus("A").schoolOfRecord(mincode).graduationRequirementYear("2018")
+ .archiveFlag("A").studentStatus("A").schoolOfRecord(mincode).schoolOfRecordId(schoolOfRecordId)
+ .graduationRequirementYear("2018")
.programCodes(Arrays.asList("XC")).build();
ConversionStudentSummaryDTO summary = new ConversionStudentSummaryDTO();
summary.setAccessToken("123");
@@ -349,6 +359,7 @@ public void convertStudent_whenGivenData_forMergedStatus_withFrenchImmersionSpec
UUID studentID = UUID.randomUUID();
String pen = "111222333";
String mincode = "222333";
+ UUID schoolOfRecordId = UUID.randomUUID();
School school = new School();
school.setMinCode(mincode);
@@ -405,7 +416,8 @@ public void convertStudent_whenGivenData_forMergedStatus_withFrenchImmersionSpec
when(this.restUtils.getOptionalProgram("1986-EN", "FI", "123")).thenReturn(specialProgram);
ConvGradStudent student = ConvGradStudent.builder().pen("111222333").program("1986-EN")
- .studentStatus("M").schoolOfRecord(mincode).graduationRequirementYear("1986")
+ .studentStatus("M").schoolOfRecord(mincode).schoolOfRecordId(schoolOfRecordId)
+ .graduationRequirementYear("1986")
.programCodes(Arrays.asList("XC")).build();
ConversionStudentSummaryDTO summary = new ConversionStudentSummaryDTO();
summary.setAccessToken("123");
@@ -424,6 +436,7 @@ public void convertStudent_whenGiven1996Data_withFrenchImmersionSpecialProgram_t
UUID studentID = UUID.randomUUID();
String pen = "111222333";
String mincode = "222333";
+ UUID schoolOfRecordId = UUID.randomUUID();
School school = new School();
school.setMinCode(mincode);
@@ -480,7 +493,8 @@ public void convertStudent_whenGiven1996Data_withFrenchImmersionSpecialProgram_t
when(this.restUtils.getOptionalProgram("1996-EN", "FI", "123")).thenReturn(specialProgram);
ConvGradStudent student = ConvGradStudent.builder().pen("111222333").program("1996-EN")
- .archiveFlag("A").studentStatus("A").schoolOfRecord(mincode).graduationRequirementYear("1996")
+ .archiveFlag("A").studentStatus("A").schoolOfRecord(mincode).schoolOfRecordId(schoolOfRecordId)
+ .graduationRequirementYear("1996")
.programCodes(Arrays.asList("XC")).build();
ConversionStudentSummaryDTO summary = new ConversionStudentSummaryDTO();
summary.setAccessToken("123");
@@ -499,6 +513,7 @@ public void convertStudent_whenGiven1986Data_withFrenchImmersionSpecialProgram_t
UUID studentID = UUID.randomUUID();
String pen = "111222333";
String mincode = "222333";
+ UUID schoolOfRecordId = UUID.randomUUID();
School school = new School();
school.setMinCode(mincode);
@@ -556,7 +571,8 @@ public void convertStudent_whenGiven1986Data_withFrenchImmersionSpecialProgram_t
when(this.restUtils.addNewPen(penStudent, "123")).thenReturn(penStudent);
ConvGradStudent student = ConvGradStudent.builder().pen("111222333").program("1986-EN")
- .archiveFlag("A").studentStatus("A").schoolOfRecord(mincode).graduationRequirementYear("1986")
+ .archiveFlag("A").studentStatus("A").schoolOfRecord(mincode).schoolOfRecordId(schoolOfRecordId)
+ .graduationRequirementYear("1986")
.programCodes(Arrays.asList("XC")).build();
ConversionStudentSummaryDTO summary = new ConversionStudentSummaryDTO();
summary.setAccessToken("123");
@@ -575,6 +591,7 @@ public void convertArchivedStudent_whenGiven1986Data_withFrenchImmersionSpecialP
UUID studentID = UUID.randomUUID();
String pen = "111222333";
String mincode = "222333";
+ UUID schoolOfRecordId = UUID.randomUUID();
School school = new School();
school.setMinCode(mincode);
@@ -632,7 +649,8 @@ public void convertArchivedStudent_whenGiven1986Data_withFrenchImmersionSpecialP
when(this.restUtils.addNewPen(penStudent, "123")).thenReturn(penStudent);
ConvGradStudent student = ConvGradStudent.builder().pen("111222333").program("1986-EN")
- .archiveFlag("I").studentStatus("A").schoolOfRecord(mincode).graduationRequirementYear("1986")
+ .archiveFlag("I").studentStatus("A").schoolOfRecord(mincode).schoolOfRecordId(schoolOfRecordId)
+ .graduationRequirementYear("1986")
.programCodes(Arrays.asList("XC")).build();
ConversionStudentSummaryDTO summary = new ConversionStudentSummaryDTO();
summary.setAccessToken("123");
@@ -813,6 +831,7 @@ public void testSaveGraduationStudent_whenPFisChangedToEN_then_returnAPICallSucc
graduationStudentRecord.setStudentGrade("11");
graduationStudentRecord.setStudentStatus("CUR");
graduationStudentRecord.setSchoolOfRecord("222336");
+ graduationStudentRecord.setSchoolOfRecordId(UUID.randomUUID());
StudentOptionalProgram studentOptionalProgram1 = new StudentOptionalProgram();
studentOptionalProgram1.setId(UUID.randomUUID());
@@ -835,6 +854,7 @@ public void testSaveGraduationStudent_whenPFisChangedToEN_then_returnAPICallSucc
requestStudent.setNewProgram("2018-EN");
requestStudent.setNewStudentGrade("12");
requestStudent.setNewSchoolOfRecord("333456");
+ requestStudent.setNewSchoolOfRecordId(UUID.randomUUID());
requestStudent.setNewStudentStatus("ARC");
requestStudent.setNewRecalculateGradStatus("Y");
requestStudent.setNewRecalculateProjectedGrad("Y");
@@ -861,6 +881,7 @@ public void testSaveGraduationStudent_whenENisChangedTo1950Adult_then_returnAPIC
graduationStudentRecord.setStudentGrade("11");
graduationStudentRecord.setStudentStatus("CUR");
graduationStudentRecord.setSchoolOfRecord("222336");
+ graduationStudentRecord.setSchoolOfRecordId(UUID.randomUUID());
when(this.restUtils.getStudentGradStatus(studentID.toString(), "123")).thenReturn(graduationStudentRecord);
@@ -870,6 +891,7 @@ public void testSaveGraduationStudent_whenENisChangedTo1950Adult_then_returnAPIC
requestStudent.setNewProgram("1950");
requestStudent.setNewStudentGrade("AD");
requestStudent.setNewSchoolOfRecord("333456");
+ requestStudent.setNewSchoolOfRecordId(UUID.randomUUID());
requestStudent.setNewStudentStatus("ARC");
requestStudent.setNewRecalculateGradStatus("Y");
requestStudent.setNewRecalculateProjectedGrad("Y");
@@ -898,6 +920,7 @@ public void testSaveGraduationStudent_whenStudentStatus_isChanged_then_returnAPI
graduationStudentRecord.setStudentGrade("11");
graduationStudentRecord.setStudentStatus("CUR");
graduationStudentRecord.setSchoolOfRecord("222336");
+ graduationStudentRecord.setSchoolOfRecordId(UUID.randomUUID());
when(this.restUtils.getStudentGradStatus(studentID.toString(), "123")).thenReturn(graduationStudentRecord);
@@ -907,6 +930,7 @@ public void testSaveGraduationStudent_whenStudentStatus_isChanged_then_returnAPI
requestStudent.setNewProgram("1950");
requestStudent.setNewStudentGrade("AD");
requestStudent.setNewSchoolOfRecord("333456");
+ requestStudent.setNewSchoolOfRecordId(UUID.randomUUID());
requestStudent.setNewStudentStatus("ARC");
requestStudent.setNewRecalculateGradStatus("Y");
requestStudent.setNewRecalculateProjectedGrad("Y");
@@ -996,6 +1020,7 @@ public void testLoadStudentData_whenGradStudentAPIisDownForStudentOptionalProgra
UUID studentID = UUID.randomUUID();
String pen = "111222333";
String mincode = "222333";
+ UUID schoolOfRecordId = UUID.randomUUID();
Student penStudent = new Student();
penStudent.setStudentID(studentID.toString());
@@ -1010,6 +1035,7 @@ public void testLoadStudentData_whenGradStudentAPIisDownForStudentOptionalProgra
gradStudent.setHonoursStanding("Y");
gradStudent.setSchoolAtGrad(mincode);
gradStudent.setSchoolOfRecord(mincode);
+ gradStudent.setSchoolOfRecordId(schoolOfRecordId);
gradStudent.setProgramCompletionDate(EducGradDataConversionApiUtils.formatDate(new Date(System.currentTimeMillis() - 600000L)));
when(this.restUtils.getStudentsByPen(pen, "123")).thenReturn(Arrays.asList(penStudent));
@@ -1026,6 +1052,7 @@ public void testLoadStudentData_whenGradStudentAPIisDownForStudentCareerPrograms
UUID studentID = UUID.randomUUID();
String pen = "111222333";
String mincode = "222333";
+ UUID schoolOfRecordId = UUID.randomUUID();
Student penStudent = new Student();
penStudent.setStudentID(studentID.toString());
@@ -1040,6 +1067,7 @@ public void testLoadStudentData_whenGradStudentAPIisDownForStudentCareerPrograms
gradStudent.setHonoursStanding("Y");
gradStudent.setSchoolAtGrad(mincode);
gradStudent.setSchoolOfRecord(mincode);
+ gradStudent.setSchoolOfRecordId(schoolOfRecordId);
gradStudent.setProgramCompletionDate(EducGradDataConversionApiUtils.formatDate(new Date(System.currentTimeMillis() - 600000L)));
OptionalProgram optionalProgram1 = new OptionalProgram();
@@ -1085,6 +1113,7 @@ public void testLoadStudentData_withGivenData_returnsStudentGradDTO_withAPICallS
UUID studentID = UUID.randomUUID();
String pen = "111222333";
String mincode = "222333";
+ UUID schoolOfRecordId = UUID.randomUUID();
Student penStudent = new Student();
penStudent.setStudentID(studentID.toString());
@@ -1099,6 +1128,7 @@ public void testLoadStudentData_withGivenData_returnsStudentGradDTO_withAPICallS
gradStudent.setHonoursStanding("Y");
gradStudent.setSchoolAtGrad(mincode);
gradStudent.setSchoolOfRecord(mincode);
+ gradStudent.setSchoolOfRecordId(schoolOfRecordId);
gradStudent.setProgramCompletionDate(EducGradDataConversionApiUtils.formatDate(new Date(System.currentTimeMillis() - 600000L)));
OptionalProgram optionalProgram1 = new OptionalProgram();
@@ -1177,6 +1207,7 @@ public void testTriggerGraduationBatchRun_withMergedStatus_returnsNoBatchRun() {
UUID studentID = UUID.randomUUID();
String pen = "111222333";
String mincode = "222333";
+ UUID schoolOfRecordId = UUID.randomUUID();
Student penStudent = new Student();
penStudent.setStudentID(studentID.toString());
@@ -1191,6 +1222,7 @@ public void testTriggerGraduationBatchRun_withMergedStatus_returnsNoBatchRun() {
gradStudent.setHonoursStanding("Y");
gradStudent.setSchoolAtGrad(mincode);
gradStudent.setSchoolOfRecord(mincode);
+ gradStudent.setSchoolOfRecordId(schoolOfRecordId);
gradStudent.setProgramCompletionDate(EducGradDataConversionApiUtils.formatDate(new Date(System.currentTimeMillis() - 600000L)));
when(this.restUtils.getStudentGradStatus(studentID.toString(), "123")).thenReturn(gradStudent);
@@ -1209,6 +1241,7 @@ public void testTriggerGraduationBatchRun_withCurrentStatus_returnsNoBatchRun()
UUID studentID = UUID.randomUUID();
String pen = "111222333";
String mincode = "222333";
+ UUID schoolOfRecordId = UUID.randomUUID();
Student penStudent = new Student();
penStudent.setStudentID(studentID.toString());
@@ -1223,6 +1256,7 @@ public void testTriggerGraduationBatchRun_withCurrentStatus_returnsNoBatchRun()
gradStudent.setHonoursStanding("Y");
gradStudent.setSchoolAtGrad(mincode);
gradStudent.setSchoolOfRecord(mincode);
+ gradStudent.setSchoolOfRecordId(schoolOfRecordId);
gradStudent.setProgramCompletionDate(EducGradDataConversionApiUtils.formatDate(new Date(System.currentTimeMillis() - 600000L)));
when(this.restUtils.getStudentGradStatus(studentID.toString(), "123")).thenReturn(gradStudent);
diff --git a/api/src/test/java/ca/bc/gov/educ/api/dataconversion/service/StudentGraduationUpdateEventServiceTest.java b/api/src/test/java/ca/bc/gov/educ/api/dataconversion/service/StudentGraduationUpdateEventServiceTest.java
index 57af61a..bb70697 100644
--- a/api/src/test/java/ca/bc/gov/educ/api/dataconversion/service/StudentGraduationUpdateEventServiceTest.java
+++ b/api/src/test/java/ca/bc/gov/educ/api/dataconversion/service/StudentGraduationUpdateEventServiceTest.java
@@ -66,6 +66,7 @@ public void testProcessStudentForGrad2018ENProgram_givenUpdated_STUDENT_returnsA
// Program & School
String program = "2018-EN";
String mincode = "222333";
+ UUID schoolOfRecordId = UUID.randomUUID();
String updateType = "UPD_GRAD";
@@ -75,6 +76,7 @@ public void testProcessStudentForGrad2018ENProgram_givenUpdated_STUDENT_returnsA
traxGraduationUpdate.setGraduationRequirementYear("2018");
traxGraduationUpdate.setStudentGrade("12");
traxGraduationUpdate.setSchoolOfRecord(mincode);
+ traxGraduationUpdate.setSchoolOfRecordId(schoolOfRecordId);
traxGraduationUpdate.setStudentStatus("A");
traxGraduationUpdate.setArchiveFlag("A");
@@ -93,6 +95,7 @@ public void testProcessStudentForGrad2018ENProgram_givenUpdated_STUDENT_returnsA
currentStudent.setStudentGrade("12");
currentStudent.setStudentStatus("CUR");
currentStudent.setSchoolOfRecord(mincode);
+ currentStudent.setSchoolOfRecordId(schoolOfRecordId);
currentStudent.setSchoolAtGrad(mincode);
// Optional Program Codes
currentStudent.getProgramCodes().add("XC");
@@ -131,8 +134,10 @@ public void testProcessStudentForGrad2018ENProgram_givenUpdated_STUDENT_whenGrad
// Program & School
String program = "2018-EN";
String mincode = "222333";
+ UUID schoolOfRecordId = UUID.randomUUID();
String newMincode = "333444";
+ UUID newSchoolOfRecordId = UUID.randomUUID();
String updateType = "UPD_GRAD";
@@ -143,6 +148,7 @@ public void testProcessStudentForGrad2018ENProgram_givenUpdated_STUDENT_whenGrad
traxGraduationUpdate.setCitizenship("C");
traxGraduationUpdate.setStudentGrade("11");
traxGraduationUpdate.setSchoolOfRecord(newMincode);
+ traxGraduationUpdate.setSchoolOfRecordId(newSchoolOfRecordId);
traxGraduationUpdate.setStudentStatus("A");
traxGraduationUpdate.setArchiveFlag("A");
@@ -162,6 +168,7 @@ public void testProcessStudentForGrad2018ENProgram_givenUpdated_STUDENT_whenGrad
currentStudent.setStudentStatus("CUR");
currentStudent.setCitizenship("C");
currentStudent.setSchoolOfRecord(mincode);
+ currentStudent.setSchoolOfRecordId(schoolOfRecordId);
currentStudent.setSchoolAtGrad(mincode);
// Optional Program Codes
currentStudent.getProgramCodes().add("XC");
@@ -195,8 +202,10 @@ public void testProcessArchivedStudentForGrad2018ENProgram_givenUpdated_Archived
// Program & School
String program = "2018-EN";
String mincode = "222333";
+ UUID schoolOfRecordId = UUID.randomUUID();
String newMincode = "333444";
+ UUID newSchoolOfRecordId = UUID.randomUUID();
String updateType = "UPD_GRAD";
@@ -207,6 +216,7 @@ public void testProcessArchivedStudentForGrad2018ENProgram_givenUpdated_Archived
traxGraduationUpdate.setCitizenship("C");
traxGraduationUpdate.setStudentGrade("11");
traxGraduationUpdate.setSchoolOfRecord(newMincode);
+ traxGraduationUpdate.setSchoolOfRecordId(newSchoolOfRecordId);
traxGraduationUpdate.setStudentStatus("A");
traxGraduationUpdate.setArchiveFlag("I");
@@ -226,6 +236,7 @@ public void testProcessArchivedStudentForGrad2018ENProgram_givenUpdated_Archived
currentStudent.setStudentStatus("ARC");
currentStudent.setCitizenship("C");
currentStudent.setSchoolOfRecord(mincode);
+ currentStudent.setSchoolOfRecordId(schoolOfRecordId);
currentStudent.setSchoolAtGrad(mincode);
// Optional Program Codes
currentStudent.getProgramCodes().add("XC");
@@ -259,8 +270,10 @@ public void testProcessCurrentGraduatedStudentForGrad2018ENProgram_givenUpdated_
// Program & School
String program = "2018-EN";
String mincode = "222333";
+ UUID schoolOfRecordId = UUID.randomUUID();
String newMincode = "333444";
+ UUID newSchoolOfRecordId = UUID.randomUUID();
String updateType = "UPD_GRAD";
@@ -271,6 +284,7 @@ public void testProcessCurrentGraduatedStudentForGrad2018ENProgram_givenUpdated_
traxGraduationUpdate.setCitizenship("C");
traxGraduationUpdate.setStudentGrade("11");
traxGraduationUpdate.setSchoolOfRecord(newMincode);
+ traxGraduationUpdate.setSchoolOfRecordId(newSchoolOfRecordId);
traxGraduationUpdate.setStudentStatus("A");
traxGraduationUpdate.setArchiveFlag("I");
@@ -290,6 +304,7 @@ public void testProcessCurrentGraduatedStudentForGrad2018ENProgram_givenUpdated_
currentStudent.setStudentStatus("CUR");
currentStudent.setCitizenship("C");
currentStudent.setSchoolOfRecord(mincode);
+ currentStudent.setSchoolOfRecordId(schoolOfRecordId);
currentStudent.setSchoolAtGrad(mincode);
currentStudent.setGradDate("2022/02");
// Optional Program Codes
@@ -324,8 +339,10 @@ public void testProcessTerminatedGraduatedStudentForGrad2018ENProgram_givenUpdat
// Program & School
String program = "2018-EN";
String mincode = "222333";
+ UUID schoolOfRecordId = UUID.randomUUID();
String newMincode = "333444";
+ UUID newSchoolOfRecordId = UUID.randomUUID();
String updateType = "UPD_GRAD";
@@ -336,6 +353,7 @@ public void testProcessTerminatedGraduatedStudentForGrad2018ENProgram_givenUpdat
traxGraduationUpdate.setCitizenship("C");
traxGraduationUpdate.setStudentGrade("11");
traxGraduationUpdate.setSchoolOfRecord(newMincode);
+ traxGraduationUpdate.setSchoolOfRecordId(newSchoolOfRecordId);
traxGraduationUpdate.setStudentStatus("T");
traxGraduationUpdate.setArchiveFlag("A");
@@ -355,6 +373,7 @@ public void testProcessTerminatedGraduatedStudentForGrad2018ENProgram_givenUpdat
currentStudent.setStudentStatus("TER");
currentStudent.setCitizenship("C");
currentStudent.setSchoolOfRecord(mincode);
+ currentStudent.setSchoolOfRecordId(schoolOfRecordId);
currentStudent.setSchoolAtGrad(mincode);
currentStudent.setGradDate("2022/02");
// Optional Program Codes
@@ -389,8 +408,10 @@ public void testProcessDeceasedGraduatedStudentForGrad2018ENProgram_givenUpdated
// Program & School
String program = "2018-EN";
String mincode = "222333";
+ UUID schoolOfRecordId = UUID.randomUUID();
String newMincode = "333444";
+ UUID newSchoolOfRecordId = UUID.randomUUID();
String updateType = "UPD_GRAD";
@@ -401,6 +422,7 @@ public void testProcessDeceasedGraduatedStudentForGrad2018ENProgram_givenUpdated
traxGraduationUpdate.setCitizenship("C");
traxGraduationUpdate.setStudentGrade("11");
traxGraduationUpdate.setSchoolOfRecord(newMincode);
+ traxGraduationUpdate.setSchoolOfRecordId(newSchoolOfRecordId);
traxGraduationUpdate.setStudentStatus("D");
traxGraduationUpdate.setArchiveFlag("I");
@@ -420,6 +442,7 @@ public void testProcessDeceasedGraduatedStudentForGrad2018ENProgram_givenUpdated
currentStudent.setStudentStatus("DEC");
currentStudent.setCitizenship("C");
currentStudent.setSchoolOfRecord(mincode);
+ currentStudent.setSchoolOfRecordId(schoolOfRecordId);
currentStudent.setSchoolAtGrad(mincode);
currentStudent.setGradDate("2022/02");
// Optional Program Codes
@@ -455,8 +478,10 @@ public void testProcessCurrentStudentForGrad2018ENProgram_givenUpdated_Archived_
// Program & School
String program = "2018-EN";
String mincode = "222333";
+ UUID schoolOfRecordId = UUID.randomUUID();
String newMincode = "333444";
+ UUID newSchoolOfRecordId = UUID.randomUUID();
String updateType = "UPD_GRAD";
@@ -467,6 +492,7 @@ public void testProcessCurrentStudentForGrad2018ENProgram_givenUpdated_Archived_
traxGraduationUpdate.setCitizenship("C");
traxGraduationUpdate.setStudentGrade("11");
traxGraduationUpdate.setSchoolOfRecord(newMincode);
+ traxGraduationUpdate.setSchoolOfRecordId(newSchoolOfRecordId);
traxGraduationUpdate.setStudentStatus("A");
traxGraduationUpdate.setArchiveFlag("I");
@@ -486,6 +512,7 @@ public void testProcessCurrentStudentForGrad2018ENProgram_givenUpdated_Archived_
currentStudent.setStudentStatus("CUR");
currentStudent.setCitizenship("C");
currentStudent.setSchoolOfRecord(mincode);
+ currentStudent.setSchoolOfRecordId(schoolOfRecordId);
currentStudent.setSchoolAtGrad(mincode);
// Optional Program Codes
currentStudent.getProgramCodes().add("XC");
@@ -519,8 +546,10 @@ public void testProcessArchivedStudentForGrad2018ENProgram_givenUpdated_Current_
// Program & School
String program = "2018-EN";
String mincode = "222333";
+ UUID schoolOfRecordId = UUID.randomUUID();
String newMincode = "333444";
+ UUID newSchoolOfRecordId = UUID.randomUUID();
String updateType = "UPD_GRAD";
@@ -531,6 +560,7 @@ public void testProcessArchivedStudentForGrad2018ENProgram_givenUpdated_Current_
traxGraduationUpdate.setCitizenship("C");
traxGraduationUpdate.setStudentGrade("11");
traxGraduationUpdate.setSchoolOfRecord(newMincode);
+ traxGraduationUpdate.setSchoolOfRecordId(newSchoolOfRecordId);
traxGraduationUpdate.setStudentStatus("A");
traxGraduationUpdate.setArchiveFlag("A");
@@ -550,6 +580,7 @@ public void testProcessArchivedStudentForGrad2018ENProgram_givenUpdated_Current_
currentStudent.setStudentStatus("ARC");
currentStudent.setCitizenship("C");
currentStudent.setSchoolOfRecord(mincode);
+ currentStudent.setSchoolOfRecordId(schoolOfRecordId);
currentStudent.setSchoolAtGrad(mincode);
// Optional Program Codes
currentStudent.getProgramCodes().add("XC");
@@ -583,8 +614,10 @@ public void testProcessArchivedStudentForGrad2018ENProgram_givenUpdated_whenGrad
// Program & School
String program = "2018-EN";
String mincode = "222333";
+ UUID schoolOfRecordId = UUID.randomUUID();
String newMincode = "333444";
+ UUID newSchoolOfRecordId = UUID.randomUUID();
String updateType = "UPD_GRAD";
@@ -595,6 +628,7 @@ public void testProcessArchivedStudentForGrad2018ENProgram_givenUpdated_whenGrad
traxGraduationUpdate.setCitizenship("C");
traxGraduationUpdate.setStudentGrade("11");
traxGraduationUpdate.setSchoolOfRecord(newMincode);
+ traxGraduationUpdate.setSchoolOfRecordId(newSchoolOfRecordId);
traxGraduationUpdate.setStudentStatus("T");
traxGraduationUpdate.setArchiveFlag("A");
@@ -614,6 +648,7 @@ public void testProcessArchivedStudentForGrad2018ENProgram_givenUpdated_whenGrad
currentStudent.setStudentStatus("ARC");
currentStudent.setCitizenship("C");
currentStudent.setSchoolOfRecord(mincode);
+ currentStudent.setSchoolOfRecordId(schoolOfRecordId);
currentStudent.setSchoolAtGrad(mincode);
// Optional Program Codes
currentStudent.getProgramCodes().add("XC");
@@ -647,6 +682,7 @@ public void testProcessStudentForGrad2018ENProgram_givenUpdated_STUDENT_whenCiti
// Program & School
String program = "2018-EN";
String mincode = "222333";
+ UUID schoolOfRecordId = UUID.randomUUID();
String newCitizenship = "C";
@@ -658,6 +694,7 @@ public void testProcessStudentForGrad2018ENProgram_givenUpdated_STUDENT_whenCiti
traxGraduationUpdate.setGraduationRequirementYear("2018");
traxGraduationUpdate.setStudentGrade("12");
traxGraduationUpdate.setSchoolOfRecord(mincode);
+ traxGraduationUpdate.setSchoolOfRecordId(schoolOfRecordId);
traxGraduationUpdate.setCitizenship(newCitizenship);
traxGraduationUpdate.setStudentStatus("A");
traxGraduationUpdate.setArchiveFlag("A");
@@ -678,6 +715,7 @@ public void testProcessStudentForGrad2018ENProgram_givenUpdated_STUDENT_whenCiti
currentStudent.setStudentStatus("CUR");
currentStudent.setCitizenship(null);
currentStudent.setSchoolOfRecord(mincode);
+ currentStudent.setSchoolOfRecordId(schoolOfRecordId);
currentStudent.setSchoolAtGrad(mincode);
currentStudent.setGradDate(null);
// Optional Program Codes
@@ -712,6 +750,7 @@ public void testProcessArchivedStudentForGrad2018ENProgram_givenUpdated_whenCiti
// Program & School
String program = "2018-EN";
String mincode = "222333";
+ UUID schoolOfRecordId = UUID.randomUUID();
String newCitizenship = "C";
@@ -723,6 +762,7 @@ public void testProcessArchivedStudentForGrad2018ENProgram_givenUpdated_whenCiti
traxGraduationUpdate.setGraduationRequirementYear("2018");
traxGraduationUpdate.setStudentGrade("12");
traxGraduationUpdate.setSchoolOfRecord(mincode);
+ traxGraduationUpdate.setSchoolOfRecordId(schoolOfRecordId);
traxGraduationUpdate.setCitizenship(newCitizenship);
traxGraduationUpdate.setStudentStatus("A");
traxGraduationUpdate.setArchiveFlag("I");
@@ -743,6 +783,7 @@ public void testProcessArchivedStudentForGrad2018ENProgram_givenUpdated_whenCiti
currentStudent.setStudentStatus("ARC");
currentStudent.setCitizenship(null);
currentStudent.setSchoolOfRecord(mincode);
+ currentStudent.setSchoolOfRecordId(schoolOfRecordId);
currentStudent.setSchoolAtGrad(mincode);
currentStudent.setGradDate(null);
// Optional Program Codes
@@ -777,6 +818,7 @@ public void testProcessTerminatedStudentForGrad2018ENProgram_givenUpdated_whenCi
// Program & School
String program = "2018-EN";
String mincode = "222333";
+ UUID schoolOfRecordId = UUID.randomUUID();
String newCitizenship = "C";
@@ -788,6 +830,7 @@ public void testProcessTerminatedStudentForGrad2018ENProgram_givenUpdated_whenCi
traxGraduationUpdate.setGraduationRequirementYear("2018");
traxGraduationUpdate.setStudentGrade("12");
traxGraduationUpdate.setSchoolOfRecord(mincode);
+ traxGraduationUpdate.setSchoolOfRecordId(schoolOfRecordId);
traxGraduationUpdate.setCitizenship(newCitizenship);
traxGraduationUpdate.setStudentStatus("T");
traxGraduationUpdate.setArchiveFlag("A");
@@ -808,6 +851,7 @@ public void testProcessTerminatedStudentForGrad2018ENProgram_givenUpdated_whenCi
currentStudent.setStudentStatus("TER");
currentStudent.setCitizenship(null);
currentStudent.setSchoolOfRecord(mincode);
+ currentStudent.setSchoolOfRecordId(schoolOfRecordId);
currentStudent.setSchoolAtGrad(mincode);
currentStudent.setGradDate(null);
// Optional Program Codes
@@ -842,6 +886,7 @@ public void testProcessDeceasedStudentForGrad2018ENProgram_givenUpdated_whenCiti
// Program & School
String program = "2018-EN";
String mincode = "222333";
+ UUID schoolOfRecordId = UUID.randomUUID();
String newCitizenship = "C";
@@ -853,6 +898,7 @@ public void testProcessDeceasedStudentForGrad2018ENProgram_givenUpdated_whenCiti
traxGraduationUpdate.setGraduationRequirementYear("2018");
traxGraduationUpdate.setStudentGrade("12");
traxGraduationUpdate.setSchoolOfRecord(mincode);
+ traxGraduationUpdate.setSchoolOfRecordId(schoolOfRecordId);
traxGraduationUpdate.setCitizenship(newCitizenship);
traxGraduationUpdate.setStudentStatus("D");
traxGraduationUpdate.setArchiveFlag("I");
@@ -873,6 +919,7 @@ public void testProcessDeceasedStudentForGrad2018ENProgram_givenUpdated_whenCiti
currentStudent.setStudentStatus("DEC");
currentStudent.setCitizenship(null);
currentStudent.setSchoolOfRecord(mincode);
+ currentStudent.setSchoolOfRecordId(schoolOfRecordId);
currentStudent.setSchoolAtGrad(mincode);
currentStudent.setGradDate(null);
// Optional Program Codes
@@ -907,8 +954,10 @@ public void testProcessStudentForGrad2018ENProgram_givenUpdated_STUDENT_whenProg
// Program & School
String program = "2018-EN";
String mincode = "222333";
+ UUID schoolOfRecordId = UUID.randomUUID();
String newMincode = "093444";
+ UUID newSchoolOfRecordId = UUID.randomUUID();
String updateType = "UPD_GRAD";
@@ -918,6 +967,7 @@ public void testProcessStudentForGrad2018ENProgram_givenUpdated_STUDENT_whenProg
traxGraduationUpdate.setGraduationRequirementYear("2018");
traxGraduationUpdate.setStudentGrade("12");
traxGraduationUpdate.setSchoolOfRecord(newMincode);
+ traxGraduationUpdate.setSchoolOfRecordId(newSchoolOfRecordId);
traxGraduationUpdate.setStudentStatus("A");
traxGraduationUpdate.setArchiveFlag("A");
@@ -936,6 +986,7 @@ public void testProcessStudentForGrad2018ENProgram_givenUpdated_STUDENT_whenProg
currentStudent.setStudentGrade("12");
currentStudent.setStudentStatus("CUR");
currentStudent.setSchoolOfRecord(mincode);
+ currentStudent.setSchoolOfRecordId(schoolOfRecordId);
currentStudent.setSchoolAtGrad(mincode);
// Optional Program Codes
currentStudent.getProgramCodes().add("XC");
@@ -969,8 +1020,10 @@ public void testProcessArchivedNonGradStudentForGrad2018ENProgram_givenUpdated_w
// Program & School
String program = "2018-EN";
String mincode = "222333";
+ UUID schoolOfRecordId = UUID.randomUUID();
String newMincode = "093444";
+ UUID newSchoolOfRecordId = UUID.randomUUID();
String updateType = "UPD_GRAD";
@@ -980,6 +1033,7 @@ public void testProcessArchivedNonGradStudentForGrad2018ENProgram_givenUpdated_w
traxGraduationUpdate.setGraduationRequirementYear("2018");
traxGraduationUpdate.setStudentGrade("12");
traxGraduationUpdate.setSchoolOfRecord(newMincode);
+ traxGraduationUpdate.setSchoolOfRecordId(newSchoolOfRecordId);
traxGraduationUpdate.setStudentStatus("A");
traxGraduationUpdate.setArchiveFlag("I");
@@ -998,6 +1052,7 @@ public void testProcessArchivedNonGradStudentForGrad2018ENProgram_givenUpdated_w
currentStudent.setStudentGrade("12");
currentStudent.setStudentStatus("ARC");
currentStudent.setSchoolOfRecord(mincode);
+ currentStudent.setSchoolOfRecordId(schoolOfRecordId);
currentStudent.setSchoolAtGrad(mincode);
// Optional Program Codes
currentStudent.getProgramCodes().add("XC");
@@ -1031,8 +1086,10 @@ public void testProcessDeceasedNonGradStudentForGrad2018ENProgram_givenUpdated_w
// Program & School
String program = "2018-EN";
String mincode = "222333";
+ UUID schoolOfRecordId = UUID.randomUUID();
String newMincode = "093444";
+ UUID newSchoolOfRecordId = UUID.randomUUID();
String updateType = "UPD_GRAD";
@@ -1042,6 +1099,7 @@ public void testProcessDeceasedNonGradStudentForGrad2018ENProgram_givenUpdated_w
traxGraduationUpdate.setGraduationRequirementYear("2018");
traxGraduationUpdate.setStudentGrade("12");
traxGraduationUpdate.setSchoolOfRecord(newMincode);
+ traxGraduationUpdate.setSchoolOfRecordId(newSchoolOfRecordId);
traxGraduationUpdate.setStudentStatus("D");
traxGraduationUpdate.setArchiveFlag("I");
@@ -1060,6 +1118,7 @@ public void testProcessDeceasedNonGradStudentForGrad2018ENProgram_givenUpdated_w
currentStudent.setStudentGrade("12");
currentStudent.setStudentStatus("DEC");
currentStudent.setSchoolOfRecord(mincode);
+ currentStudent.setSchoolOfRecordId(schoolOfRecordId);
currentStudent.setSchoolAtGrad(mincode);
// Optional Program Codes
currentStudent.getProgramCodes().add("XC");
@@ -1093,8 +1152,10 @@ public void testProcessStudentForGrad2018PFProgram_givenUpdated_STUDENT_whenProg
// Program & School
String program = "2018-PF";
String mincode = "093333";
+ UUID schoolOfRecordId = UUID.randomUUID();
String newMincode = "333444";
+ UUID newSchoolOfRecordId = UUID.randomUUID();
String updateType = "UPD_GRAD";
@@ -1104,6 +1165,7 @@ public void testProcessStudentForGrad2018PFProgram_givenUpdated_STUDENT_whenProg
traxGraduationUpdate.setGraduationRequirementYear("2018");
traxGraduationUpdate.setStudentGrade("12");
traxGraduationUpdate.setSchoolOfRecord(newMincode);
+ traxGraduationUpdate.setSchoolOfRecordId(newSchoolOfRecordId);
traxGraduationUpdate.setStudentStatus("A");
traxGraduationUpdate.setArchiveFlag("A");
@@ -1122,6 +1184,7 @@ public void testProcessStudentForGrad2018PFProgram_givenUpdated_STUDENT_whenProg
currentStudent.setStudentGrade("12");
currentStudent.setStudentStatus("CUR");
currentStudent.setSchoolOfRecord(mincode);
+ currentStudent.setSchoolOfRecordId(schoolOfRecordId);
currentStudent.setSchoolAtGrad(mincode);
// Optional Program Codes
currentStudent.getProgramCodes().add("XC");
@@ -1155,8 +1218,10 @@ public void testProcessStudentFor1950AdultProgram_givenUpdated_STUDENT_whenProgr
// Program & School
String program = "1950";
String mincode = "111222";
+ UUID schoolOfRecordId = UUID.randomUUID();
String newMincode = "333444";
+ UUID newSchoolOfRecordId = UUID.randomUUID();
String updateType = "UPD_GRAD";
@@ -1166,6 +1231,7 @@ public void testProcessStudentFor1950AdultProgram_givenUpdated_STUDENT_whenProgr
traxGraduationUpdate.setGraduationRequirementYear("2018");
traxGraduationUpdate.setStudentGrade("12");
traxGraduationUpdate.setSchoolOfRecord(newMincode);
+ traxGraduationUpdate.setSchoolOfRecordId(newSchoolOfRecordId);
traxGraduationUpdate.setStudentStatus("A");
traxGraduationUpdate.setArchiveFlag("A");
@@ -1184,6 +1250,7 @@ public void testProcessStudentFor1950AdultProgram_givenUpdated_STUDENT_whenProgr
currentStudent.setStudentGrade("12");
currentStudent.setStudentStatus("CUR");
currentStudent.setSchoolOfRecord(mincode);
+ currentStudent.setSchoolOfRecordId(schoolOfRecordId);
currentStudent.setSchoolAtGrad(mincode);
// Optional Program Codes
currentStudent.getProgramCodes().add("XC");
@@ -1218,8 +1285,10 @@ public void testProcessStudentFor2018EN_givenUpdated_STUDENT_whenProgramIsChange
// Program & School
String program = "2018-EN";
String mincode = "222333";
+ UUID schoolOfRecordId = UUID.randomUUID();
String newMincode = "333444";
+ UUID newSchoolOfRecordId = UUID.randomUUID();
String updateType = "UPD_GRAD";
@@ -1229,6 +1298,7 @@ public void testProcessStudentFor2018EN_givenUpdated_STUDENT_whenProgramIsChange
traxGraduationUpdate.setGraduationRequirementYear("1950");
traxGraduationUpdate.setStudentGrade("AD");
traxGraduationUpdate.setSchoolOfRecord(newMincode);
+ traxGraduationUpdate.setSchoolOfRecordId(newSchoolOfRecordId);
traxGraduationUpdate.setStudentStatus("A");
traxGraduationUpdate.setArchiveFlag("A");
@@ -1248,6 +1318,7 @@ public void testProcessStudentFor2018EN_givenUpdated_STUDENT_whenProgramIsChange
currentStudent.setStudentGrade("12");
currentStudent.setStudentStatus("CUR");
currentStudent.setSchoolOfRecord(mincode);
+ currentStudent.setSchoolOfRecordId(schoolOfRecordId);
currentStudent.setSchoolAtGrad(mincode);
// Optional Program Codes
currentStudent.getProgramCodes().add("XC");
@@ -1282,8 +1353,10 @@ public void testProcessStudentFor2018ENProgram_givenUpdated_STUDENT_whenProgramI
// Program & School
String program = "2018-EN";
String mincode = "222333";
+ UUID schoolOfRecordId = UUID.randomUUID();
String newMincode = "333444";
+ UUID newSchoolOfRecordId = UUID.randomUUID();
String newSlpDate = "202006";
String updateType = "UPD_GRAD";
@@ -1294,6 +1367,7 @@ public void testProcessStudentFor2018ENProgram_givenUpdated_STUDENT_whenProgramI
traxGraduationUpdate.setGraduationRequirementYear("SCCP");
traxGraduationUpdate.setStudentGrade("12");
traxGraduationUpdate.setSchoolOfRecord(newMincode);
+ traxGraduationUpdate.setSchoolOfRecordId(newSchoolOfRecordId);
traxGraduationUpdate.setSlpDate(newSlpDate);
traxGraduationUpdate.setStudentStatus("A");
traxGraduationUpdate.setArchiveFlag("A");
@@ -1314,6 +1388,7 @@ public void testProcessStudentFor2018ENProgram_givenUpdated_STUDENT_whenProgramI
currentStudent.setStudentGrade("12");
currentStudent.setStudentStatus("CUR");
currentStudent.setSchoolOfRecord(mincode);
+ currentStudent.setSchoolOfRecordId(schoolOfRecordId);
currentStudent.setSchoolAtGrad(mincode);
// Optional Program Codes
currentStudent.getProgramCodes().add("XC");
@@ -1348,8 +1423,10 @@ public void testProcessStudentFor2018PFProgram_givenUpdated_STUDENT_whenProgramI
// Program & School
String program = "2018-PF";
String mincode = "093333";
+ UUID schoolOfRecordId = UUID.randomUUID();
String newMincode = "333444";
+ UUID newSchoolOfRecordId = UUID.randomUUID();
String newSlpDate = "202006";
String updateType = "UPD_GRAD";
@@ -1360,6 +1437,7 @@ public void testProcessStudentFor2018PFProgram_givenUpdated_STUDENT_whenProgramI
traxGraduationUpdate.setGraduationRequirementYear("SCCP");
traxGraduationUpdate.setStudentGrade("12");
traxGraduationUpdate.setSchoolOfRecord(newMincode);
+ traxGraduationUpdate.setSchoolOfRecordId(newSchoolOfRecordId);
traxGraduationUpdate.setSlpDate(newSlpDate);
traxGraduationUpdate.setStudentStatus("A");
traxGraduationUpdate.setArchiveFlag("A");
@@ -1380,6 +1458,7 @@ public void testProcessStudentFor2018PFProgram_givenUpdated_STUDENT_whenProgramI
currentStudent.setStudentGrade("12");
currentStudent.setStudentStatus("CUR");
currentStudent.setSchoolOfRecord(mincode);
+ currentStudent.setSchoolOfRecordId(schoolOfRecordId);
currentStudent.setSchoolAtGrad(mincode);
// Optional Program Codes
currentStudent.getProgramCodes().add("XC");
@@ -1414,8 +1493,10 @@ public void testProcessStudentForSCCPProgram_givenUpdated_STUDENT_whenProgramIsC
// Program & School
String program = "SCCP";
String mincode = "222333";
+ UUID schoolOfRecordId = UUID.randomUUID();
String newMincode = "333444";
+ UUID newSchoolOfRecordId = UUID.randomUUID();
String updateType = "UPD_GRAD";
@@ -1425,6 +1506,7 @@ public void testProcessStudentForSCCPProgram_givenUpdated_STUDENT_whenProgramIsC
traxGraduationUpdate.setGraduationRequirementYear("2018");
traxGraduationUpdate.setStudentGrade("12");
traxGraduationUpdate.setSchoolOfRecord(newMincode);
+ traxGraduationUpdate.setSchoolOfRecordId(newSchoolOfRecordId);
traxGraduationUpdate.setStudentStatus("A");
traxGraduationUpdate.setArchiveFlag("A");
@@ -1444,6 +1526,7 @@ public void testProcessStudentForSCCPProgram_givenUpdated_STUDENT_whenProgramIsC
currentStudent.setStudentGrade("12");
currentStudent.setStudentStatus("CUR");
currentStudent.setSchoolOfRecord(mincode);
+ currentStudent.setSchoolOfRecordId(schoolOfRecordId);
currentStudent.setSchoolAtGrad(mincode);
currentStudent.setGradDate("2022/01");
// Optional Program Codes
@@ -1475,10 +1558,6 @@ public void testProcessStudentForGrad2018ENProgram_whenException_isThrown_return
// ID
String pen = "111222333";
- // Program & School
- String program = "2018-EN";
- String mincode = "222333";
-
String updateType = "UPD_GRAD";
TraxGraduationUpdateDTO traxStudentUpdate = new TraxGraduationUpdateDTO();
@@ -1509,8 +1588,10 @@ public void testProcessGraduatedStudentForGrad2018ENProgram_givenUpdated_STUDENT
// Program & School
String program = "2018-EN";
String mincode = "222333";
+ UUID schoolOfRecordId = UUID.randomUUID();
String newMincode = "093444";
+ UUID newSchoolOfRecordId = UUID.randomUUID();
String updateType = "UPD_GRAD";
@@ -1520,6 +1601,7 @@ public void testProcessGraduatedStudentForGrad2018ENProgram_givenUpdated_STUDENT
traxGraduationUpdate.setGraduationRequirementYear("2018");
traxGraduationUpdate.setStudentGrade("12");
traxGraduationUpdate.setSchoolOfRecord(newMincode);
+ traxGraduationUpdate.setSchoolOfRecordId(newSchoolOfRecordId);
traxGraduationUpdate.setStudentStatus("A");
traxGraduationUpdate.setArchiveFlag("A");
@@ -1538,6 +1620,7 @@ public void testProcessGraduatedStudentForGrad2018ENProgram_givenUpdated_STUDENT
currentStudent.setStudentGrade("12");
currentStudent.setStudentStatus("CUR");
currentStudent.setSchoolOfRecord(mincode);
+ currentStudent.setSchoolOfRecordId(schoolOfRecordId);
currentStudent.setSchoolAtGrad(mincode);
currentStudent.setGradDate("2022/06");
// Optional Program Codes
@@ -1572,6 +1655,7 @@ public void testProcessGraduatedStudentForSCCP_givenUpdated_STUDENT_whenSlpDateI
// Program & School
String program = "SCCP";
String mincode = "093333";
+ UUID schoolOfRecordId = UUID.randomUUID();
String newSlpDate = "202006";
@@ -1583,6 +1667,7 @@ public void testProcessGraduatedStudentForSCCP_givenUpdated_STUDENT_whenSlpDateI
traxGraduationUpdate.setGraduationRequirementYear("SCCP");
traxGraduationUpdate.setStudentGrade("12");
traxGraduationUpdate.setSchoolOfRecord(mincode);
+ traxGraduationUpdate.setSchoolOfRecordId(schoolOfRecordId);
traxGraduationUpdate.setSlpDate(newSlpDate);
traxGraduationUpdate.setStudentStatus("A");
traxGraduationUpdate.setArchiveFlag("A");
@@ -1603,6 +1688,7 @@ public void testProcessGraduatedStudentForSCCP_givenUpdated_STUDENT_whenSlpDateI
currentStudent.setStudentGrade("12");
currentStudent.setStudentStatus("CUR");
currentStudent.setSchoolOfRecord(mincode);
+ currentStudent.setSchoolOfRecordId(schoolOfRecordId);
currentStudent.setSchoolAtGrad(mincode);
currentStudent.setGradDate("2022/06");
// Optional Program Codes
@@ -1638,6 +1724,7 @@ public void testProcessArchivedNonGradStudentForSCCP_givenUpdated_whenSlpDateIsC
// Program & School
String program = "SCCP";
String mincode = "093333";
+ UUID schoolOfRecordId = UUID.randomUUID();
String newSlpDate = "208006";
@@ -1669,6 +1756,7 @@ public void testProcessArchivedNonGradStudentForSCCP_givenUpdated_whenSlpDateIsC
currentStudent.setStudentGrade("12");
currentStudent.setStudentStatus("ARC");
currentStudent.setSchoolOfRecord(mincode);
+ currentStudent.setSchoolOfRecordId(schoolOfRecordId);
currentStudent.setSchoolAtGrad(mincode);
// Optional Program Codes
currentStudent.getProgramCodes().add("XC");
@@ -1703,6 +1791,7 @@ public void testProcessDeceasedNonGradStudentForSCCP_givenUpdated_whenSlpDateIsC
// Program & School
String program = "SCCP";
String mincode = "093333";
+ UUID schoolOfRecordId = UUID.randomUUID();
String newSlpDate = "208006";
@@ -1734,6 +1823,7 @@ public void testProcessDeceasedNonGradStudentForSCCP_givenUpdated_whenSlpDateIsC
currentStudent.setStudentGrade("12");
currentStudent.setStudentStatus("DEC");
currentStudent.setSchoolOfRecord(mincode);
+ currentStudent.setSchoolOfRecordId(schoolOfRecordId);
currentStudent.setSchoolAtGrad(mincode);
// Optional Program Codes
currentStudent.getProgramCodes().add("XC");
@@ -1768,8 +1858,10 @@ public void testProcessGraduatedStudentForGrad2018ENProgram_givenUpdated_STUDENT
// Program & School
String program = "2018-EN";
String mincode = "222333";
+ UUID schoolOfRecordId = UUID.randomUUID();
String newMincode = "333444";
+ UUID newSchoolOfRecordId = UUID.randomUUID();
String updateType = "UPD_GRAD";
@@ -1780,6 +1872,7 @@ public void testProcessGraduatedStudentForGrad2018ENProgram_givenUpdated_STUDENT
traxGraduationUpdate.setCitizenship("C");
traxGraduationUpdate.setStudentGrade("11");
traxGraduationUpdate.setSchoolOfRecord(newMincode);
+ traxGraduationUpdate.setSchoolOfRecordId(newSchoolOfRecordId);
traxGraduationUpdate.setStudentStatus("A");
traxGraduationUpdate.setArchiveFlag("A");
@@ -1799,6 +1892,7 @@ public void testProcessGraduatedStudentForGrad2018ENProgram_givenUpdated_STUDENT
currentStudent.setStudentStatus("CUR");
currentStudent.setCitizenship("C");
currentStudent.setSchoolOfRecord(mincode);
+ currentStudent.setSchoolOfRecordId(schoolOfRecordId);
currentStudent.setSchoolAtGrad(mincode);
currentStudent.setGradDate("2022/06");
// Optional Program Codes
@@ -1833,6 +1927,7 @@ public void testProcessGraduatedStudentForGrad2018ENProgram_givenUpdated_STUDENT
// Program & School
String program = "2018-EN";
String mincode = "222333";
+ UUID schoolOfRecordId = UUID.randomUUID();
String newCitizenship = "C";
@@ -1844,6 +1939,7 @@ public void testProcessGraduatedStudentForGrad2018ENProgram_givenUpdated_STUDENT
traxGraduationUpdate.setGraduationRequirementYear("2018");
traxGraduationUpdate.setStudentGrade("12");
traxGraduationUpdate.setSchoolOfRecord(mincode);
+ traxGraduationUpdate.setSchoolOfRecordId(schoolOfRecordId);
traxGraduationUpdate.setCitizenship(newCitizenship);
traxGraduationUpdate.setStudentStatus("A");
traxGraduationUpdate.setArchiveFlag("A");
@@ -1864,6 +1960,7 @@ public void testProcessGraduatedStudentForGrad2018ENProgram_givenUpdated_STUDENT
currentStudent.setStudentStatus("CUR");
currentStudent.setCitizenship(null);
currentStudent.setSchoolOfRecord(mincode);
+ currentStudent.setSchoolOfRecordId(schoolOfRecordId);
currentStudent.setSchoolAtGrad(mincode);
currentStudent.setGradDate("2022/06");
// Optional Program Codes