2.17.2: 2011-06-17

net.sf.basedb.core.data
Class BioMaterialEventData

java.lang.Object
  extended by net.sf.basedb.core.data.BasicData
      extended by net.sf.basedb.core.data.BioMaterialEventData
All Implemented Interfaces:
IdentifiableData, LoggableData, RegisteredData

public class BioMaterialEventData
extends BasicData
implements RegisteredData, LoggableData

This class is used to register events for measured biomaterials.

Version:
2.0
Author:
Nicklas
See Also:
BioMaterialEvent, Biomaterials overview
Last modified
$Date: 2010-12-02 14:35:04 +0100 (Thu, 02 Dec 2010) $
Hibernate: class
table="`BioMaterialEvents`" lazy="false"

Field Summary
private  MeasuredBioMaterialData bioMaterial
           
private  BioPlateEventParticipantData bioPlateEventParticipant
           
private  String comment
           
private  Date entryDate
           
private  Date eventDate
           
private  int eventType
           
private  HardwareData hardware
           
private  HybridizationData hybridization
           
static int MAX_COMMENT_LENGTH
          The maximum length of the comment about this event.
private  ProtocolData protocol
           
private  Set<MeasuredBioMaterialData> sourceBioMaterials
           
private  Map<MeasuredBioMaterialData,UsedQuantity> sources
           
private  Float usedQuantity
           
private  UserData user
           
 
Constructor Summary
BioMaterialEventData()
           
 
Method Summary
 MeasuredBioMaterialData getBioMaterial()
          Get the biomaterial produced or affected by this event.
 BioPlateEventParticipantData getBioPlateEventParticipant()
          Get the bioplate event that is the master event for this event.
 String getComment()
          Get the comment about this event.
 Date getEntryDate()
          Get the date this item was added to the database.
 Date getEventDate()
          Get the date this event happened in the lab.
 int getEventType()
          Get the type of event, 1=creation event, 2=hybridization event, 3=other event
 HardwareData getHardware()
          Get the hardware used in this event
 HybridizationData getHybridization()
          Get the hybridization that was created by this event.
 ProtocolData getProtocol()
          Get the protocol used in this event.
(package private)  Set<MeasuredBioMaterialData> getSourceBioMaterials()
          This is the inverse end.
 Map<MeasuredBioMaterialData,UsedQuantity> getSources()
          Get a map containing the source biomaterials and the used quantity for this event.
 Float getUsedQuantity()
          Get the used quantity of the biomaterial affected by this event.
 UserData getUser()
          Get the user that is responsible for this event, typically this is the user that entered the information in the database.
 void setBioMaterial(MeasuredBioMaterialData bioMaterial)
           
 void setBioPlateEventParticipant(BioPlateEventParticipantData bioPlateEventParticipant)
           
 void setComment(String comment)
           
 void setEntryDate(Date entryDate)
           
 void setEventDate(Date eventDate)
           
 void setEventType(int eventType)
           
 void setHardware(HardwareData hardware)
           
 void setHybridization(HybridizationData hybridization)
           
 void setProtocol(ProtocolData protocol)
           
(package private)  void setSourceBioMaterials(Set<MeasuredBioMaterialData> sourceBioMaterials)
           
(package private)  void setSources(Map<MeasuredBioMaterialData,UsedQuantity> sources)
           
 void setUsedQuantity(Float usedQuantity)
           
 void setUser(UserData user)
           
 
Methods inherited from class net.sf.basedb.core.data.BasicData
equals, 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
 

Field Detail

entryDate

private Date entryDate

eventType

private int eventType

bioPlateEventParticipant

private BioPlateEventParticipantData bioPlateEventParticipant

bioMaterial

private MeasuredBioMaterialData bioMaterial

usedQuantity

private Float usedQuantity

hybridization

private HybridizationData hybridization

user

private UserData user

protocol

private ProtocolData protocol

hardware

private HardwareData hardware

eventDate

private Date eventDate

MAX_COMMENT_LENGTH

public static final int MAX_COMMENT_LENGTH
The maximum length of the comment about this event.

See Also:
Constant Field Values

comment

private String comment

sources

private Map<MeasuredBioMaterialData,UsedQuantity> sources

sourceBioMaterials

private Set<MeasuredBioMaterialData> sourceBioMaterials
Constructor Detail

