Class ContextStackAttributeConverter
java.lang.Object
org.apache.logging.log4j.core.appender.db.jpa.converter.ContextStackAttributeConverter
- All Implemented Interfaces:
javax.persistence.AttributeConverter<ThreadContext.ContextStack,
String>
public class ContextStackAttributeConverter
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 only capable of converting to String
s. The
convertToEntityAttribute(String)
method throws an UnsupportedOperationException
. If you need to
support converting to an entity attribute, you should use the ContextStackJsonAttributeConverter
for
conversion both ways.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertToDatabaseColumn
(ThreadContext.ContextStack contextStack)
-
Constructor Details
-
ContextStackAttributeConverter
public ContextStackAttributeConverter()
-
-
Method Details
-
convertToDatabaseColumn
- Specified by:
convertToDatabaseColumn
in interfacejavax.persistence.AttributeConverter<ThreadContext.ContextStack,
String>
-
convertToEntityAttribute
- Specified by:
convertToEntityAttribute
in interfacejavax.persistence.AttributeConverter<ThreadContext.ContextStack,
String>
-