I’m happy to announce the second release of BeanPurée library.
The main goal of this release is to make
BeanConverter more intelligent. Previously, it required you to have the same type for the corresponding fields in a bean and a product. If there are Java number classes in your beans, it’s possible you don’t want to use it in your Scala code. Instead, you would like to use Options, or you may know that these values are never null.
BeanConverter can do these kinds of transformations for you.
JavaTypeMapper type class was introduced to acheive that. It provides two-way conversions for the following cases:
scala.math.BigDecimal. If Java value is null it throws NullPointerException.
Option[T]. Wraps nullable to Option.
Tfor which an instance of
Uis available to an
Option[U]. For example it is used to convert
HListof the elements which can be mapped with
JavaTypeMappers, to HList of mapped values.
If you want to have a previous behavior from