Package net.sf.jkniv.whinstone.types
Class DoubleBigDecimalType
- java.lang.Object
-
- net.sf.jkniv.whinstone.types.DoubleBigDecimalType
-
- All Implemented Interfaces:
Convertible<Double,BigDecimal>
public class DoubleBigDecimalType extends Object implements Convertible<Double,BigDecimal>
Conversion type fromJava DoubletoJDBC Decimal. This conversion has default usage.- Since:
- 0.6.0
- Author:
- Alisson Gomes
-
-
Constructor Summary
Constructors Constructor Description DoubleBigDecimalType()DoubleBigDecimalType(String pattern)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ColumnTypegetColumnType()Class<Double>getType()DoubletoAttribute(BigDecimal jdbc)Convert the jdbc value to attribute format or typeBigDecimaltoJdbc(Double attribute)Convert attribute to jdbc format or typeStringtoString()
-
-
-
Constructor Detail
-
DoubleBigDecimalType
public DoubleBigDecimalType()
-
DoubleBigDecimalType
public DoubleBigDecimalType(String pattern)
-
-
Method Detail
-
toJdbc
public BigDecimal toJdbc(Double attribute)
Description copied from interface:ConvertibleConvert attribute to jdbc format or type- Specified by:
toJdbcin interfaceConvertible<Double,BigDecimal>- Parameters:
attribute- the value of to be converted- Returns:
- the value to be stored for jdbc driver
-
toAttribute
public Double toAttribute(BigDecimal jdbc)
Description copied from interface:ConvertibleConvert the jdbc value to attribute format or type- Specified by:
toAttributein interfaceConvertible<Double,BigDecimal>- Parameters:
jdbc- the value stored at database- Returns:
- the value of attribute converted
-
getType
public Class<Double> getType()
- Specified by:
getTypein interfaceConvertible<Double,BigDecimal>
-
getColumnType
public ColumnType getColumnType()
- Specified by:
getColumnTypein interfaceConvertible<Double,BigDecimal>
-
-