Package net.sf.jkniv.whinstone.types
Class DateIntType
- java.lang.Object
-
- net.sf.jkniv.whinstone.types.DateIntType
-
- All Implemented Interfaces:
Convertible<Date,Integer>
public class DateIntType extends Object implements Convertible<Date,Integer>
Conversion type fromJava java.util.DatetoJDBC INTEGER.- Since:
- 0.6.0
- Author:
- Alisson Gomes
-
-
Constructor Summary
Constructors Constructor Description DateIntType(String pattern)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ColumnTypegetColumnType()Class<Date>getType()DatetoAttribute(Integer jdbc)Convert the jdbc value to attribute format or typeIntegertoJdbc(Date attribute)Convert attribute to jdbc format or typeStringtoString()
-
-
-
Constructor Detail
-
DateIntType
public DateIntType(String pattern)
-
-
Method Detail
-
toJdbc
public Integer toJdbc(Date attribute)
Description copied from interface:ConvertibleConvert attribute to jdbc format or type- Specified by:
toJdbcin interfaceConvertible<Date,Integer>- Parameters:
attribute- the value of to be converted- Returns:
- the value to be stored for jdbc driver
-
toAttribute
public Date toAttribute(Integer jdbc)
Description copied from interface:ConvertibleConvert the jdbc value to attribute format or type- Specified by:
toAttributein interfaceConvertible<Date,Integer>- Parameters:
jdbc- the value stored at database- Returns:
- the value of attribute converted
-
getColumnType
public ColumnType getColumnType()
- Specified by:
getColumnTypein interfaceConvertible<Date,Integer>
-
-