Vaadin 8 lazy load a grid - any easy way?

I might have overlooked something, but I do not see it as easy to provide lazy loading to the vaadin8 dataprovider callback.
The grid DataProvider.fromCallbacks calls me with a query offset and a limit. This I have to fetch from my JPARepository using Pageable and returning Page of beans (or is there a smarter way?). But the grid/dataprovider do not know my pagesize so neither offset nor limit is page alligned.
So in order to get this fetch fullfilled I need to:
First fetch the page holding the data asked for by query.getOffset(), then throw away from start of page to getOffset(). Then fetch 0 or more pages until fullfill query.getLimit() and throw away the end of the last page. Then combine all the pages to one list, make it a stream and return it.
Far from easy
I tried a lot of simpler variants. For instance giving the dataProvider one full page of data when called. Sometimes too little (Assuming I will be called again) often giving too much data, assuming DataProvider will throw away the duplicates. But this gave all kind of wrong data in the grid: duplicate data and data in the wrong order etc

My bean do support a propper hashCode() and equals() - using the dbId. So Set and Hash operations inside framework should work.
What is the trick I have overlooked, since the described process do seem overly complex?