This feature allows to set/get timestamp column in table using simple Long value. It can be useful when you have not direct control over queries and result interpretation as if you using driver in frameworks like WSO2.
Now you can use both variants in setting:
pstatement.setObject(11, new Timestamp(now.getTime()));
pstatement.setObject(11, now.getTime());
and getting of timestamps:
Long res1 = resultSet.getLong("timestamp_col1");
Timestamp res2 = resultSet.getTimestamp("timestamp_col2");
This feature allows to set/get timestamp column in table using simple Long value. It can be useful when you have not direct control over queries and result interpretation as if you using driver in frameworks like WSO2.
Now you can use both variants in setting: pstatement.setObject(11, new Timestamp(now.getTime())); pstatement.setObject(11, now.getTime());
and getting of timestamps: Long res1 = resultSet.getLong("timestamp_col1"); Timestamp res2 = resultSet.getTimestamp("timestamp_col2");
https://datastax.github.io/java-driver/manual/custom_codecs/