2.17.2: 2011-06-17

net.sf.basedb.core.data
Class UsedQuantity

java.lang.Object
  extended by net.sf.basedb.core.data.UsedQuantity
All Implemented Interfaces:
Serializable

public class UsedQuantity
extends Object
implements Serializable

Hibernate will not save entries in the sources map BioMaterialEventData.getSources() where the element is null, so we have to use a composite element instead. This class maps the used_quantity column in the BioMaterialEventSources table.

NOTE! In 2.6 we changed the 'dummy' property to getSourceGroup() to be able to solve the problem with multi-array hybridizations. The name of this class is now a bit misleading but we see no real reason to rename it since it is part of the internal API only.

NOTE! The inverse relation is mapped in MeasuredBioMaterialData.getSourceEvents() and uses the BioMaterialSourceEventData class to hold the same columns as this class.

Version:
2.0
Author:
Nicklas
See Also:
Biomaterials overview, Serialized Form
Last modified
$Date: 2009-04-06 14:52:39 +0200 (Mon, 06 Apr 2009) $

Field Summary
private static long serialVersionUID
           
private  int sourceGroup
           
private  Float usedQuantity
          The used quantity value.
 
Constructor Summary
UsedQuantity()
          Used by Hibernate to create an instance.
UsedQuantity(Float usedQuantity, int sourceGroup)
          Create a new instance.
 
Method Summary
 int getSourceGroup()
          This column was previously used as a 'dummy' value for making sure that links were not deleted when the used quantity was null.
 Float getUsedQuantity()
          Get the used quantity.
 void setSourceGroup(int sourceGroup)
           
 void setUsedQuantity(Float usedQuantity)
           
 String toString()
          Convert the value to a string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

usedQuantity

private Float usedQuantity
The used quantity value.


sourceGroup

private int sourceGroup
Constructor Detail

UsedQuantity

UsedQuantity()
Used by Hibernate to create an instance.


UsedQuantity

public UsedQuantity(Float usedQuantity,
                    int sourceGroup)
Create a new instance.

Parameters:
usedQuantity - The used quantity
Method Detail

getUsedQuantity

public Float getUsedQuantity()
Get the used quantity.

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

setUsedQuantity

public void setUsedQuantity(Float usedQuantity)

getSourceGroup

public int getSourceGroup()
This column was previously used as a 'dummy' value for making sure that links were not deleted when the used quantity was null. From 2.6 this column is used to group sources together. This is needed to support multi-array hybridizations where we need to know the array each labeled extract goes into.

Since:
2.6
Hibernate: property
column="`dummy`" type="int" not-null="true"

setSourceGroup

public void setSourceGroup(int sourceGroup)

toString

public String toString()
Convert the value to a string.

Overrides:
toString in class Object

2.17.2: 2011-06-17