public class ScalarTypeCalendar extends ScalarTypeBaseDateTime<Calendar>
jdbcNative, jdbcType, type| Constructor and Description |
|---|
ScalarTypeCalendar(int jdbcType) |
| Modifier and Type | Method and Description |
|---|---|
void |
bind(DataBind b,
Calendar value)
Convert (if necessary) and bind the value to the preparedStatement.
|
Calendar |
convertFromTimestamp(Timestamp ts) |
Timestamp |
convertToTimestamp(Calendar t) |
Calendar |
toBeanType(Object value)
Convert the value as necessary to the logical Bean type.
|
Object |
toJdbcType(Object value)
Convert the value as necessary to the JDBC type.
|
formatValue, isDateTimeCapable, jsonFromString, jsonToString, jsonWrite, parse, parseDateTime, read, readData, writeDataaccumulateScalarTypes, format, getDbNullValue, getJdbcType, getLength, getType, isDbNull, isJdbcNative, loadIgnorepublic void bind(DataBind b, Calendar value) throws SQLException
ScalarTypevalue may need to be converted from the logical bean property type to the JDBC type.
bind in interface ScalarDataReader<Calendar>bind in interface ScalarType<Calendar>bind in class ScalarTypeBaseDateTime<Calendar>SQLExceptionpublic Calendar convertFromTimestamp(Timestamp ts)
convertFromTimestamp in class ScalarTypeBaseDateTime<Calendar>public Timestamp convertToTimestamp(Calendar t)
convertToTimestamp in class ScalarTypeBaseDateTime<Calendar>public Object toJdbcType(Object value)
ScalarTypeNote that this should also match the type as per the getJdbcType() method.
This is typically used when the matching type is used in a where clause and we use this to ensure it is an appropriate jdbc type.
public Calendar toBeanType(Object value)
ScalarTypeThe type as per the bean property.
This is used to automatically convert id values (typically from a string to a int, long or UUID).
Copyright © 2014. All Rights Reserved.