Class RestCriteria

  • All Implemented Interfaces:
    org.springframework.data.domain.Pageable

    public abstract class RestCriteria
    extends Object
    implements org.springframework.data.domain.Pageable
    Универсальный способ передачи параметров фильтрации, паджинации и сортировки в REST запросе
    • Constructor Detail

      • RestCriteria

        public RestCriteria()
      • RestCriteria

        public RestCriteria​(int pageNumber,
                            int pageSize,
                            org.springframework.data.domain.Sort sort)
      • RestCriteria

        public RestCriteria​(int pageNumber,
                            int pageSize)
    • Method Detail

      • getPageSize

        public int getPageSize()
        Specified by:
        getPageSize in interface org.springframework.data.domain.Pageable
      • getPageNumber

        public int getPageNumber()
        Specified by:
        getPageNumber in interface org.springframework.data.domain.Pageable
      • getOffset

        public long getOffset()
        Specified by:
        getOffset in interface org.springframework.data.domain.Pageable
      • getSort

        public org.springframework.data.domain.Sort getSort()
        Specified by:
        getSort in interface org.springframework.data.domain.Pageable
      • getDefaultOrders

        protected abstract List<org.springframework.data.domain.Sort.Order> getDefaultOrders()
      • setPageNumber

        public void setPageNumber​(int pageNumber)
      • setPageSize

        public void setPageSize​(int pageSize)
      • setOrders

        public void setOrders​(List<org.springframework.data.domain.Sort.Order> orders)
      • next

        public RestCriteria next()
        Specified by:
        next in interface org.springframework.data.domain.Pageable
      • hasPrevious

        public boolean hasPrevious()
        Specified by:
        hasPrevious in interface org.springframework.data.domain.Pageable
      • previousOrFirst

        public RestCriteria previousOrFirst()
        Specified by:
        previousOrFirst in interface org.springframework.data.domain.Pageable
      • first

        public RestCriteria first()
        Specified by:
        first in interface org.springframework.data.domain.Pageable
      • isPaged

        public boolean isPaged()
        Specified by:
        isPaged in interface org.springframework.data.domain.Pageable
      • isUnpaged

        public boolean isUnpaged()
        Specified by:
        isUnpaged in interface org.springframework.data.domain.Pageable
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object