Class CommonSliceDto

java.lang.Object
org.bremersee.pagebuilder.model.AbstractSliceDto<Object>
org.bremersee.pagebuilder.model.CommonSliceDto
All Implemented Interfaces:
Serializable

public class CommonSliceDto extends AbstractSliceDto<Object>
The common slice data transfer object.
Author:
Christian Bremer
See Also:
  • Field Details

    • content

      protected List<Object> content
      The content.
  • Constructor Details

    • CommonSliceDto

      protected CommonSliceDto()
      Instantiates a new common slice data transfer object.
    • CommonSliceDto

      public CommonSliceDto(List<?> content, int number, int size, boolean hasNext)
      Instantiates a new common slice data transfer object.
      Parameters:
      content - the content
      number - the number
      size - the size
      hasNext - the has next
    • CommonSliceDto

      public CommonSliceDto(List<?> content, int number, int size, boolean hasNext, SortOrder sort)
      Instantiates a new common slice data transfer object.
      Parameters:
      content - the content
      number - the number
      size - the size
      hasNext - the has next
      sort - the sort
    • CommonSliceDto

      public CommonSliceDto(List<?> content, int number, int size, boolean hasNext, org.springframework.data.domain.Sort sort)
      Instantiates a new common slice data transfer object.
      Parameters:
      content - the content
      number - the number
      size - the size
      hasNext - the has next
      sort - the sort
    • CommonSliceDto

      public CommonSliceDto(org.springframework.data.domain.Slice<?> slice)
      Instantiates a new common slice data transfer object.
      Parameters:
      slice - the slice
  • Method Details

    • getContent

      public List<Object> getContent()
      Gets content.
      Returns:
      the content
    • setContent

      protected void setContent(List<Object> content)
      Sets content.
      Parameters:
      content - the content
    • isContentPresent

      public boolean isContentPresent()
      Indicates whether the content is present.
      Returns:
      the boolean
    • setContentPresent

      protected void setContentPresent(boolean contentPresent)
      Sets content present. This method is ignored.
      Parameters:
      contentPresent - the content present
    • getSort

      public SortOrder getSort()
      Gets sort.
      Returns:
      the sort
    • setNumber

      protected abstract void setNumber(int number)
      Sets number.
      Parameters:
      number - the number
    • setSize

      protected abstract void setSize(int size)
      Sets size.
      Parameters:
      size - the size
    • getNumberOfElements

      public int getNumberOfElements()
      Gets the number of elements.
      Returns:
      the number of elements
    • setNumberOfElements

      protected void setNumberOfElements(int numberOfElements)
      Sets the number of elements. This method is ignored.
      Parameters:
      numberOfElements - the number of elements
    • isFirst

      public boolean isFirst()
      Indicates whether the page or slice is the first.
      Returns:
      the boolean
    • setFirst

      protected void setFirst(boolean first)
      Sets first. This method is ignored.
      Parameters:
      first - the first
    • isLast

      public boolean isLast()
      Indicates whether the page or slice is the last.
      Returns:
      the boolean
    • setLast

      protected void setLast(boolean last)
      Sets last. This method is ignored.
      Parameters:
      last - the last
    • setNextAvailable

      protected abstract void setNextAvailable(boolean nextAvailable)
      Sets next available.
      Parameters:
      nextAvailable - the next available
    • isPreviousAvailable

      public boolean isPreviousAvailable()
      Indicates whether a previous page or slice is available.
      Returns:
      the boolean
    • setPreviousAvailable

      protected void setPreviousAvailable(boolean previousAvailable)
      Sets previous available. This method is ignored.
      Parameters:
      previousAvailable - the previous available
    • getPageable

      public org.springframework.data.domain.Pageable getPageable()
      Gets pageable.
      Returns:
      the pageable
    • toSlice

      public org.springframework.data.domain.Slice<Object> toSlice()
      To slice.
      Returns:
      the slice