Skip to content

Tag: java

Object is more then 1 child, now what?

I have an abstract class called Person. A person has multiple child classes e.g. Driver, Sorter, Manager. Each of which has its unique methods, and the ones shared e.g. name/age/location, etc and so I then thought that an abstract parent-class would be the solution. (Person) Yet now I face a new problem, What…

Convert nested map fields to snake case

how to convert all the nested fields of the following object rendered as json to snake_case? Given it’s read as a org.bson.Document, jackson object mapper won’t work as it’s designed for POJOs and it’s not possible to have POJOs here as the records are schema-less Answer It can be easi…

NoSuchMethodException in JDBI while using it with Lombok

I has immutable class like: JDBI Developer Guide states that it should work with @Value annotations. At least with bindBean() or @BindBean. But when I use org.jdbi.v3.core.result.ResultBearing#mapToBean method with MyEntry.class it throws java.lang.NoSuchMethodException: no such constructor: my.company.MyEntr…