-
Notifications
You must be signed in to change notification settings - Fork 173
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
Add support for the SearchBuilder extension #134
Comments
Hi @darrachequesne , I have read the documentation for the |
I have an idea of creating multiple |
For example: @Data
@NoArgsConstructor
@AllArgsConstructor
public static class Criteria {
private Condition condition;
private String data;
private String origData;
private String type;
private List<String> value;
private String logic;
private List<Criteria> criteria;
public <T> Predicate notEmpty(Root<T> root, CriteriaQuery<?> criteriaQuery, CriteriaBuilder criteriaBuilder) {
return criteriaBuilder.equal(criteriaBuilder.length(root.get(origData)), 0);
}
} And condition public enum Condition {
NOT_EMPTY("!null", (builder) -> builder::notEmpty);
private String key;
private Function<Criteria, Specification> predicate;
Condition(String key, Function<Criteria, Specification> predicate) {
this.key = key;
this.predicate = predicate;
}
} |
I would be willing to throw in $100 to get this working |
Reference: https://datatables.net/extensions/searchbuilder/
We will need to handle the additional query parameters (which can be nested):
Contribution is welcome!
The text was updated successfully, but these errors were encountered: