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