Class DeserializeablePage<T>

  • Type Parameters:
    T - the type of which the page consists.
    All Implemented Interfaces:
    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 DeserializeablePage<T>
    extends Object
    implements org.springframework.data.domain.Page<T>
    Deserializeable Page implementation.
    • Constructor Detail

      • DeserializeablePage

        public DeserializeablePage​(List<T> content,
                                   org.springframework.data.domain.Pageable pageable,
                                   long total)
        constructor.
        Parameters:
        content - content list
        pageable - pageable element
        total - total elements
      • DeserializeablePage

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

        public DeserializeablePage()
    • Method Detail

      • pageImpl

        public org.springframework.data.domain.PageImpl<T> pageImpl()
      • getNumber

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

        public final void setNumber​(int number)
      • getSize

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

        public final void setSize​(int size)
      • getTotalPages

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

        public final void setTotalPages​(int totalPages)
      • getNumberOfElements

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

        public final void setNumberOfElements​(int numberOfElements)
      • getTotalElements

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

        public final void setTotalElements​(long totalElements)
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface org.springframework.data.util.Streamable<T>
      • setEmpty

        public void setEmpty​(boolean empty)
      • isFirst

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

        public final void setFirst​(boolean first)
      • isLast

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

        public final void setLast​(boolean last)
      • getContent

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

        public final void setContent​(List<T> pcontent)
      • getSort

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

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

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

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

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

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

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

        public <U> org.springframework.data.domain.Page<U> map​(Function<? super T,​? extends U> converter)
        Specified by:
        map in interface org.springframework.data.domain.Page<T>
        Specified by:
        map in interface org.springframework.data.domain.Slice<T>
        Specified by:
        map in interface org.springframework.data.util.Streamable<T>
      • getConvertedContent

        protected <U> List<U> getConvertedContent​(Function<? super T,​? extends U> converter)
        Applies the given Function to the content of the Chunk.
        Type Parameters:
        U - type of the entries
        Parameters:
        converter - must not be null.
        Returns:
        list of converted entries