终于明白了,一个完整的ORM持久化解决方案是将DB中的表映射为实体类(POJO)这里将DB中Table之间的关系实现映射需要经过特殊的设置。一对一,一对多,多对多。
基于122个网页-相关网页
The class should be public, and the fields should be private with a corresponding set of public getter and setter methods. Listing 8 shows a typical Java pojo.
类应当为public,并且字段应当为带有一组对应的public getter和setter方法的private。
Listing 2. Person POJO, take 2.
清单2。
Listing 3. Person POJO, take 3.
清单3。
应用推荐