Skip to content

Commit

Permalink
GRAD2-2645: task is complete.
Browse files Browse the repository at this point in the history
GRAD2-2645: task is complete.
  • Loading branch information
infstar committed Sep 3, 2024
1 parent 2909ee1 commit e72562e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

public enum FieldName {
SCHOOL_OF_RECORD,
SCHOOL_OF_RECORD_ID,
GRAD_PROGRAM,
ADULT_START_DATE,
SLP_DATE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@

public enum FieldType {
STRING,
DATE
DATE,
GUID
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public class GraduationStudentRecord extends BaseModel {
private String honoursStanding;
private String recalculateGradStatus;
private String schoolOfRecord;
private UUID schoolOfRecordId;
private String schoolName;
private String studentGrade;
private String studentStatus;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,10 @@ private void populate(OngoingUpdateFieldDTO field, GraduationStudentRecordEntity
log.info(ONGOING_UPDATE_FIELD_STR, field, targetObject.getSchoolOfRecord());
targetObject.setSchoolOfRecord(getStringValue(field.getValue()));
}
case SCHOOL_OF_RECORD_ID -> {
log.info(ONGOING_UPDATE_FIELD_STR, field, targetObject.getSchoolOfRecordId());
targetObject.setSchoolOfRecordId(getGuidValue(field.getValue()));
}
case GRAD_PROGRAM -> {
log.info(ONGOING_UPDATE_FIELD_STR, field, targetObject.getProgram());
targetObject.setProgram(getStringValue(field.getValue()));
Expand Down Expand Up @@ -353,6 +357,11 @@ private String getStringValue(Object value) {
return (String) value;
}

private UUID getGuidValue(Object value) {
String strGuid = getStringValue(value);
return strGuid != null? UUID.fromString(strGuid) : null;
}

private StudentOptionalProgramEntity handleExistingOptionalProgram(StudentOptionalProgramRequestDTO studentOptionalProgramReq, StudentOptionalProgramEntity gradEntity) {
if (studentOptionalProgramReq.getStudentOptionalProgramData() != null) {
gradEntity.setStudentOptionalProgramData(studentOptionalProgramReq.getStudentOptionalProgramData());
Expand Down

0 comments on commit e72562e

Please sign in to comment.