Class SampleBatchFetchResult

java.lang.Object
com.genologics.ri.sample.SampleBatchFetchResult
All Implemented Interfaces:
Batch<Sample>, BatchUpdate<Sample>, Serializable, Iterable<Sample>

public class SampleBatchFetchResult extends Object implements BatchUpdate<Sample>, Serializable
Batch fetch and update holder for samples.
Since:
2.18
See Also:
  • Field Details

    • samples

      protected List<Sample> samples
      The list of samples.
    • sampleCreations

      protected List<SampleCreation> sampleCreations
      The list of sample creations.
  • Constructor Details

    • SampleBatchFetchResult

      public SampleBatchFetchResult()
      Constructor for an empty sample batch fetch result.
  • Method Details

    • getSamples

      public List<Sample> getSamples()
      Gets the list of samples.

      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 samples.
    • getSampleCreations

      public List<SampleCreation> getSampleCreations()
      Gets the list of sample creations.

      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 creations.
    • getList

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

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

      public void addForUpdate(Collection<Sample> entities)
      Adds samples to this object for update.
      Specified by:
      addForUpdate in interface BatchUpdate<Sample>
      Parameters:
      entities - The collection of Sample objects to add.
    • addForCreate

      public void addForCreate(Collection<Sample> samples)
      Add samples to this object ready for creation. This actually involves creating SampleCreation objects in the sampleCreations list rather than simply putting the original entities into the normal list.
      Specified by:
      addForCreate in interface BatchUpdate<Sample>
      Parameters:
      samples - The collection of Sample objects.
      Throws:
      IllegalStateException - if any sample does not have its creation location set or already has a URI.
      See Also: