Class ContextMapJsonAttributeConverter

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

public class ContextMapJsonAttributeConverter extends Object implements javax.persistence.AttributeConverter<Map<String,String>,String>
A JPA 2.1 attribute converter for Map<String, String>s in LogEvents. This converter is capable of converting both to and from Strings. In addition to other optional dependencies required by the JPA appender, this converter requires the Jackson Data Processor.
  • Constructor Details

    • ContextMapJsonAttributeConverter

      public ContextMapJsonAttributeConverter()
  • Method Details

    • convertToDatabaseColumn

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

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