快速的Java bean映射框架:Orika

jopen 10年前

这是一个更简单,更好,更快速的Java bean映射框架。

Orika能够让开发人员实现:

  • 映射复杂,更深层次的结构性对象
  • "Flatten" or "Expand" objects by mapping nested properties to top-level properties, and vice versa
  • Create mappers on-the-fly, and apply customizations to control some or all of the mapping
  • Create converters for complete control over the mapping of a specific set of objects anywhere in the object graph--by type, or even by specific property name
  • Handle proxies or enhanced objects (like those of Hibernate, or the various mock frameworks)
  • 利用同一个配置应用双向映射
  • 为目标的抽象类或接口映射到一个相应的具体类实例
  • 映射POJO属性成Lists, Arrays, 和 Maps。
mapperFactory.classMap(BasicPerson.class, BasicPersonDto.class)     .mapNulls(true).mapNullsInReverse(true)     .field("field1", "fieldOne")     .mapNulls(false).mapNullsInReverse(false)     .field("field2", "fieldTwo")     .byDefault()     .register();

项目主页:http://www.open-open.com/lib/view/home/1404892550700