Class NullToEmptyStringConverter

  • All Implemented Interfaces:
    PropertyConverter<java.lang.String,​java.lang.String>

    public class NullToEmptyStringConverter
    extends java.lang.Object
    implements PropertyConverter<java.lang.String,​java.lang.String>
    Used as a converter if a property is annotated with @DefaultValue("").
    • Constructor Detail

      • NullToEmptyStringConverter

        public NullToEmptyStringConverter()
    • Method Detail

      • convertToDatabaseValue

        public java.lang.String convertToDatabaseValue​(java.lang.String entityProperty)
        Specified by:
        convertToDatabaseValue in interface PropertyConverter<java.lang.String,​java.lang.String>
      • convertToEntityProperty

        public java.lang.String convertToEntityProperty​(@Nullable
                                                        java.lang.String databaseValue)
        Specified by:
        convertToEntityProperty in interface PropertyConverter<java.lang.String,​java.lang.String>