Uploaded image for project: 'Spring Data Commons'
  1. Spring Data Commons
  2. DATACMNS-708

Provide a Pageable implementation with offset as input

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Core

      Description

      Currently, Spring Data provides the PageRequest implementation that is based upon the concepts of page size and page number.

      However, to easily integrate with other libraries (PrimeFaces is an example, but I read on the Internet that it's the same for SmartGWT), it would be handful to have a Pageable implementation that takes an offset as input, instead of a page number.

      Determining the page number from the offset is easy, but the function is not bidirectional and if you have an offset as an input you won't be able to get the desired result by using a PageRequest instance, unless the offset is guaranteed to be the exact start of a page.

      I wrote myself a Pageable implementation that takes an offset and a page size and that allows to get the next and previous pageables with or without the "snap to proper page start" behaviour. I may share it if you're interested in providing this improvement.

        Attachments

          Activity

            People

            Assignee:
            olivergierke Oliver Drotbohm
            Reporter:
            mauromol Mauro Molinari
            Last updater:
            Jens Schauder
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: