So, Grid uses DataProvider
May use this method, just provide two callbacks
public void setDataProvider(FetchItemsCallback<T> fetchItems,
SerializableSupplier<Integer> sizeCallback) {
And follow these samples and articles:
https://vaadin.com/blog/lazy-loading-with-vaadin-8
https://github.com/mstahv/jpa-helper-libraries
https://jaxenter.com/top-3-jpa-productivity-boosters-for-java-ee-developers-querydsl-116135.html
https://jaxenter.com/top-3-jpa-productivity-boosters-for-java-ee-developers-deltaspike-data-116136.html
https://jaxenter.com/top-3-jpa-productivity-boosters-for-java-ee-developers-spring-data-116126.html