Package ome.model.units
Class ElectricPotential
- java.lang.Object
-
- ome.model.units.ElectricPotential
-
- All Implemented Interfaces:
java.io.Serializable
,Primitive
,Unit
,Filterable
@Embeddable public class ElectricPotential extends java.lang.Object implements java.io.Serializable, Filterable, Unit
class storing both a ElectricPotential and a unit for that ElectricPotential (e.g. m, in, ly, etc.) encapsulated in aUnitsElectricPotential
instance. As also described in the remoting definition (.ice) for ElectricPotential, 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
-
-
Constructor Summary
Constructors Constructor Description ElectricPotential()
Deprecated.ElectricPotential(double d, java.lang.String u)
ElectricPotential(double d, UnitsElectricPotential u)
ElectricPotential(double d, ome.units.unit.Unit<ome.units.quantity.ElectricPotential> unit)
ElectricPotential(ome.units.quantity.ElectricPotential value)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
acceptFilter(Filter filter)
static ome.units.quantity.ElectricPotential
convertElectricPotential(ElectricPotential 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 ElectricPotential
convertElectricPotential(ElectricPotential value, java.lang.String target)
static ElectricPotential
convertElectricPotential(ElectricPotential value, ome.units.unit.Unit<ome.units.quantity.ElectricPotential> ul)
boolean
equals(java.lang.Object obj)
UnitsElectricPotential
getUnit()
Many-to-one field ome.model.units.ElectricPotential.unit (ome.model.enums.UnitsElectricPotential).double
getValue()
value of this unit-field.int
hashCode()
static ome.xml.model.enums.UnitsElectricPotential
makeElectricPotentialUnitXML(java.lang.String unit)
static ome.units.quantity.ElectricPotential
makeElectricPotentialXML(double d, java.lang.String unit)
void
setUnit(UnitsElectricPotential unit)
void
setValue(double value)
java.lang.String
toString()
-
-
-
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
-
ElectricPotential
@Deprecated public ElectricPotential()
Deprecated.no-arg constructor to keep Hibernate happy.
-
ElectricPotential
public ElectricPotential(double d, java.lang.String u)
-
ElectricPotential
public ElectricPotential(double d, UnitsElectricPotential u)
-
ElectricPotential
public ElectricPotential(double d, ome.units.unit.Unit<ome.units.quantity.ElectricPotential> unit)
-
ElectricPotential
public ElectricPotential(ome.units.quantity.ElectricPotential value)
-
-
Method Detail
-
makeElectricPotentialUnitXML
public static ome.xml.model.enums.UnitsElectricPotential makeElectricPotentialUnitXML(java.lang.String unit)
-
makeElectricPotentialXML
public static ome.units.quantity.ElectricPotential makeElectricPotentialXML(double d, java.lang.String unit)
-
convertElectricPotential
public static ome.units.quantity.ElectricPotential convertElectricPotential(ElectricPotential 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.
-
convertElectricPotential
public static ElectricPotential convertElectricPotential(ElectricPotential value, ome.units.unit.Unit<ome.units.quantity.ElectricPotential> ul)
-
convertElectricPotential
public static ElectricPotential convertElectricPotential(ElectricPotential 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.getVolatage() which is of typeElectricPotential
will be stored in a column "detectorSettingsvolatage".
-
getUnit
public UnitsElectricPotential getUnit()
Many-to-one field ome.model.units.ElectricPotential.unit (ome.model.enums.UnitsElectricPotential). These values are stored in a column suffixed by "Unit". Whereasvalue
for physicalSizeX will be stored as "detectorSettings.volatage", the unit enum will be stored as "detectorSettings.volatageUnit".
-
setUnit
public void setUnit(UnitsElectricPotential unit)
-
acceptFilter
public boolean acceptFilter(Filter filter)
- Specified by:
acceptFilter
in interfaceFilterable
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-