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