Class JsonAttributeConverter
java.lang.Object
com.netflix.genie.web.data.services.impl.jpa.converters.JsonAttributeConverter
- All Implemented Interfaces:
javax.persistence.AttributeConverter<com.fasterxml.jackson.databind.JsonNode,
String>
public class JsonAttributeConverter
extends Object
implements javax.persistence.AttributeConverter<com.fasterxml.jackson.databind.JsonNode,String>
An
AttributeConverter
to convert JsonNode
objects into their String representations for storage
and vice versa.- Since:
- 4.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertToDatabaseColumn
(com.fasterxml.jackson.databind.JsonNode attribute) com.fasterxml.jackson.databind.JsonNode
convertToEntityAttribute
(String dbData)
-
Constructor Details
-
JsonAttributeConverter
public JsonAttributeConverter()
-
-
Method Details
-
convertToDatabaseColumn
@Nullable public String convertToDatabaseColumn(@Nullable com.fasterxml.jackson.databind.JsonNode attribute) - Specified by:
convertToDatabaseColumn
in interfacejavax.persistence.AttributeConverter<com.fasterxml.jackson.databind.JsonNode,
String>
-
convertToEntityAttribute
@Nullable public com.fasterxml.jackson.databind.JsonNode convertToEntityAttribute(@Nullable String dbData) - Specified by:
convertToEntityAttribute
in interfacejavax.persistence.AttributeConverter<com.fasterxml.jackson.databind.JsonNode,
String>
-