Class AddressConverter

  • All Implemented Interfaces:
    javax.persistence.AttributeConverter<com.broadleafcommerce.order.common.domain.Address,​String>

    public class AddressConverter
    extends Object
    implements javax.persistence.AttributeConverter<com.broadleafcommerce.order.common.domain.Address,​String>
    Used to convert an Address to a serialized JSON object string representation for persistence and vice-versa.
    Author:
    Samarth Dhruva (samarthd)
    • Constructor Detail

      • AddressConverter

        public AddressConverter​(@Nullable @Qualifier("converterObjectMapper")
                                com.fasterxml.jackson.databind.ObjectMapper objectMapper)
    • Method Detail

      • convertToDatabaseColumn

        public String convertToDatabaseColumn​(com.broadleafcommerce.order.common.domain.Address attribute)
        Specified by:
        convertToDatabaseColumn in interface javax.persistence.AttributeConverter<com.broadleafcommerce.order.common.domain.Address,​String>
      • convertToEntityAttribute

        public com.broadleafcommerce.order.common.domain.Address convertToEntityAttribute​(String dbData)
        Specified by:
        convertToEntityAttribute in interface javax.persistence.AttributeConverter<com.broadleafcommerce.order.common.domain.Address,​String>
      • getObjectMapper

        public com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()