Class ContextDataAttributeConverter
java.lang.Object
org.apache.logging.log4j.core.appender.db.jpa.converter.ContextDataAttributeConverter
- All Implemented Interfaces:
javax.persistence.AttributeConverter<org.apache.logging.log4j.util.ReadOnlyStringMap,String>
public class ContextDataAttributeConverter
extends Object
implements javax.persistence.AttributeConverter<org.apache.logging.log4j.util.ReadOnlyStringMap,String>
A JPA 2.1 attribute converter for
ReadOnlyStringMaps in
LogEvents. This converter is only capable of converting to Strings. The
convertToEntityAttribute(String) method throws an UnsupportedOperationException. If you need to
support converting to an entity attribute, you should use the ContextMapJsonAttributeConverter for conversion
both ways.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertToDatabaseColumn(org.apache.logging.log4j.util.ReadOnlyStringMap contextData) org.apache.logging.log4j.util.ReadOnlyStringMap
-
Constructor Details
-
ContextDataAttributeConverter
public ContextDataAttributeConverter()
-
-
Method Details
-
convertToDatabaseColumn
- Specified by:
convertToDatabaseColumnin interfacejavax.persistence.AttributeConverter<org.apache.logging.log4j.util.ReadOnlyStringMap,String>
-
convertToEntityAttribute
- Specified by:
convertToEntityAttributein interfacejavax.persistence.AttributeConverter<org.apache.logging.log4j.util.ReadOnlyStringMap,String>
-