1 package de.juplo.jpa.converters;
3 import java.time.MonthDay;
4 import javax.persistence.AttributeConverter;
5 import javax.persistence.Converter;
9 * Converts a {@link MonthDay} into its {@link String} representation.
12 @Converter(autoApply = true)
13 public class MonthDayConverter implements AttributeConverter<MonthDay, String>
16 public String convertToDatabaseColumn(MonthDay monthday)
20 return monthday.toString();
24 public MonthDay convertToEntityAttribute(String string)
28 return MonthDay.parse(string);