Skip to content

Commit

Permalink
Refactor description handling in SearchResultRowMapper
Browse files Browse the repository at this point in the history
  • Loading branch information
Gcolon021 committed Nov 13, 2024
1 parent 24a9ad1 commit bd00380
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,17 @@ private SearchResult mapSearchResults(ResultSet rs) throws SQLException {
log.error(e.getMessage());
}

String description =
rs.getString("description") == null || rs.getString("description").isBlank() ? "" : rs.getString("description");

Metadata metadata = new Metadata(
rs.getString("stigmatized"), rs.getString("display"), rs.getString("description"),
rs.getString("stigmatized"), rs.getString("display"), description,
isContinuous ? String.valueOf(jsonBlobParser.parseMin(rs.getString("values"))) : "", rs.getString("conceptPath"),
rs.getString("parentName"), rs.getString("conceptPath"), rs.getString("name"), rs.getString("parentDisplay"),
rs.getString("description") == null || rs.getString("description").isBlank() ? "" : rs.getString("description"), // changed
rs.getString("parentName"), rs.getString("conceptPath"), rs.getString("name"), rs.getString("parentDisplay"), description, // changed
"{}", "", rs.getString("parentDisplay"), isContinuous ? String.valueOf(jsonBlobParser.parseMax(rs.getString("values"))) : "",
rs.getString("description"), rs.getString("dataset"), hashedVarId, rs.getString("conceptType"), rs.getString("name"),
rs.getString("dataset"), rs.getString("stigmatized"), rs.getString("display"), rs.getString("studyAcronym"),
rs.getString("dsFullName"), rs.getString("parentName"), rs.getString("parentDisplay"), rs.getString("conceptPath")
description, rs.getString("dataset"), hashedVarId, rs.getString("conceptType"), rs.getString("name"), rs.getString("dataset"),
rs.getString("stigmatized"), rs.getString("display"), rs.getString("studyAcronym"), rs.getString("dsFullName"),
rs.getString("parentName"), rs.getString("parentDisplay"), rs.getString("conceptPath")
);

Result result = new Result(
Expand Down

0 comments on commit bd00380

Please sign in to comment.