question: static Object convertJavaTimeToJavaSql ( Object x ) { if ( x instanceof LocalDate ) { return Date . valueOf ( ( LocalDate ) x ) ; } else if ( x instanceof LocalDateTime ) { return Timestamp . valueOf ( ( LocalDateTime ) x ) ; } else if ( x instanceof LocalTime ) { return Time . valueOf ( ( LocalTime ) x ) ; } return x ; }
target:  JDBC 4.2 Helper methods.