1 package de.juplo.jpa.converters;
4 import java.time.LocalTime;
5 import javax.persistence.AttributeConverter;
6 import javax.persistence.Converter;
10 * Converts a {@link LocalTime} to a {@link Time}.
13 @Converter(autoApply = true)
14 public class LocalTimeConverter implements AttributeConverter<LocalTime, Time>
17 public Time convertToDatabaseColumn(LocalTime lt)
21 return Time.valueOf(lt);
25 public LocalTime convertToEntityAttribute(Time time)
29 return time.toLocalTime();