X-Git-Url: https://juplo.de/gitweb/?p=jpa-converters;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fde%2Fjuplo%2Fjpa%2Fconverters%2FLocalDateConverter.java;h=26066027238ad261a0a3d9a0710c593015b8e9ed;hp=d6a5c51bf4e09bbb40358533622287c1000c9a7d;hb=459423649abd980aee3f093606281819bbe4b83e;hpb=7a11c7d53d9546aa639a2e960811e321805ec643 diff --git a/src/main/java/de/juplo/jpa/converters/LocalDateConverter.java b/src/main/java/de/juplo/jpa/converters/LocalDateConverter.java index d6a5c51..2606602 100644 --- a/src/main/java/de/juplo/jpa/converters/LocalDateConverter.java +++ b/src/main/java/de/juplo/jpa/converters/LocalDateConverter.java @@ -1,25 +1,13 @@ package de.juplo.jpa.converters; -import java.time.Instant; +import java.sql.Date; import java.time.LocalDate; -import java.time.LocalDateTime; -import java.time.LocalTime; -import java.time.ZoneOffset; -import java.util.Date; import javax.persistence.AttributeConverter; import javax.persistence.Converter; /** - * Converts a {@link LocalDate} to a {@link Date}, by converting it into - * an {@Instant} for the GMT-timezone at {@link LocalTime.MIDNIGHT} and then - * convering that {@link Instant} into a {@link Date} as suggested in the - * official Java 8 Time tutorial. - *
- * The {@link Date} can then be persisted as
- * {@link java.persistene.TemporalType.DATE} with the help of the
- * {@link java.persist.Tmporal}-annotation.
- * @see https://docs.oracle.com/javase/tutorial/datetime/iso/legacy.html
+ * Converts a {@link LocalDate} to a {@link Date}.
* @author Kai Moritz
*/
@Converter(autoApply = true)
@@ -28,12 +16,12 @@ public class LocalDateConverter implements AttributeConverter