Class Sample
- java.lang.Object
-
- ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.Sample
-
- All Implemented Interfaces:
IIdentifierHolder,IIdHolder,java.io.Serializable
@JsonObject("Sample") public final class Sample extends java.lang.Object implements java.io.Serializable, IIdentifierHolder, IIdHolderImmutable value object representing a sample.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSample.SampleInitializerClass used to initialize a new sample instance.
-
Constructor Summary
Constructors Constructor Description Sample(Sample.SampleInitializer initializer)Creates a new instance with the provided initializer
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.util.List<Sample>getChildren()Return the children.java.util.List<Sample>getChildrenJson()java.lang.StringgetCode()Returns the sample code.java.lang.StringgetExperimentIdentifierOrNull()java.lang.LonggetId()Returns the sample id.java.lang.StringgetIdentifier()Returns the sample identifier;java.util.List<Metaproject>getMetaprojects()java.util.List<Metaproject>getMetaprojectsJson()java.util.List<Sample>getParents()Return the parents.java.util.List<Sample>getParentsJson()java.lang.StringgetPermId()Returns the sample permanent id.java.util.Map<java.lang.String,java.lang.String>getProperties()java.util.Map<java.lang.String,java.lang.String>getPropertiesJson()EntityRegistrationDetailsgetRegistrationDetails()Return the sample registration details.java.util.EnumSet<SampleFetchOption>getRetrievedFetchOptions()Returns fetch options used to retrieved this sample object.java.lang.StringgetSampleTypeCode()Returns the sample type code.java.lang.LonggetSampleTypeId()Returns the sample type id.java.lang.StringgetSpaceCode()Returns the space code.inthashCode()booleanisStub()java.lang.StringtoString()
-
-
-
Constructor Detail
-
Sample
public Sample(Sample.SampleInitializer initializer)
Creates a new instance with the provided initializer- Throws:
java.lang.IllegalArgumentException- if some of the required information is not provided.
-
-
Method Detail
-
getId
public java.lang.Long getId()
Returns the sample id.
-
getSpaceCode
public java.lang.String getSpaceCode()
Returns the space code.
-
getPermId
public java.lang.String getPermId()
Returns the sample permanent id.
-
getCode
public java.lang.String getCode()
Returns the sample code.
-
getIdentifier
public java.lang.String getIdentifier()
Returns the sample identifier;- Specified by:
getIdentifierin interfaceIIdentifierHolder
-
getExperimentIdentifierOrNull
public java.lang.String getExperimentIdentifierOrNull()
-
getSampleTypeId
public java.lang.Long getSampleTypeId()
Returns the sample type id.
-
getSampleTypeCode
public java.lang.String getSampleTypeCode()
Returns the sample type code.
-
getProperties
public java.util.Map<java.lang.String,java.lang.String> getProperties() throws java.lang.IllegalArgumentException- Throws:
java.lang.IllegalArgumentException
-
getMetaprojects
public java.util.List<Metaproject> getMetaprojects() throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
-
getRegistrationDetails
public EntityRegistrationDetails getRegistrationDetails()
Return the sample registration details.- Since:
- 1.11
-
getRetrievedFetchOptions
public java.util.EnumSet<SampleFetchOption> getRetrievedFetchOptions()
Returns fetch options used to retrieved this sample object.
-
getChildren
public java.util.List<Sample> getChildren() throws java.lang.IllegalArgumentException
Return the children.- Returns:
- Children of this sample or an empty list if there are no children.
- Throws:
java.lang.IllegalArgumentException- Thrown if the children were not retrieved from the server.
-
getParents
public java.util.List<Sample> getParents() throws java.lang.IllegalArgumentException
Return the parents.- Returns:
- All parents of this sample or an empty list if there are no parents.
- Throws:
java.lang.IllegalArgumentException- Thrown if the parents were not retrieved from the server.
-
isStub
public boolean isStub()
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getPropertiesJson
public java.util.Map<java.lang.String,java.lang.String> getPropertiesJson()
-
getMetaprojectsJson
public java.util.List<Metaproject> getMetaprojectsJson()
-
getChildrenJson
public java.util.List<Sample> getChildrenJson()
-
getParentsJson
public java.util.List<Sample> getParentsJson()
-
-