Package net.sf.basedb.core.data
Class BioMaterialData
- java.lang.Object
-
- net.sf.basedb.core.data.BasicData
-
- net.sf.basedb.core.data.OwnedData
-
- net.sf.basedb.core.data.SharedData
-
- net.sf.basedb.core.data.CommonData
-
- net.sf.basedb.core.data.AnnotatedData
-
- net.sf.basedb.core.data.BioMaterialData
-
- All Implemented Interfaces:
AnnotatableData
,IdentifiableData
,LoggableData
,NameableData
,OwnableData
,RemovableData
,ShareableData
,SubtypableData
- Direct Known Subclasses:
BioSourceData
,MeasuredBioMaterialData
public abstract class BioMaterialData extends AnnotatedData implements SubtypableData
This class is the root class for biomaterials.- Version:
- 2.0
- Author:
- Nicklas
- See Also:
BioMaterial
, Developer documentation: Biomaterials LIMS- Last modified
- $Date: 2015-02-23 09:43:11 +0100 (må, 23 feb 2015) $
- Hibernate: class
- table="`BioMaterials`" lazy="true" discriminator-value="-1"
- Hibernate: discriminator
- column="`discriminator`" type="int"
-
-
Field Summary
Fields Modifier and Type Field Description private Set<BioMaterialEventSourceData>
childCreationEvents
private Set<MeasuredBioMaterialData>
children
private String
externalId
static int
MAX_EXTERNAL_ID_LENGTH
The maximum length of the external id that can be stored in the database.private ItemSubtypeData
subtype
-
Fields inherited from interface net.sf.basedb.core.data.NameableData
MAX_DESCRIPTION_LENGTH, MAX_NAME_LENGTH
-
-
Constructor Summary
Constructors Constructor Description BioMaterialData()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object other)
It may happen that lazy-loaded proxies are put in the same collection as already loaded "real" objects in which case the BasicData.equals() method doesns't work.(package private) Set<BioMaterialEventSourceData>
getChildCreationEvents()
This is the inverse end.(package private) Set<MeasuredBioMaterialData>
getChildren()
This is the inverse end.String
getExternalId()
Get the external id for the biomaterialItemSubtypeData
getItemSubtype()
Get the subtype of the item.(package private) void
setChildCreationEvents(Set<BioMaterialEventSourceData> childCreationEvents)
(package private) void
setChildren(Set<MeasuredBioMaterialData> children)
void
setExternalId(String externalId)
void
setItemSubtype(ItemSubtypeData subtype)
Set the subtype of the item.-
Methods inherited from class net.sf.basedb.core.data.AnnotatedData
getAnnotations, getAnnotationSet, setAnnotations, setAnnotationSet
-
Methods inherited from class net.sf.basedb.core.data.CommonData
getDescription, getName, getRemovedBy, setDescription, setName, setRemovedBy
-
Methods inherited from class net.sf.basedb.core.data.SharedData
getItemKey, getProjectKey, setItemKey, setProjectKey
-
Methods inherited from class net.sf.basedb.core.data.BasicData
getId, getVersion, hashCode, setId, setVersion, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.sf.basedb.core.data.IdentifiableData
getId, getVersion
-
Methods inherited from interface net.sf.basedb.core.data.OwnableData
getOwner, setOwner
-
-
-
-
Field Detail
-
subtype
private ItemSubtypeData subtype
-
MAX_EXTERNAL_ID_LENGTH
public static final int MAX_EXTERNAL_ID_LENGTH
The maximum length of the external id that can be stored in the database.- See Also:
setExternalId(String)
, Constant Field Values
-
externalId
private String externalId
-
children
private Set<MeasuredBioMaterialData> children
-
childCreationEvents
private Set<BioMaterialEventSourceData> childCreationEvents
-
-
Method Detail
-
equals
public boolean equals(Object other)
It may happen that lazy-loaded proxies are put in the same collection as already loaded "real" objects in which case the BasicData.equals() method doesns't work. If both objects are BioMaterialData objects we can safely compare the id since they all share the same database table and id:s are always unique even for items of different types.
-
getItemSubtype
public ItemSubtypeData getItemSubtype()
Description copied from interface:SubtypableData
Get the subtype of the item.- Specified by:
getItemSubtype
in interfaceSubtypableData
-
setItemSubtype
public void setItemSubtype(ItemSubtypeData subtype)
Description copied from interface:SubtypableData
Set the subtype of the item.- Specified by:
setItemSubtype
in interfaceSubtypableData
-
getExternalId
public String getExternalId()
Get the external id for the biomaterial- Hibernate: property
- column="`external_id`" type="string" length="255" not-null="false"
-
setExternalId
public void setExternalId(String externalId)
-
getChildren
Set<MeasuredBioMaterialData> getChildren()
This is the inverse end. NOTE! This collection will not contained pooled children or hybridizations.- Since:
- 2.9
- See Also:
MeasuredBioMaterialData.getParent()
- Hibernate: set
- inverse="true" lazy="true"
- Hibernate: collection-key
- column="`parent_id`"
- Hibernate: collection-one-to-many
- class="net.sf.basedb.core.data.MeasuredBioMaterialData"
-
setChildren
void setChildren(Set<MeasuredBioMaterialData> children)
-
getChildCreationEvents
Set<BioMaterialEventSourceData> getChildCreationEvents()
This is the inverse end.- See Also:
BioMaterialEventSourceData.getBioMaterial()
- Hibernate: set
- lazy="true" inverse="true"
- Hibernate: collection-key
- column="`biomaterial_id`"
- Hibernate: collection-one-to-many
- class="net.sf.basedb.core.data.BioMaterialEventSourceData"
-
setChildCreationEvents
void setChildCreationEvents(Set<BioMaterialEventSourceData> childCreationEvents)
-
-