Skip to content
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

Add ability to ensure non-null pagination properties to PagingRequest #829

Closed
sleberknight opened this issue Dec 26, 2022 · 1 comment · Fixed by #834
Closed

Add ability to ensure non-null pagination properties to PagingRequest #829

sleberknight opened this issue Dec 26, 2022 · 1 comment · Fixed by #834
Assignees
Labels
new feature A new feature such as a new class, method, package, group of classes, etc.
Milestone

Comments

@sleberknight
Copy link
Member

Add one (or more) ways to ensure the pagination properties (page and limit) are non-null in a PagingRequest instance.

Normally this should not happen, but we've had odd situations where one or the other is null, which causes problems.

@sleberknight sleberknight added the new feature A new feature such as a new class, method, package, group of classes, etc. label Dec 26, 2022
@sleberknight sleberknight added this to the 2.5.0 milestone Dec 26, 2022
@sleberknight
Copy link
Member Author

The pagination properties should also include a numbering property, with type KiwiSearching.PageNumberingScheme

@sleberknight sleberknight self-assigned this Dec 29, 2022
sleberknight added a commit that referenced this issue Dec 29, 2022
* Add get/setNumbering with type PageNumberingScheme to PagingParams
* Add default hasPaginationProperties method to PagingParams
* Add numbering property to PagingRequest with ZERO_BASED as the
  default value (both for new instances and JAX-RS query param)
* Add static and instance copyOf method to provide easy copying
* Add ensurePaginationProperties method which ensures that a
  PagingRequest contains valid page, numbering, and limit properties,
  mutating in-place if necessary
* Add static and instance withPaginationProperties methods; these
  never mutate the PagingRequest and either returns the same instance
  if it has pagination properties, or returns a new instance with
  valid pagination properties

Closes #829
sleberknight added a commit that referenced this issue Dec 29, 2022
)

* Add get/setNumbering with type PageNumberingScheme to PagingParams
* Add default hasPaginationProperties method to PagingParams
* Add numbering property to PagingRequest with ZERO_BASED as the
  default value (both for new instances and JAX-RS query param)
* Add static and instance copyOf method to provide easy copying
* Add ensurePaginationProperties method which ensures that a
  PagingRequest contains valid page, numbering, and limit properties,
  mutating in-place if necessary
* Add static and instance withPaginationProperties methods; these
  never mutate the PagingRequest and either returns the same instance
  if it has pagination properties, or returns a new instance with
  valid pagination properties

Closes #829
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature A new feature such as a new class, method, package, group of classes, etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant