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.ContextStacks inLogEvents. This converter is capable of converting both to and fromStrings. 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.StringconvertToDatabaseColumn(ThreadContext.ContextStack contextStack)ThreadContext.ContextStackconvertToEntityAttribute(java.lang.String s)
-
-
-
Method Detail
-
convertToDatabaseColumn
public java.lang.String convertToDatabaseColumn(ThreadContext.ContextStack contextStack)
- Specified by:
convertToDatabaseColumnin interfacejavax.persistence.AttributeConverter<ThreadContext.ContextStack,java.lang.String>
-
convertToEntityAttribute
public ThreadContext.ContextStack convertToEntityAttribute(java.lang.String s)
- Specified by:
convertToEntityAttributein interfacejavax.persistence.AttributeConverter<ThreadContext.ContextStack,java.lang.String>
-
-