OMapper對象關(guān)系映射
OMapper 提供了一個(gè)簡單的庫用來簡化對象/Bean 與其他設(shè)計(jì)層面的映射,使用 Java 的注解。
示例代碼:
/**
* The Class Bean2.
*/
@Mappable
public class Bean2 {
/** The name. */
@Source(type = org.omapper.test.Bean1.class, property = "name")
private String name;
/** The address. */
@Source(type = Bean1.class, property = "address")
private String address;
/** The age. */
@Source(type = Bean1.class, property = "age")
private int age;
/** The emp_id. */
@Source(type = Bean1.class, property = "emp_id")
private Integer emp_id;
}
評論
圖片
表情
