Annotation Type JpaUnit


  • @Target({METHOD,FIELD})
    @Retention(RUNTIME)
    public @interface JpaUnit
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      java.lang.Class<? extends javax.measure.Quantity<?>> quantityType
      Specifies the quantityType which can be used to determine the system default unit
      com.raynigon.unit_api.core.annotation.QuantityShape shape
      Serialize the Quantity as String
      java.lang.Class<? extends com.raynigon.unit_api.core.units.general.IUnit<?>> unit
      Specifies the unit in which the Quantity is serialized/deserialized
      java.lang.Class<? extends com.raynigon.unit_api.core.units.general.IUnit<?>> value
      AliasFor(value="unit") Specifies the unit in which the Quantity is serialized/deserialized
    • Element Detail

      • value

        java.lang.Class<? extends com.raynigon.unit_api.core.units.general.IUnit<?>> value
        AliasFor(value="unit") Specifies the unit in which the Quantity is serialized/deserialized
        Returns:
        the unit which should be used for serialization/deserialization
        Default:
        com.raynigon.unit_api.jpa.annotation.JpaUnit.NoneUnit.class
      • unit

        java.lang.Class<? extends com.raynigon.unit_api.core.units.general.IUnit<?>> unit
        Specifies the unit in which the Quantity is serialized/deserialized
        Returns:
        the unit which should be used for serialization/deserialization
        Default:
        com.raynigon.unit_api.jpa.annotation.JpaUnit.NoneUnit.class
      • shape

        com.raynigon.unit_api.core.annotation.QuantityShape shape
        Serialize the Quantity as String
        Returns:
        the shape which should be used for serialization/deserialization
        Default:
        com.raynigon.unit_api.core.annotation.QuantityShape.NUMBER
      • quantityType

        java.lang.Class<? extends javax.measure.Quantity<?>> quantityType
        Specifies the quantityType which can be used to determine the system default unit
        Returns:
        the quantityType which should be used to determine the system unit for serialization/deserialization
        Default:
        com.raynigon.unit_api.jpa.annotation.NoneQuantity.class