Package ome.model.units
Class Frequency
- java.lang.Object
-
- ome.model.units.Frequency
-
- All Implemented Interfaces:
java.io.Serializable,Primitive,Unit,Filterable
@Embeddable public class Frequency extends java.lang.Object implements java.io.Serializable, Filterable, Unit
class storing both a Frequency and a unit for that Frequency (e.g. m, in, ly, etc.) encapsulated in aUnitsFrequencyinstance. As also described in the remoting definition (.ice) for Frequency, this is an embedded class meaning that the columns here do not appear in their own table but exist directly on the containing object. Like Details and Permissions, instances do not contain long identifiers and cannot be persisted on their own.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanacceptFilter(Filter filter)static ome.units.quantity.FrequencyconvertFrequency(Frequency t)FIXME: this should likely take a default so that locations which don't want an exception can have log.warn("Using new PositiveFloat(1.0)!", e); return new PositiveFloat(1.0); or similar.static FrequencyconvertFrequency(Frequency value, java.lang.String target)static FrequencyconvertFrequency(Frequency value, ome.units.unit.Unit<ome.units.quantity.Frequency> ul)booleanequals(java.lang.Object obj)UnitsFrequencygetUnit()Many-to-one field ome.model.units.Frequency.unit (ome.model.enums.UnitsFrequency).doublegetValue()value of this unit-field.inthashCode()static ome.xml.model.enums.UnitsFrequencymakeFrequencyUnitXML(java.lang.String unit)static ome.units.quantity.FrequencymakeFrequencyXML(double d, java.lang.String unit)voidsetUnit(UnitsFrequency unit)voidsetValue(double value)java.lang.StringtoString()
-
-
-
Field Detail
-
VALUE
public static final java.lang.String VALUE
- See Also:
- Constant Field Values
-
UNIT
public static final java.lang.String UNIT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Frequency
@Deprecated public Frequency()
Deprecated.no-arg constructor to keep Hibernate happy.
-
Frequency
public Frequency(double d, java.lang.String u)
-
Frequency
public Frequency(double d, UnitsFrequency u)
-
Frequency
public Frequency(double d, ome.units.unit.Unit<ome.units.quantity.Frequency> unit)
-
Frequency
public Frequency(ome.units.quantity.Frequency value)
-
-
Method Detail
-
makeFrequencyUnitXML
public static ome.xml.model.enums.UnitsFrequency makeFrequencyUnitXML(java.lang.String unit)
-
makeFrequencyXML
public static ome.units.quantity.Frequency makeFrequencyXML(double d, java.lang.String unit)
-
convertFrequency
public static ome.units.quantity.Frequency convertFrequency(Frequency t)
FIXME: this should likely take a default so that locations which don't want an exception can have log.warn("Using new PositiveFloat(1.0)!", e); return new PositiveFloat(1.0); or similar.
-
convertFrequency
public static Frequency convertFrequency(Frequency value, ome.units.unit.Unit<ome.units.quantity.Frequency> ul)
-
convertFrequency
public static Frequency convertFrequency(Frequency value, java.lang.String target)
-
getValue
public double getValue()
value of this unit-field. It will be persisted to a column with the same name as the containing field. For example, detectorSettings.getReadoutrate() which is of typeFrequencywill be stored in a column "detectorSettingsreadOutRate".
-
getUnit
public UnitsFrequency getUnit()
Many-to-one field ome.model.units.Frequency.unit (ome.model.enums.UnitsFrequency). These values are stored in a column suffixed by "Unit". Whereasvaluefor physicalSizeX will be stored as "detectorSettings.readOutRate", the unit enum will be stored as "detectorSettings.readOutRateUnit".
-
setUnit
public void setUnit(UnitsFrequency unit)
-
acceptFilter
public boolean acceptFilter(Filter filter)
- Specified by:
acceptFilterin interfaceFilterable
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
-