Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GRAD2-2934: task is completed. #688

Merged
merged 2 commits into from
Sep 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
@Service
public class DataConversionService {

public static final String NULL_VALUE = "NULL"; // NULL String => Nullify (set to NULL)
private static final String CREATE_USER = "createUser";
private static final String CREATE_DATE = "createDate";
public static final String DEFAULT_CREATED_BY = "DATA_CONV";
Expand Down Expand Up @@ -296,7 +297,7 @@ private void handleStudentAchievements(String currentProgram, String newProgram,
}

private void resetAdultStartDate(String currentProgram, String newProgram, GraduationStudentRecordEntity targetObject) {
// Only when 1950 adult program is channged to another, reset adultStartDate to null
// Only when 1950 adult program is changed to another, reset adultStartDate to null
if (!StringUtils.equalsIgnoreCase(currentProgram, newProgram) && "1950".equalsIgnoreCase(currentProgram)) {
targetObject.setAdultStartDate(null);
}
Expand Down Expand Up @@ -348,9 +349,10 @@ private void populate(OngoingUpdateFieldDTO field, GraduationStudentRecordEntity
}

private String getStringValue(Object value) {
if (value == null)
return null;
return (String) value;
if (value instanceof String str) {
return NULL_VALUE.equalsIgnoreCase(str) ? null : str;
}
return null;
}

private StudentOptionalProgramEntity handleExistingOptionalProgram(StudentOptionalProgramRequestDTO studentOptionalProgramReq, StudentOptionalProgramEntity gradEntity) {
Expand Down
Loading