hedera-mirror-node
hedera-mirror-node copied to clipboard
Use spring ConversionService for type conversion in rest-java `DomainRecordMapper`
Problem
The type conversion logic in DomainRecordMapper which converts several data types in jooq Record class to types in our domain classes are verbose and brittle. Namely
- jooq
EnumTypeto our domainenumclasses - jooq
Shortto our domainenumclasses - jooq
LongRangetoRange<Long>, most of them are timestamp ranges -
LongtoEntityId - Different Number types
Solution
Register converters and use Spring ConversionService. Note, it may not be possible to do the same for JSONB to parameterized Collection type conversion, since it requires the parameterized type as well.
Alternatives
No response