Package io.objectbox.converter
Class NullToEmptyStringConverter
- java.lang.Object
-
- io.objectbox.converter.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 Summary
Constructors Constructor Description NullToEmptyStringConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
convertToDatabaseValue(java.lang.String entityProperty)
java.lang.String
convertToEntityProperty(java.lang.String databaseValue)
-
-
-
Method Detail
-
convertToDatabaseValue
public java.lang.String convertToDatabaseValue(java.lang.String entityProperty)
- Specified by:
convertToDatabaseValue
in interfacePropertyConverter<java.lang.String,java.lang.String>
-
convertToEntityProperty
public java.lang.String convertToEntityProperty(@Nullable java.lang.String databaseValue)
- Specified by:
convertToEntityProperty
in interfacePropertyConverter<java.lang.String,java.lang.String>
-
-