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