org.apache.logging.log4j.core.appender.db.jpa.converter
Class ContextStackJsonAttributeConverter
java.lang.Object
org.apache.logging.log4j.core.appender.db.jpa.converter.ContextStackJsonAttributeConverter
- All Implemented Interfaces:
- javax.persistence.AttributeConverter<ThreadContext.ContextStack,String>
public class ContextStackJsonAttributeConverter
- extends Object
- implements javax.persistence.AttributeConverter<ThreadContext.ContextStack,String>
A JPA 2.1 attribute converter for
ThreadContext.ContextStack
s in
LogEvent
s. This converter is capable of converting both to and from
String
s.
In addition to other optional dependencies required by the JPA appender, this converter requires the Jackson Data
Processor.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ContextStackJsonAttributeConverter
public ContextStackJsonAttributeConverter()
convertToDatabaseColumn
public String convertToDatabaseColumn(ThreadContext.ContextStack contextStack)
- Specified by:
convertToDatabaseColumn
in interface javax.persistence.AttributeConverter<ThreadContext.ContextStack,String>
convertToEntityAttribute
public ThreadContext.ContextStack convertToEntityAttribute(String s)
- Specified by:
convertToEntityAttribute
in interface javax.persistence.AttributeConverter<ThreadContext.ContextStack,String>
Copyright © 1999-2015 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.