Implement Page and PageResponseType for QueryBus
See original GitHub issueAs a user of the QueryBus
/QueryGateway
the use case where you’d want to retrieve a Page<E>
of a certain type makes sense. We should hence introduce a Page
implementation which can be used as a ResponseType
(introduced in #463) when performing a query.
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (7 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi,
I also implemented my own PageResponseType, it is not at all ready for production, but maybe it can give some inspiration to someone in the same situation:
Excellent @manuelarte! I’m curious why you think it’s not production-ready? It works like a charm.
Just to complete the story for others finding this: I used manuelarte’s code above, verbatim, with these imports in my class: (notice that the Page is a spring JPA page)
My query class has a
get/setPageable()
method on it to hold the pageable that comes in from the Spring REST controller. My query service code looks a bit like this:and my query handler mostly like this (verbose for clarity)