BioMaterialEventData

public BioMaterialEventData()
Method Detail

getEntryDate

public Date getEntryDate()
Description copied from interface: RegisteredData
Get the date this item was added to the database. The value is generated at creation time and can't be modified later.

Specified by:
getEntryDate in interface RegisteredData

setEntryDate

public void setEntryDate(Date entryDate)

getEventType

public int getEventType()
Get the type of event, 1=creation event, 2=hybridization event, 3=other event

Hibernate: property
column="`event_type`" type="int" not-null="true" update="false"

setEventType

public void setEventType(int eventType)

getBioPlateEventParticipant

public BioPlateEventParticipantData getBioPlateEventParticipant()
Get the bioplate event that is the master event for this event. Null if no bioplate event exists for this event.

Since:
2.17
Hibernate: many-to-one
column="`bioplateeventparticipant_id`" not-null="false" outer-join="false" update="false"

setBioPlateEventParticipant

public void setBioPlateEventParticipant(BioPlateEventParticipantData bioPlateEventParticipant)

getBioMaterial

public MeasuredBioMaterialData getBioMaterial()
Get the biomaterial produced or affected by this event.

Hibernate: many-to-one
column="`biomaterial_id`" not-null="false" outer-join="false" update="false"

setBioMaterial

public void setBioMaterial(MeasuredBioMaterialData bioMaterial)

getUsedQuantity

public Float getUsedQuantity()
Get the used quantity of the biomaterial affected by this event. This can be both positive and negative.

Hibernate: property
column="`used_quantity`" type="float" not-null="false"

setUsedQuantity

public void setUsedQuantity(Float usedQuantity)

getHybridization

public HybridizationData getHybridization()
Get the hybridization that was created by this event.

Hibernate: many-to-one
column="`hybridization_id`" not-null="false" outer-join="false" update="false"

setHybridization

public void setHybridization(HybridizationData hybridization)

getUser

public UserData getUser()
Get the user that is responsible for this event, typically this is the user that entered the information in the database.

Hibernate: many-to-one
column="`user_id`" not-null="true" outer-join="false" update="false"

setUser

public void setUser(UserData user)

getProtocol

public ProtocolData getProtocol()
Get the protocol used in this event.

Hibernate: many-to-one
column="`protocol_id`" not-null="false" outer-join="false"

setProtocol

public void setProtocol(ProtocolData protocol)

getHardware

public HardwareData getHardware()
Get the hardware used in this event

Hibernate: many-to-one
column="`hardware_id`" not-null="false" outer-join="false"

setHardware

public void setHardware(HardwareData hardware)

getEventDate

public Date getEventDate()
Get the date this event happened in the lab.

Hibernate: property
column="`event_date`" type="date" not-null="false"

setEventDate

public void setEventDate(Date eventDate)

getComment

public String getComment()
Get the comment about this event.

Hibernate: property
column="`comment`" type="text" not-null="false"

setComment

public void setComment(String comment)

getSources

public Map<MeasuredBioMaterialData,UsedQuantity> getSources()
Get a map containing the source biomaterials and the used quantity for this event.

Hibernate: map
table="`BioMaterialEventSources`" lazy="true" cascade="delete"
Hibernate: index-many-to-many
column="`biomaterial_id`" class="net.sf.basedb.core.data.MeasuredBioMaterialData"
Hibernate: collection-key
column="`event_id`"
Hibernate: collection-composite-element
class="net.sf.basedb.core.data.UsedQuantity"

setSources

void setSources(Map<MeasuredBioMaterialData,UsedQuantity> sources)

getSourceBioMaterials

Set<MeasuredBioMaterialData> getSourceBioMaterials()
This is the inverse end. The children is the non-pooled biomaterials that has this item as a parent.

Since:
2.9
See Also:
MeasuredBioMaterialData.getParent()
Hibernate: set
table="`BioMaterialEventSources`" inverse="true" lazy="true"
Hibernate: collection-key
column="`event_id`"
Hibernate: collection-many-to-many
column="`biomaterial_id`" class="net.sf.basedb.core.data.MeasuredBioMaterialData"

setSourceBioMaterials

void setSourceBioMaterials(Set<MeasuredBioMaterialData> sourceBioMaterials)

2.17.2: 2011-06-17