Class DurationToLongConverter

  • All Implemented Interfaces:
    javax.persistence.AttributeConverter<Duration,​Long>

    public class DurationToLongConverter
    extends Object
    implements javax.persistence.AttributeConverter<Duration,​Long>
    Since:
    0.47
    Author:
    Michiel Meeuwissen
    • Constructor Detail

      • DurationToLongConverter

        public DurationToLongConverter()
    • Method Detail

      • convertToDatabaseColumn

        public Long convertToDatabaseColumn​(Duration duration)
        Specified by:
        convertToDatabaseColumn in interface javax.persistence.AttributeConverter<Duration,​Long>
      • convertToEntityAttribute

        public Duration convertToEntityAttribute​(Long timestamp)
        Specified by:
        convertToEntityAttribute in interface javax.persistence.AttributeConverter<Duration,​Long>