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