Class JsonMapConverter

  • All Implemented Interfaces:
    jakarta.persistence.AttributeConverter<Map<String,​Object>,​String>

    public class JsonMapConverter
    extends Object
    implements jakarta.persistence.AttributeConverter<Map<String,​Object>,​String>
    The JsonMapConverter class implements the JPA converter from Map to JSON string.
    • Constructor Detail

      • JsonMapConverter

        public JsonMapConverter()
    • Method Detail

      • convertToDatabaseColumn

        public String convertToDatabaseColumn​(Map<String,​Object> map)
        Specified by:
        convertToDatabaseColumn in interface jakarta.persistence.AttributeConverter<Map<String,​Object>,​String>
      • convertToEntityAttribute

        public Map<String,​Object> convertToEntityAttribute​(String str)
        Specified by:
        convertToEntityAttribute in interface jakarta.persistence.AttributeConverter<Map<String,​Object>,​String>