Class BigDecimalDoubleConverter

  • All Implemented Interfaces:
    java.io.Serializable, TypeConverter<java.math.BigDecimal,​java.lang.Double>

    public class BigDecimalDoubleConverter
    extends java.lang.Object
    implements TypeConverter<java.math.BigDecimal,​java.lang.Double>
    Class to handle the conversion between java.math.BigDecimal and a Double form.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static long serialVersionUID  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Double toDatastoreType​(java.math.BigDecimal bd)
      Method to convert the passed member value to the datastore type.
      java.math.BigDecimal toMemberType​(java.lang.Double val)
      Method to convert the passed datastore value to the member type.
      • Methods inherited from class java.lang.Object

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

      • BigDecimalDoubleConverter

        public BigDecimalDoubleConverter()
    • Method Detail

      • toMemberType

        public java.math.BigDecimal toMemberType​(java.lang.Double val)
        Description copied from interface: TypeConverter
        Method to convert the passed datastore value to the member type.
        Specified by:
        toMemberType in interface TypeConverter<java.math.BigDecimal,​java.lang.Double>
        Parameters:
        val - Value from the datastore
        Returns:
        Value for the member
      • toDatastoreType

        public java.lang.Double toDatastoreType​(java.math.BigDecimal bd)
        Description copied from interface: TypeConverter
        Method to convert the passed member value to the datastore type.
        Specified by:
        toDatastoreType in interface TypeConverter<java.math.BigDecimal,​java.lang.Double>
        Parameters:
        bd - Value from the member
        Returns:
        Value for the datastore