Package io.objectbox.converter
Class StringLongMapConverter
- java.lang.Object
-
- io.objectbox.converter.FlexObjectConverter
-
- io.objectbox.converter.StringFlexMapConverter
-
- io.objectbox.converter.StringLongMapConverter
-
- All Implemented Interfaces:
io.objectbox.converter.PropertyConverter<java.lang.Object,byte[]>
public class StringLongMapConverter extends StringFlexMapConverter
Used to automatically convertMap<String, Long>.
-
-
Constructor Summary
Constructors Constructor Description StringLongMapConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanshouldRestoreAsLong(FlexBuffers.Reference reference)Returns true if the width in bytes stored in the private parentWidth field of FlexBuffers.Reference is 8.-
Methods inherited from class io.objectbox.converter.FlexObjectConverter
checkMapKeyType, convertToDatabaseValue, convertToEntityProperty
-
-
-
-
Method Detail
-
shouldRestoreAsLong
protected boolean shouldRestoreAsLong(FlexBuffers.Reference reference)
Description copied from class:FlexObjectConverterReturns true if the width in bytes stored in the private parentWidth field of FlexBuffers.Reference is 8. Note: FlexBuffers stores all items in a map/vector using the size of the widest item. However, an item's size is only as wide as needed, e.g. a 64-bit integer (Java Long, 8 bytes) will be reduced to 1 byte if it does not exceed its value range.- Overrides:
shouldRestoreAsLongin classFlexObjectConverter
-
-