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 Details

    • JsonAttributeConverter

      public JsonAttributeConverter()
  • Method Details

    • convertToDatabaseColumn

      @Nullable public String convertToDatabaseColumn(@Nullable com.fasterxml.jackson.databind.JsonNode attribute)
      Specified by:
      convertToDatabaseColumn in interface javax.persistence.AttributeConverter<com.fasterxml.jackson.databind.JsonNode,String>
    • convertToEntityAttribute

      @Nullable public com.fasterxml.jackson.databind.JsonNode convertToEntityAttribute(@Nullable String dbData)
      Specified by:
      convertToEntityAttribute in interface javax.persistence.AttributeConverter<com.fasterxml.jackson.databind.JsonNode,String>