Skip to contentMethod: convertToAttribute(String)
1: package cz.cvut.kbss.jopa.test;
2:
3: import cz.cvut.kbss.jopa.model.AttributeConverter;
4: import cz.cvut.kbss.jopa.model.annotations.Converter;
5:
6: import java.time.ZoneOffset;
7:
8: @Converter
9: public class ZoneOffsetConverter implements AttributeConverter<ZoneOffset, String> {
10:
11: @Override
12: public String convertToAxiomValue(ZoneOffset value) {
13: return value.getId();
14: }
15:
16: @Override
17: public ZoneOffset convertToAttribute(String value) {
18: return ZoneOffset.of(value);
19: }
20: }