Class NullToEmptyStringConverter

java.lang.Object
io.objectbox.converter.NullToEmptyStringConverter
All Implemented Interfaces:
io.objectbox.converter.PropertyConverter<String,String>

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

    • NullToEmptyStringConverter

      public NullToEmptyStringConverter()
  • Method Details

    • convertToDatabaseValue

      public String convertToDatabaseValue(String entityProperty)
      Specified by:
      convertToDatabaseValue in interface io.objectbox.converter.PropertyConverter<String,String>
    • convertToEntityProperty

      public String convertToEntityProperty(@Nullable String databaseValue)
      Specified by:
      convertToEntityProperty in interface io.objectbox.converter.PropertyConverter<String,String>