简体   繁体   English

是否有 Java 库来合并数据 model?

[英]Is there a Java library to merge data model?

We want to merge 2 set of data using the same model:我们要使用相同的 model 合并 2 组数据:
we have 2 databases that have the same DDL, but containing different data.我们有 2 个数据库,它们具有相同的 DDL,但包含不同的数据。
We want to merge both and save the result.我们想合并两者并保存结果。 Merge should be configurable to allow us to write some rules.合并应该是可配置的,以允许我们编写一些规则。

Do you known any framework / library able to do that?你知道任何框架/库能够做到这一点吗?

You can explore Dozer for this purpose.为此,您可以探索推土机

Dozer is a Java Bean to Java Bean mapper that recursively copies data from one object to another. Dozer 是一个 Java Bean 到 Java Bean 映射器,它递归地将数据从一个 object 复制到另一个。 Typically, these Java Beans will be of different complex types.通常,这些 Java Bean 将具有不同的复杂类型。 Dozer supports simple property mapping, complex type mapping, bi-directional mapping, implicit-explicit mapping, as well as recursive mapping. Dozer 支持简单属性映射、复杂类型映射、双向映射、隐式-显式映射以及递归映射。 This includes mapping collection attributes that also need mapping at the element level.这包括映射集合属性,这些属性也需要在元素级别进行映射。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM