Package io.objectbox.converter
Interface PropertyConverter<P,D>
- All Known Implementing Classes:
FlexObjectConverter
,IntegerFlexMapConverter
,IntegerLongMapConverter
,LongFlexMapConverter
,LongLongMapConverter
,NullToEmptyStringConverter
,StringFlexMapConverter
,StringLongMapConverter
,StringMapConverter
public interface PropertyConverter<P,D>
To use custom types in your entity, implement this to convert db values to entity values and back.
Notes for implementations:
- Converters are created by the default constructor
- Converters must be implemented thread-safe
- Converters must not interact with the database (such as using Box or BoxStore)
- Converters must handle null values
-
Method Summary
Modifier and TypeMethodDescriptionconvertToDatabaseValue
(P entityProperty) convertToEntityProperty
(D databaseValue)
-
Method Details
-
convertToEntityProperty
-
convertToDatabaseValue
-