Class DateTimeConverter

  • All Implemented Interfaces:
    javax.persistence.AttributeConverter<org.joda.time.DateTime,​java.sql.Timestamp>

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

      • DateTimeConverter

        public DateTimeConverter()
    • Method Detail

      • convertToDatabaseColumn

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

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