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;
}

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 ; }
jdbc 4 . 2 helper methods .
