java.lang.Object
com.genologics.ri.sample.SampleBatchFetchResult
- All Implemented Interfaces:
Batch<Sample>,BatchUpdate<Sample>,Serializable,Iterable<Sample>
Batch fetch and update holder for samples.
- Since:
- 2.18
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<SampleCreation>The list of sample creations.The list of samples. -
Constructor Summary
ConstructorsConstructorDescriptionConstructor for an empty sample batch fetch result. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddForCreate(Collection<Sample> samples) Add samples to this object ready for creation.voidaddForUpdate(Collection<Sample> entities) Adds samples to this object for update.getList()Gets the list of samples for batch operations.Gets the list of sample creations.Gets the list of samples.intgetSize()Gets the size of the sample list.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
samples
The list of samples. -
sampleCreations
The list of sample creations.
-
-
Constructor Details
-
SampleBatchFetchResult
public SampleBatchFetchResult()Constructor for an empty sample batch fetch result.
-
-
Method Details
-
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
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
Gets the list of samples for batch operations. -
getSize
public int getSize()Gets the size of the sample list. -
addForUpdate
Adds samples to this object for update.- Specified by:
addForUpdatein interfaceBatchUpdate<Sample>- Parameters:
entities- The collection of Sample objects to add.
-
addForCreate
Add samples to this object ready for creation. This actually involves creatingSampleCreationobjects in thesampleCreationslist rather than simply putting the original entities into the normal list.- Specified by:
addForCreatein interfaceBatchUpdate<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:
-