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 forReadOnlyStringMaps 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 theContextMapJsonAttributeConverterfor conversion both ways.
-
-
Constructor Summary
Constructors Constructor Description ContextDataAttributeConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringconvertToDatabaseColumn(ReadOnlyStringMap contextData)ReadOnlyStringMapconvertToEntityAttribute(java.lang.String s)
-
-
-
Method Detail
-
convertToDatabaseColumn
public java.lang.String convertToDatabaseColumn(ReadOnlyStringMap contextData)
- Specified by:
convertToDatabaseColumnin interfacejavax.persistence.AttributeConverter<ReadOnlyStringMap,java.lang.String>
-
convertToEntityAttribute
public ReadOnlyStringMap convertToEntityAttribute(java.lang.String s)
- Specified by:
convertToEntityAttributein interfacejavax.persistence.AttributeConverter<ReadOnlyStringMap,java.lang.String>
-
-