org.apache.logging.log4j.core.appender.db.jpa.converter
Class ContextMapJsonAttributeConverter

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

public class ContextMapJsonAttributeConverter
extends Object
implements 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 Summary
ContextMapJsonAttributeConverter()
           
 
Method Summary
 String convertToDatabaseColumn(Map<String,String> contextMap)
           
 Map<String,String> convertToEntityAttribute(String s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContextMapJsonAttributeConverter

public ContextMapJsonAttributeConverter()
Method Detail

convertToDatabaseColumn

public String convertToDatabaseColumn(Map<String,String> contextMap)
Specified by:
convertToDatabaseColumn in interface AttributeConverter<Map<String,String>,String>

convertToEntityAttribute

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


Copyright © 1999-2014 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.