Skip to content

Add PageRequest builder #322

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

Closed

Conversation

Aloren
Copy link
Contributor

@Aloren Aloren commented Nov 2, 2018

This is a proposal PR for adding builder for PageRequest class.
Every time I see PageRequest.of(0, 10) in code I need to go into PageRequest to make sure that parameters were not mixed up. I think that having both parameters of the same type in constructor/static initializer is error prone. In this PR I would like to show you an example of how readable PageRequest could be. Please take a look. Thanks

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jan 4, 2021
@schauder schauder added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Jan 18, 2021
@mp911de mp911de closed this in 2db26d2 Jan 28, 2021
@mp911de mp911de added this to the 2.5 M3 (2021.0.0) milestone Jan 28, 2021
mp911de added a commit that referenced this pull request Jan 28, 2021
Introduce factory methods on Pageable, PageRequest, and QPageRequest to construct PageRequest objects. Replace builder with with…(…) methods.

Closes #322.
@mp911de
Copy link
Member

mp911de commented Jan 28, 2021

Thank you for your contribution. That's merged and polished now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants