@Test public void localdates_are_converted_to_simple_dates_keeping_only_the_datefields() { final LocalDate localDate = LocalDate.of(1999, APRIL, 12); Date date = new LocalDateConverter().convertToDatabaseColumn(localDate); assertThat(date, is(equalTo(Date.valueOf(localDate)))); }
@Override public Date convertToDatabaseColumn(LocalDate localDate) { LOGGER.finest(() -> "Converting " + localDate + " to database"); if (null == localDate) { return null; } return Date.valueOf(localDate); }
LocalDateConverter implements AttributeConverter<LocalDate, Date> { @Override public Date convertToDatabaseColumn(LocalDate localDate) { LOGGER.finest(() -> "Converting " + localDate + " to database"); if (null == localDate) { return null; } return Date.valueOf(localDate); } }
LocalDateConverter implements AttributeConverter<LocalDate, Date> { @Override public Date convertToDatabaseColumn(LocalDate localDate) { LOGGER.finest(() -> "Converting " + localDate + " to database"); if (null == localDate) { return null; } return Date.valueOf(localDate); }  }
LocalDateConverter implements AttributeConverter<LocalDate, Date> { @Override public Date convertToDatabaseColumn(LocalDate localDate) { LOGGER.finest(() -> "Converting " + localDate + " to database"); if (null == localDate) { return null; } return Date.valueOf(localDate); }  @Override Date convertToDatabaseColumn(LocalDate localDate); @Override LocalDate convertToEntityAttribute(Date date); }
LocalDateConverter implements AttributeConverter<LocalDate, Date> { @Override public Date convertToDatabaseColumn(LocalDate localDate) { LOGGER.finest(() -> "Converting " + localDate + " to database"); if (null == localDate) { return null; } return Date.valueOf(localDate); }  @Override Date convertToDatabaseColumn(LocalDate localDate); @Override LocalDate convertToEntityAttribute(Date date);  }