Skip to content

Commit

Permalink
#104 | Minor refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
himeshr committed Jun 12, 2024
1 parent 685b8c3 commit e2a037d
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,9 @@ private List<TableMetadata> getChecklistTables() {
private List<TableMetadata> getTableMetadataForForm(String sql) {
List<Map<String, Object>> maps = runInOrgContext(() -> jdbcTemplate.queryForList(sql), jdbcTemplate);
Map<Object, List<Map<String, Object>>> tableMaps = maps.stream().collect(Collectors.groupingBy(stringObjectMap -> {
String formMappingUuid = stringObjectMap.get("form_mapping_uuid").toString();
Object rwgConceptUUID = stringObjectMap.get("repeatable_question_group_concept_uuid");
return rwgConceptUUID == null ? formMappingUuid : formMappingUuid + rwgConceptUUID;
String formMappingUUID = stringObjectMap.get("form_mapping_uuid").toString();
Object rqgConceptUUID = stringObjectMap.get("repeatable_question_group_concept_uuid");
return rqgConceptUUID == null ? formMappingUUID : formMappingUUID + rqgConceptUUID;
}));
return tableMaps.values().stream().map(mapList -> new TableMetadataMapper().create(mapList)).collect(Collectors.toList());
}
Expand Down

0 comments on commit e2a037d

Please sign in to comment.