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

}