2.17.2: 2011-06-17

net.sf.basedb.core.data
Class UnitSymbolData

java.lang.Object
  extended by net.sf.basedb.core.data.BasicData
      extended by net.sf.basedb.core.data.UnitSymbolData
All Implemented Interfaces:
IdentifiableData

public class UnitSymbolData
extends BasicData

This class holds information the symbol that are used with units. A symbol must be unique within a given QuantityData. To make it easier for user to input we will also register alternative symbols for units. For example:

Temperature: °C -- C
Surface area: m² -- m2

Version:
2.9
Author:
Nicklas
Last modified
$Date $
Hibernate: class
table="`UnitSymbols`" lazy="false"

Field Summary
private  QuantityData quantity
           
private  String symbol
           
private  UnitData unit
           
 
Constructor Summary
UnitSymbolData()
           
 
Method Summary
 QuantityData getQuantity()
          Get the quantity this symbol belongs to.
 String getSymbol()
          The symbol, which must be unique for a given quantity.
 UnitData getUnit()
          Get the unit this symbol belongs to.
 void setQuantity(QuantityData quantity)
           
 void setSymbol(String symbol)
           
 void setUnit(UnitData unit)
           
 
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
 

Field Detail

quantity

private QuantityData quantity

symbol

private String symbol

unit

private UnitData unit
Constructor Detail

UnitSymbolData

public UnitSymbolData()
Method Detail

getQuantity

public QuantityData getQuantity()
Get the quantity this symbol belongs to.

Hibernate: column
name="`quantity_id`" not-null="true" unique-key="uniquesymbol"
Hibernate: many-to-one
outer-join="false" update="false"

setQuantity

public void setQuantity(QuantityData quantity)

getSymbol

public String getSymbol()
The symbol, which must be unique for a given quantity.

Hibernate: property
type="string"
Hibernate: column
name="`symbol`" length="255" not-null="true" unique-key="uniquesymbol"

setSymbol

public void setSymbol(String symbol)

getUnit

public UnitData getUnit()
Get the unit this symbol belongs to.

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

setUnit

public void setUnit(UnitData unit)

2.17.2: 2011-06-17