Class ContextStackAttributeConverter
- java.lang.Object
-
- org.apache.logging.log4j.core.appender.db.jpa.converter.ContextStackAttributeConverter
-
- All Implemented Interfaces:
javax.persistence.AttributeConverter<ThreadContext.ContextStack,java.lang.String>
public class ContextStackAttributeConverter 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 only capable of converting toStrings. TheconvertToEntityAttribute(String)method throws anUnsupportedOperationException. If you need to support converting to an entity attribute, you should use theContextStackJsonAttributeConverterfor conversion both ways.
-
-
Constructor Summary
Constructors Constructor Description ContextStackAttributeConverter()
-
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>
-
-