Class ThrowableAttributeConverter

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

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

    • ThrowableAttributeConverter

      public ThrowableAttributeConverter()
  • Method Details

    • convertToDatabaseColumn

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

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