Class JdbcConversionUtils
java.lang.Object
com.broadleafcommerce.sandbox.provider.jpa.repository.support.JdbcConversionUtils
Contains common functionality useful for converting values between Java/JDBC representation.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Timestamp
instantToTimestamp
(Instant instant) Convert the givenInstant
into aTimestamp
representation that can be passed toPreparedStatement.setTimestamp(int, Timestamp)
.
-
Method Details
-
instantToTimestamp
Convert the given
Instant
into aTimestamp
representation that can be passed toPreparedStatement.setTimestamp(int, Timestamp)
.There are some quirks with how
Timestamp
is interpreted and converted byPreparedStatement.setTimestamp(int, Timestamp)
, which prevent us from using the same logic as Hibernate'sInstantJavaType.unwrap(Instant, Class, WrapperOptions)
to perform this conversion. More details can be seen in these sources:
-