Class InstantAttributeConverter

java.lang.Object
org.apache.logging.log4j.core.appender.db.jpa.converter.InstantAttributeConverter
All Implemented Interfaces:
javax.persistence.AttributeConverter<Instant,String>

public class InstantAttributeConverter extends Object implements javax.persistence.AttributeConverter<Instant,String>
A JPA 2.1 attribute converter for Instants in LogEvents. This converter is capable of converting both to and from Strings.
  • Constructor Details

    • InstantAttributeConverter

      public InstantAttributeConverter()
  • Method Details

    • convertToDatabaseColumn

      public String convertToDatabaseColumn(Instant instant)
      Specified by:
      convertToDatabaseColumn in interface javax.persistence.AttributeConverter<Instant,String>
    • convertToEntityAttribute

      public Instant convertToEntityAttribute(String s)
      Specified by:
      convertToEntityAttribute in interface javax.persistence.AttributeConverter<Instant,String>