Class NotNullStringConverter

java.lang.Object
sk.iway.iwcm.system.jpaconverters.NotNullStringConverter
All Implemented Interfaces:
javax.persistence.AttributeConverter<String,String>

public class NotNullStringConverter extends Object implements javax.persistence.AttributeConverter<String,String>
Converts NULL database value to empty string. Used mainly because Oracle can't store enpty strings.
  • Constructor Details

    • NotNullStringConverter

      public NotNullStringConverter()
  • Method Details

    • convertToDatabaseColumn

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

      public String convertToEntityAttribute(String dbData)
      Specified by:
      convertToEntityAttribute in interface javax.persistence.AttributeConverter<String,String>