Class JpaJsonConverter<T>

  • All Implemented Interfaces:
    javax.persistence.AttributeConverter<T,​String>

    public abstract class JpaJsonConverter<T>
    extends Object
    implements javax.persistence.AttributeConverter<T,​String>
    Jpa converter from an to json string
    • Constructor Detail

      • JpaJsonConverter

        public JpaJsonConverter()
    • Method Detail

      • convertToDatabaseColumn

        public String convertToDatabaseColumn​(T entity)
        Specified by:
        convertToDatabaseColumn in interface javax.persistence.AttributeConverter<T,​String>
      • convertToEntityAttribute

        public T convertToEntityAttribute​(String json)
        Specified by:
        convertToEntityAttribute in interface javax.persistence.AttributeConverter<T,​String>
      • getObjectMapper

        protected com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
      • getEntityClass

        protected abstract Class<T> getEntityClass()