Class Pressure

  • All Implemented Interfaces:
    java.io.Serializable, Primitive, Unit, Filterable

    @Embeddable
    public class Pressure
    extends java.lang.Object
    implements java.io.Serializable, Filterable, Unit
    class storing both a Pressure and a unit for that Pressure (e.g. m, in, ly, etc.) encapsulated in a UnitsPressure instance. As also described in the remoting definition (.ice) for Pressure, 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
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String UNIT  
      static java.lang.String VALUE  
    • Constructor Summary

      Constructors 
      Constructor Description
      Pressure()
      Deprecated.
      Pressure​(double d, java.lang.String u)  
      Pressure​(double d, UnitsPressure u)  
      Pressure​(double d, ome.units.unit.Unit<ome.units.quantity.Pressure> unit)  
      Pressure​(ome.units.quantity.Pressure value)  
    • Constructor Detail

      • Pressure

        @Deprecated
        public Pressure()
        Deprecated.
        no-arg constructor to keep Hibernate happy.
      • Pressure

        public Pressure​(double d,
                        java.lang.String u)
      • Pressure

        public Pressure​(double d,
                        ome.units.unit.Unit<ome.units.quantity.Pressure> unit)
      • Pressure

        public Pressure​(ome.units.quantity.Pressure value)
    • Method Detail

      • makePressureUnitXML

        public static ome.xml.model.enums.UnitsPressure makePressureUnitXML​(java.lang.String unit)
      • makePressureXML

        public static ome.units.quantity.Pressure makePressureXML​(double d,
                                                                  java.lang.String unit)
      • convertPressure

        public static ome.units.quantity.Pressure convertPressure​(Pressure 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.
      • convertPressure

        public static Pressure convertPressure​(Pressure value,
                                               ome.units.unit.Unit<ome.units.quantity.Pressure> ul)
      • convertPressure

        public static Pressure convertPressure​(Pressure 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, imagingEnvironment.getPressure() which is of type Pressure will be stored in a column "imagingEnvironmentpressure".
        Specified by:
        getValue in interface Unit
      • getUnit

        public UnitsPressure getUnit()
        Many-to-one field ome.model.units.Pressure.unit (ome.model.enums.UnitsPressure). These values are stored in a column suffixed by "Unit". Whereas value for physicalSizeX will be stored as "imagingEnvironment.pressure", the unit enum will be stored as "imagingEnvironment.pressureUnit".
        Specified by:
        getUnit in interface Unit
      • setValue

        public void setValue​(double value)
        Specified by:
        setValue in interface Unit
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object