Class CosmosPageImpl<T>

java.lang.Object
org.springframework.data.domain.PageImpl<T>
com.azure.spring.data.cosmos.core.query.CosmosPageImpl<T>
Type Parameters:
T - the type of which the CosmosPageImpl consists.
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 CosmosPageImpl<T> extends org.springframework.data.domain.PageImpl<T>
CosmosPageImpl implementation.
See Also:
  • Constructor Details

    • CosmosPageImpl

      public CosmosPageImpl(List<T> content, org.springframework.data.domain.Pageable pageable, long total)
      Constructor of CosmosPageImpl.
      Parameters:
      content - the content of this page, must not be null.
      pageable - the paging information, must not be null.
      total - amount of items available. The total might be adapted considering the length of the content given, if it is going to be the content of the last page. This is in place to mitigate inconsistencies.
  • Method Details

    • 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>
    • 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>
    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface org.springframework.data.domain.Slice<T>
      Overrides:
      hasNext in class org.springframework.data.domain.PageImpl<T>
    • 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>
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class org.springframework.data.domain.PageImpl<T>
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class org.springframework.data.domain.PageImpl<T>
    • getNumber

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

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

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

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

      public boolean isFirst()
      Specified by:
      isFirst 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>
    • hasContent

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

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

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

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

      public Iterator<T> iterator()
      Specified by:
      iterator in interface Iterable<T>
    • getConvertedContent

      protected <U> List<U> getConvertedContent(Function<? super T,? extends U> arg0)