java.lang.Object
com.broadleafcommerce.paymenttransaction.provider.jpa.domain.support.SingleAddressConverter
All Implemented Interfaces:
jakarta.persistence.AttributeConverter<Address,String>

public class SingleAddressConverter extends Object implements jakarta.persistence.AttributeConverter<Address,String>
Used to convert an Address to a serialized JSON object string representation for persistence and vice-versa.

Until AddressConverter is refactored to convert a single Address, this converter should be used.

  • Constructor Details

    • SingleAddressConverter

      public SingleAddressConverter(@Nullable @Qualifier("converterObjectMapper") com.fasterxml.jackson.databind.ObjectMapper objectMapper)
  • Method Details

    • convertToDatabaseColumn

      public String convertToDatabaseColumn(Address attribute)
      Specified by:
      convertToDatabaseColumn in interface jakarta.persistence.AttributeConverter<Address,String>
    • convertToEntityAttribute

      public Address convertToEntityAttribute(String dbData)
      Specified by:
      convertToEntityAttribute in interface jakarta.persistence.AttributeConverter<Address,String>
    • getObjectMapper

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