Class ContextStackJsonAttributeConverter
- java.lang.Object
-
- org.apache.logging.log4j.core.appender.db.jpa.converter.ContextStackJsonAttributeConverter
-
- All Implemented Interfaces:
javax.persistence.AttributeConverter<ThreadContext.ContextStack,java.lang.String>
public class ContextStackJsonAttributeConverter extends java.lang.Object implements javax.persistence.AttributeConverter<ThreadContext.ContextStack,java.lang.String>
A JPA 2.1 attribute converter forThreadContext.ContextStack
s inLogEvent
s. This converter is capable of converting both to and fromString
s. In addition to other optional dependencies required by the JPA appender, this converter requires the Jackson Data Processor.
-
-
Constructor Summary
Constructors Constructor Description ContextStackJsonAttributeConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
convertToDatabaseColumn(ThreadContext.ContextStack contextStack)
ThreadContext.ContextStack
convertToEntityAttribute(java.lang.String s)
-
-
-
Method Detail
-
convertToDatabaseColumn
public java.lang.String convertToDatabaseColumn(ThreadContext.ContextStack contextStack)
- Specified by:
convertToDatabaseColumn
in interfacejavax.persistence.AttributeConverter<ThreadContext.ContextStack,java.lang.String>
-
convertToEntityAttribute
public ThreadContext.ContextStack convertToEntityAttribute(java.lang.String s)
- Specified by:
convertToEntityAttribute
in interfacejavax.persistence.AttributeConverter<ThreadContext.ContextStack,java.lang.String>
-
-