Class OffsetPageRequest

  • All Implemented Interfaces:

    public class OffsetPageRequest
    extends Object
    implements, Serializable
    Pageable implementation using limit-offset mode.
    See Also:
    Serialized Form
    • Field Detail

      • maxLimit

        private int maxLimit
      • propertyDelimiter

        private String propertyDelimiter
      • limit

        private int limit
      • offset

        private long offset
      • sort

        private sort
    • Constructor Detail

      • OffsetPageRequest

        public OffsetPageRequest()
      • OffsetPageRequest

        public OffsetPageRequest​(int limit,
                                 long offset)
      • OffsetPageRequest

        public OffsetPageRequest​(int limit,
                                 long offset,
    • Method Detail

      • of

        public static OffsetPageRequest of​(int limit,
                                           long offset,
      • defaultSort

        public OffsetPageRequest defaultSort​( direction,
                                             String... properties)
      • setLimit

        public void setLimit​(int limit)
        Sets limit.
        limit - the size of the page to be returned.
      • setOffset

        public void setOffset​(long offset)
        Sets offset.
        offset - number of records to be skipped from the result set.
      • setSort

        public void setSort​(List<String> sorts)
        Sets sorts.
        sorts - the sorting strings. One sorting string is a comma separated string of property and direction, such as property,asc, property,desc.
      • getPageNumber

        public int getPageNumber()
        Specified by:
        getPageNumber in interface
      • getPageSize

        public int getPageSize()
        Specified by:
        getPageSize in interface
      • getOffset

        public long getOffset()
        Specified by:
        getOffset in interface
      • getSort

        public getSort()
        Specified by:
        getSort in interface
      • next

        public OffsetPageRequest next()
        Specified by:
        next in interface
      • previousOrFirst

        public OffsetPageRequest previousOrFirst()
        Specified by:
        previousOrFirst in interface
      • first

        public OffsetPageRequest first()
        Specified by:
        first in interface
      • withPage

        public OffsetPageRequest withPage​(int pageNumber)
        Specified by:
        withPage in interface
      • hasPrevious

        public boolean hasPrevious()
        Specified by:
        hasPrevious in interface
      • getMaxLimit

        protected int getMaxLimit()
      • getPropertyDelimiter

        protected String getPropertyDelimiter()
      • filterProperty

        protected String filterProperty​(String property)
      • parseDirection

        protected Optional<> parseDirection​(String value)
      • parseOrders

        protected List<> parseOrders​(List<String> source)
      • parseSort

        protected parseSort​(List<String> sorts)
      • check

        private void check​(int limit)
      • hashCode

        public int hashCode()
        hashCode in class Object