Class Sample

    • 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.
        Specified by:
        getId in interface IIdHolder
        Returns:
        null if there is no 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.
      • 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:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.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()