Skip to content

refactor(core): paging classes inheritance

David Flor requested to merge xflord/STR-1227/page_query_refactor into main

Description

refactor(core): paging classes inheritance

  • introduced polymorphism in hopes if making future refactoring of paging logic easier
  • added parent class PageQuery to *PageQuery classes
  • added OrderColumn interface to *OrderColumn enums

How to test

Probably not needed since tests pass, but deploy on devel and play around with paginated tables just to be sure

Author's checklist

  • I have followed the contribution guidelines
  • This MR has been tested or does not change functionality
  • I have added relevant merge request dependencies (if this MR has any)
  • I have added the correct labels
  • I have assigned reviewers (if any are relevant)
  • I have edited the documentation (if the changes require it) or I have noted the need for the change if I do not have access to the documentation
  • I have marked all introduced BREAKING CHANGES or necessary DEPLOYMENT NOTES in the commit message(s)

Reviewer's checklist

  • This MR has been tested or does not change functionality
  • This MR has correct commit message format

Other information

In the end this is just a slightly modified version of !4325. I decided not to move OrderColumn fields into PageQuery, since in order to deserialize this kind of polymorphism (OrderColumn interface field in an abstract parent class - that cannot be instantiated) via Jackson would require a custom deserializer and/or more complex annotation magic and the benefit of having the field extracted into PageQuery would not outweigh the introduced complexity.

Related issues

Closes STR-1227

Edited by David Flor

Merge request reports

Loading