public class ScalarTypeTimestamp extends ScalarTypeBaseDateTime<Timestamp>
jdbcNative, jdbcType, type| Constructor and Description |
|---|
ScalarTypeTimestamp() |
| Modifier and Type | Method and Description |
|---|---|
void |
bind(DataBind b,
Timestamp value)
Convert (if necessary) and bind the value to the preparedStatement.
|
Timestamp |
convertFromTimestamp(Timestamp ts) |
Timestamp |
convertToTimestamp(Timestamp t) |
Timestamp |
read(DataReader dataReader)
Read the value from the resultSet and convert if necessary to the logical
bean property value.
|
Timestamp |
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, readData, writeDataaccumulateScalarTypes, format, getDbNullValue, getJdbcType, getLength, getType, isDbNull, isJdbcNative, loadIgnorepublic Timestamp convertFromTimestamp(Timestamp ts)
convertFromTimestamp in class ScalarTypeBaseDateTime<Timestamp>public Timestamp convertToTimestamp(Timestamp t)
convertToTimestamp in class ScalarTypeBaseDateTime<Timestamp>public void bind(DataBind b, Timestamp value) throws SQLException
ScalarTypevalue may need to be converted from the logical bean property type to the JDBC type.
bind in interface ScalarDataReader<Timestamp>bind in interface ScalarType<Timestamp>bind in class ScalarTypeBaseDateTime<Timestamp>SQLExceptionpublic Timestamp read(DataReader dataReader) throws SQLException
ScalarTyperead in interface ScalarDataReader<Timestamp>read in interface ScalarType<Timestamp>read in class ScalarTypeBaseDateTime<Timestamp>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 Timestamp 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.