Class DateTimeConverter

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

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

    • DateTimeConverter

      public DateTimeConverter()
  • Method Details

    • convertToDatabaseColumn

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

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