Skip to content

Commit

Permalink
Update SearchQueryRenderer.java
Browse files Browse the repository at this point in the history
NOT modifier support added for addIdFilter mothod

Signed-off-by: Berkant Karduman <[email protected]>
  • Loading branch information
berkant-k authored Mar 12, 2024
1 parent 8429bf7 commit ba1f04a
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1214,7 +1214,11 @@ protected void addIdFilter(QueryData queryData, String resourceType, QueryParame
final String parentAlias = queryData.getLRAlias();
List<String> values = queryParm.getValues().stream().map(p -> p.getValueCode()).collect(Collectors.toList());
if (values.size() == 1) {
currentSubQuery.from().where().and(parentAlias, "LOGICAL_ID").eq().bind(values.get(0));
if (Modifier.NOT.equals(queryParm.getModifier())) {
currentSubQuery.from().where().and(parentAlias, "LOGICAL_ID").neq().bind(values.get(0));
}else{
currentSubQuery.from().where().and(parentAlias, "LOGICAL_ID").eq().bind(values.get(0));
}
} else if (values.size() > 1) {
// the values are converted to bind-markers, so this is secure
currentSubQuery.from().where().and(parentAlias, "LOGICAL_ID").in(values);
Expand Down Expand Up @@ -3193,4 +3197,4 @@ private String getDataCol() {
}
}
}
}
}

0 comments on commit ba1f04a

Please sign in to comment.