Interface Filter<TT>

Type Parameters:
TT - Entity Type
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface Filter<TT>
Filter Hook

Example:

@Named
@ViewScoped
public class FilteringDataModel implements Serializable {
    @Inject
    @Getter
    JPALazyDataModel<UserEntity> userModel;

    @PostConstruct
    void initialize() {
        // display only zip codes greater than the filter field
        userModel.initialize(builder -> builder.filter((filters, cb, root) ->
                        filters.replaceFilter(UserEntity_.zipCode.getName(),
                        (Predicate predicate, Integer value) -> cb.greaterThan(root.get(UserEntity_.zipCode), value)))
                .build());
    }
}