X-Git-Url: https://juplo.de/gitweb/?p=jpa-converters;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fde%2Fjuplo%2Fjpa%2Fconverters%2FOffsetTimeConverter.java;h=92de0a9fc49eb2cb977702cad1e3db7a3631356a;hp=4543950c149c3737acb9013b4559dc698736cb5d;hb=459423649abd980aee3f093606281819bbe4b83e;hpb=7a11c7d53d9546aa639a2e960811e321805ec643 diff --git a/src/main/java/de/juplo/jpa/converters/OffsetTimeConverter.java b/src/main/java/de/juplo/jpa/converters/OffsetTimeConverter.java index 4543950..92de0a9 100644 --- a/src/main/java/de/juplo/jpa/converters/OffsetTimeConverter.java +++ b/src/main/java/de/juplo/jpa/converters/OffsetTimeConverter.java @@ -1,43 +1,29 @@ package de.juplo.jpa.converters; -import java.time.Instant; -import java.time.LocalDate; +import java.sql.Time; import java.time.OffsetTime; import java.time.ZoneOffset; -import java.time.ZonedDateTime; -import java.util.GregorianCalendar; import javax.persistence.AttributeConverter; import javax.persistence.Converter; /** - * Converts an {@link OffsetTime} to a {@link GregorianCalendar}, by converting - * it into a {@ZonedDateTime} at the date of {@link Instant.EPOCH} and - * then convering that {@link ZonedDateTime} into a {@link GregorianCalendar} - * as suggested in the official Java 8 Time tutorial. - *
- * The {@link GregorianCalendar} can then be persisted as
- * {@link java.persistene.TemporalType.TIME} with the help of the
- * {@link java.persist.Tmporal}-annotation.
- * @see https://docs.oracle.com/javase/tutorial/datetime/iso/legacy.html
+ * Converts an {@link OffsetTime} to a {@link Time}.
* @author Kai Moritz
*/
@Converter(autoApply = true)
-public class OffsetTimeConverter implements AttributeConverter