Class Samples

java.lang.Object
com.genologics.ri.sample.Samples
All Implemented Interfaces:
Batch<SampleLink>, PaginatedBatch<SampleLink>, Serializable, Iterable<SampleLink>

public class Samples extends Object implements PaginatedBatch<SampleLink>, Serializable
The representation for a list of sample links.

The system enforces a maximum number of elements when generating the list of links. When the size of the request result set is larger than the system maximum, the list represents a paged view of the overall results, and the previous-page and next-page elements provide URIs linking to the previous or next page of links in the overall results.

See Also:
  • Field Details

    • samples

      protected List<SampleLink> samples
      The list of sample links.
    • previousPage

      protected Page previousPage
      The previous page link for pagination.
    • nextPage

      protected Page nextPage
      The next page link for pagination.
  • Constructor Details

    • Samples

      public Samples()
      Constructor for an empty samples list.
  • Method Details

    • getSamples

      public List<SampleLink> getSamples()
      Gets the list of sample links.

      This accessor method returns a reference to the live list, not a snapshot. Any modification to the returned list will be reflected in the object.

      Returns:
      The list of sample links.
    • getList

      public List<SampleLink> getList()
      Gets the list of sample links for batch operations.
      Specified by:
      getList in interface Batch<SampleLink>
      Returns:
      The list of sample links.
    • getSize

      public int getSize()
      Gets the size of the sample links list.
      Specified by:
      getSize in interface Batch<SampleLink>
      Returns:
      The number of sample links in the list.
    • getPreviousPage

      public Page getPreviousPage()
      Gets the previous page link.
      Specified by:
      getPreviousPage in interface PaginatedBatch<SampleLink>
      Returns:
      The previous page link.
    • setPreviousPage

      public void setPreviousPage(Page previousPage)
      Sets the previous page link.
      Specified by:
      setPreviousPage in interface PaginatedBatch<SampleLink>
      Parameters:
      previousPage - The previous page link.
    • getNextPage

      public Page getNextPage()
      Gets the next page link.
      Specified by:
      getNextPage in interface PaginatedBatch<SampleLink>
      Returns:
      The next page link.
    • setNextPage

      public void setNextPage(Page nextPage)
      Sets the next page link.
      Specified by:
      setNextPage in interface PaginatedBatch<SampleLink>
      Parameters:
      nextPage - The next page link.