Class ContextDataAttributeConverter
- java.lang.Object
-
- org.apache.logging.log4j.core.appender.db.jpa.converter.ContextDataAttributeConverter
-
- All Implemented Interfaces:
javax.persistence.AttributeConverter<ReadOnlyStringMap,java.lang.String>
public class ContextDataAttributeConverter extends java.lang.Object implements javax.persistence.AttributeConverter<ReadOnlyStringMap,java.lang.String>
A JPA 2.1 attribute converter forReadOnlyStringMap
s inLogEvent
s. This converter is only capable of converting toString
s. TheconvertToEntityAttribute(String)
method throws anUnsupportedOperationException
. If you need to support converting to an entity attribute, you should use theContextMapJsonAttributeConverter
for conversion both ways.
-
-
Constructor Summary
Constructors Constructor Description ContextDataAttributeConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
convertToDatabaseColumn(ReadOnlyStringMap contextData)
ReadOnlyStringMap
convertToEntityAttribute(java.lang.String s)
-
-
-
Method Detail
-
convertToDatabaseColumn
public java.lang.String convertToDatabaseColumn(ReadOnlyStringMap contextData)
- Specified by:
convertToDatabaseColumn
in interfacejavax.persistence.AttributeConverter<ReadOnlyStringMap,java.lang.String>
-
convertToEntityAttribute
public ReadOnlyStringMap convertToEntityAttribute(java.lang.String s)
- Specified by:
convertToEntityAttribute
in interfacejavax.persistence.AttributeConverter<ReadOnlyStringMap,java.lang.String>
-
-