@Test public void localdatetimes_are_converted_to_timestamps() { final LocalDateTime localDate = LocalDateTime.of(1999, APRIL, 12, 10, 12, 10, 10); Timestamp timestamp = new LocalDateTimeConverter().convertToDatabaseColumn(localDate); assertThat(timestamp, is(equalTo(Timestamp.valueOf(localDate)))); }
@Override public Timestamp convertToDatabaseColumn(LocalDateTime localDateTime) { if (null == localDateTime) { return null; } return Timestamp.valueOf(localDateTime); }
LocalDateTimeConverter implements AttributeConverter<LocalDateTime, Timestamp> { @Override public Timestamp convertToDatabaseColumn(LocalDateTime localDateTime) { if (null == localDateTime) { return null; } return Timestamp.valueOf(localDateTime); } }
LocalDateTimeConverter implements AttributeConverter<LocalDateTime, Timestamp> { @Override public Timestamp convertToDatabaseColumn(LocalDateTime localDateTime) { if (null == localDateTime) { return null; } return Timestamp.valueOf(localDateTime); }  }
LocalDateTimeConverter implements AttributeConverter<LocalDateTime, Timestamp> { @Override public Timestamp convertToDatabaseColumn(LocalDateTime localDateTime) { if (null == localDateTime) { return null; } return Timestamp.valueOf(localDateTime); }  @Override Timestamp convertToDatabaseColumn(LocalDateTime localDateTime); @Override LocalDateTime convertToEntityAttribute(Timestamp dbData); }
LocalDateTimeConverter implements AttributeConverter<LocalDateTime, Timestamp> { @Override public Timestamp convertToDatabaseColumn(LocalDateTime localDateTime) { if (null == localDateTime) { return null; } return Timestamp.valueOf(localDateTime); }  @Override Timestamp convertToDatabaseColumn(LocalDateTime localDateTime); @Override LocalDateTime convertToEntityAttribute(Timestamp dbData);  }