Skip to content

Commit

Permalink
feat: add searchCriteria productName filter (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsteenke authored Apr 4, 2024
1 parent 13a7edf commit a6ce0b8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ public class ApplicationSearchCriteria {
private String appId;

private String name;
private String productName;

private Integer pageNumber = 0;
private Integer pageSize = 100;
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public PageResult<Application> findByCriteria(ApplicationSearchCriteria criteria
List<Predicate> predicates = new ArrayList<>();
addSearchStringPredicate(predicates, cb, root.get(Application_.appId), criteria.getAppId());
addSearchStringPredicate(predicates, cb, root.get(Application_.name), criteria.getName());
addSearchStringPredicate(predicates, cb, root.get(Application_.productName), criteria.getProductName());
if (!predicates.isEmpty()) {
cq.where(predicates.toArray(new Predicate[] {}));
}
Expand Down

0 comments on commit a6ce0b8

Please sign in to comment.