Class JpaUnitHelper


  • public class JpaUnitHelper
    extends java.lang.Object
    Support a simple usage of the @JpaUnit properties
    • Constructor Summary

      Constructors 
      Constructor Description
      JpaUnitHelper()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.Class<? extends javax.measure.Quantity<?>> getQuantityType​(JpaUnit jpaUnit)
      Determine the value of the unit property
      static com.raynigon.unit_api.core.annotation.QuantityShape getShape​(JpaUnit jpaUnit)
      Determine the value of the shape property
      static com.raynigon.unit_api.core.units.general.IUnit<?> getUnitInstance​(JpaUnit jpaUnit)
      Determine the value of the unit property
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JpaUnitHelper

        public JpaUnitHelper()
    • Method Detail

      • getShape

        public static com.raynigon.unit_api.core.annotation.QuantityShape getShape​(JpaUnit jpaUnit)
        Determine the value of the shape property
        Parameters:
        jpaUnit - the annotation which should be processed
        Returns:
        the specified Shape or QuantityShape.NUMBER if no shape was specified
      • getUnitInstance

        public static com.raynigon.unit_api.core.units.general.IUnit<?> getUnitInstance​(JpaUnit jpaUnit)
        Determine the value of the unit property
        Parameters:
        jpaUnit - the annotation which should be processed
        Returns:
        the name of the specified unit or null if no unit was specified
      • getQuantityType

        public static java.lang.Class<? extends javax.measure.Quantity<?>> getQuantityType​(JpaUnit jpaUnit)
        Determine the value of the unit property
        Parameters:
        jpaUnit - the annotation which should be processed
        Returns:
        the name of the specified unit or null if no unit was specified