Class RestPage<T>

  • All Implemented Interfaces:
    Serializable, Iterable<T>, Supplier<Stream<T>>, org.springframework.data.domain.Page<T>, org.springframework.data.domain.Slice<T>, org.springframework.data.util.Streamable<T>

    public class RestPage<T>
    extends org.springframework.data.domain.PageImpl<T>
    Страница данных Spring Data серилизуемая через Jackson ObjectMapper
    See Also:
    Serialized Form
    • Constructor Detail

      • RestPage

        public RestPage​(List<T> content,
                        org.springframework.data.domain.Pageable pageable,
                        long total)
      • RestPage

        public RestPage​(List<T> content)
      • RestPage

        public RestPage()
    • Method Detail

      • unwrap

        public org.springframework.data.domain.PageImpl<T> unwrap()
      • getContent

        public List<T> getContent()
        Specified by:
        getContent in interface org.springframework.data.domain.Slice<T>
      • setContent

        public void setContent​(List<T> content)
      • isFirst

        public boolean isFirst()
        Specified by:
        isFirst in interface org.springframework.data.domain.Slice<T>
      • setFirst

        public void setFirst​(boolean first)
      • isLast

        public boolean isLast()
        Specified by:
        isLast in interface org.springframework.data.domain.Slice<T>
        Overrides:
        isLast in class org.springframework.data.domain.PageImpl<T>
      • setLast

        public void setLast​(boolean last)
      • getNumberOfElements

        public int getNumberOfElements()
        Specified by:
        getNumberOfElements in interface org.springframework.data.domain.Slice<T>
      • setNumberOfElements

        public void setNumberOfElements​(int numberOfElements)
      • getSize

        public int getSize()
        Specified by:
        getSize in interface org.springframework.data.domain.Slice<T>
      • setSize

        public void setSize​(int size)
      • getSort

        public org.springframework.data.domain.Sort getSort()
        Specified by:
        getSort in interface org.springframework.data.domain.Slice<T>
      • setSort

        public void setSort​(org.springframework.data.domain.Sort sort)
      • getTotalElements

        public long getTotalElements()
        Specified by:
        getTotalElements in interface org.springframework.data.domain.Page<T>
        Overrides:
        getTotalElements in class org.springframework.data.domain.PageImpl<T>
      • setTotalElements

        public void setTotalElements​(long totalElements)
      • getTotalPages

        public int getTotalPages()
        Specified by:
        getTotalPages in interface org.springframework.data.domain.Page<T>
        Overrides:
        getTotalPages in class org.springframework.data.domain.PageImpl<T>
      • setTotalPages

        public void setTotalPages​(int totalPages)
      • getNumber

        public int getNumber()
        Specified by:
        getNumber in interface org.springframework.data.domain.Slice<T>
      • setNumber

        public void setNumber​(int number)
      • hasPrevious

        public boolean hasPrevious()
        Specified by:
        hasPrevious in interface org.springframework.data.domain.Slice<T extends Object>
      • nextPageable

        public org.springframework.data.domain.Pageable nextPageable()
        Specified by:
        nextPageable in interface org.springframework.data.domain.Slice<T extends Object>
      • previousPageable

        public org.springframework.data.domain.Pageable previousPageable()
        Specified by:
        previousPageable in interface org.springframework.data.domain.Slice<T extends Object>
      • hasContent

        public boolean hasContent()
        Specified by:
        hasContent in interface org.springframework.data.domain.Slice<T extends Object>
      • getConvertedContent

        protected <U extends ObjectList<U> getConvertedContent​(Function<? super T,​? extends U> arg0)
      • getPageable

        public org.springframework.data.domain.Pageable getPageable()
        Specified by:
        getPageable in interface org.springframework.data.domain.Slice<T extends Object>