public static class ScalarTypeUtilDate.TimestampType extends ScalarTypeBaseDateTime<Date>
jdbcNative, jdbcType, type| Constructor and Description |
|---|
ScalarTypeUtilDate.TimestampType() |
| Modifier and Type | Method and Description |
|---|---|
void |
bind(DataBind b,
Date value)
Convert (if necessary) and bind the value to the preparedStatement.
|
Date |
convertFromTimestamp(Timestamp ts) |
Timestamp |
convertToTimestamp(Date t) |
Date |
parseDateTime(long systemTimeMillis)
Convert the systemTimeMillis into the appropriate java object.
|
Date |
read(DataReader dataReader)
Read the value from the resultSet and convert if necessary to the logical
bean property value.
|
Date |
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, readData, writeDataaccumulateScalarTypes, format, getDbNullValue, getJdbcType, getLength, getType, isDbNull, isJdbcNative, loadIgnorepublic Date read(DataReader dataReader) throws SQLException
ScalarTyperead in interface ScalarDataReader<Date>read in interface ScalarType<Date>read in class ScalarTypeBaseDateTime<Date>SQLExceptionpublic void bind(DataBind b, Date value) throws SQLException
ScalarTypevalue may need to be converted from the logical bean property type to the JDBC type.
bind in interface ScalarDataReader<Date>bind in interface ScalarType<Date>bind in class ScalarTypeBaseDateTime<Date>SQLExceptionpublic 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 Date 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).
public Date convertFromTimestamp(Timestamp ts)
convertFromTimestamp in class ScalarTypeBaseDateTime<Date>public Timestamp convertToTimestamp(Date t)
convertToTimestamp in class ScalarTypeBaseDateTime<Date>public Date parseDateTime(long systemTimeMillis)
ScalarTypeFor non dateTime types this will throw an exception.
parseDateTime in interface ScalarType<Date>parseDateTime in class ScalarTypeBaseDateTime<Date>Copyright © 2014. All Rights Reserved.