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