快速的Java bean映射框架:Orika
這是一個更簡單,更好,更快速的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。 </ul>
mapperFactory.classMap(BasicPerson.class, BasicPersonDto.class)
.mapNulls(true).mapNullsInReverse(true)
.field("field1", "fieldOne")
.mapNulls(false).mapNullsInReverse(false)
.field("field2", "fieldTwo")
.byDefault()
.register();
本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!