Class DateTimeConverter

java.lang.Object
google.registry.persistence.converter.DateTimeConverter
All Implemented Interfaces:
jakarta.persistence.AttributeConverter<org.joda.time.DateTime,ZonedDateTime>

public class DateTimeConverter extends Object implements jakarta.persistence.AttributeConverter<org.joda.time.DateTime,ZonedDateTime>
JPA converter to for storing/retrieving DateTime objects.
  • Constructor Details

    • DateTimeConverter

      public DateTimeConverter()
  • Method Details

    • convertToDatabaseColumn

      @Nullable public ZonedDateTime convertToDatabaseColumn(@Nullable org.joda.time.DateTime attribute)
      Specified by:
      convertToDatabaseColumn in interface jakarta.persistence.AttributeConverter<org.joda.time.DateTime,ZonedDateTime>
    • convertToEntityAttribute

      @Nullable public org.joda.time.DateTime convertToEntityAttribute(@Nullable ZonedDateTime dbData)
      Specified by:
      convertToEntityAttribute in interface jakarta.persistence.AttributeConverter<org.joda.time.DateTime,ZonedDateTime>