Class JpaUnitHelper
java.lang.Object
com.raynigon.unit.api.jpa.annotation.JpaUnitHelper
Support a simple usage of the @JpaUnit properties.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Class<? extends javax.measure.Quantity<?>>
getQuantityType
(JpaUnit jpaUnit) Determine the value of the unit propertystatic com.raynigon.unit.api.core.annotation.QuantityShape
Determine the value of the shape propertystatic com.raynigon.unit.api.core.units.general.IUnit<?>
getUnitInstance
(JpaUnit jpaUnit) Determine the value of the unit property
-
Constructor Details
-
JpaUnitHelper
public JpaUnitHelper()
-
-
Method Details
-
getShape
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
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
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
-