- 博客(6)
- 收藏
- 关注
原创 实体身份entity identity
实体字段的类型必须是 primitives, primitive wrappers, Strings, Dates, Timestamps, 或者是embeddable 身份类identity class必须是 public. 必须可以被序列化. 必须有无参数的构造函数. The names of the non-static f
2010-02-05 11:18:00
419
原创 JPA中持久化类的限制
1.必须有一个无参数的构造函数2.不能定义成final类,实体中的方法也不能是final3.必须定义身份字段,或者主键4.版本字段,JPA用它来检测对同一条记录的并发操作5.继承,支持持久化类继承非持久化类,持久化类继承其它持久化类,非持久化类继承持久化类.但需要主要几点:不能继承系统类,如java.net.Socket and java.lang.Thread
2010-02-05 10:25:00
535
原创 JPA 实体Entity
JPA可以识别2种类型的持久化类:entity类和embeddable类。 1.一个entity对应一个数据库中的记录,可以使用EntityManager通过ID查找一个entity,也可以使用query查找符合一定条件的实体entity 2.embeddable只能作为独立实体一部分存储,它没有ID,不能通过Enti
2010-02-05 10:12:00
271
原创 JPA的体系结构
JPA中主要组件和关系:Persistence: 包含获取EntityManagerFactory 实例的静态方法.如:EntityManagerFactory emf = Persistence.createEntityManagerFactory("ssojpa");EntityManagerFactory
2010-02-05 09:55:00
336
原创 Servlet请求转发 RequestDispatcher接口( 转载)
Servlet请求转发 RequestDispatcher接口 <!-- document.body.oncopy = function() { if (window.clipboardData
2010-02-02 10:44:00
495
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人