EJB+CMP模式下数据表无主键怎么办? 建立cmp的时候会自动给你建立主键类的... 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 package testbmp;import java.io.*;public class StudentPK implements Serializable { public String studentId; public String classId; public StudentPK() { } public StudentPK(String studentId, String classId) { this.studentId = studentId; this.classId = classId; } public boolean equals(Object obj) { if (obj != null) { if (this.getClass().equals(obj.getClass())) { StudentPK that = (StudentPK) obj; return ( ( (this.studentId == null) && (that.studentId == null)) || (this.studentId != null && this.studentId.equals(that.studentId))) && ( ( (this.classId == null) && (that.classId == null)) || (this.classId != null && this.classId.equals(that.classId))); } } return false; } public int hashCode() { return (studentId + classId).hashCode(); }} struts遇到问题了 我的Servlet老是java.lang.NullPointerException 求高手指点 谁能给一个 WEB services实例 JAVA工程路径页面显示问题 在j2ee中,若不使用struts,hibernate,spring, 散分!www.crackj2ee.com正式开通,欢迎访问! 是不是可以用EJB三种BEAN中的哪一种代替数据库连接池? 关于CMP的一个问题 为什么运行j2ee -verbose出错? How to connect eclipse cvs depository by Eclipse 2.1? 我想问一下Swing和awt之间的区别
implements Serializable {
public String studentId;
public String classId; public StudentPK() {
} public StudentPK(String studentId, String classId) {
this.studentId = studentId;
this.classId = classId;
} public boolean equals(Object obj) {
if (obj != null) {
if (this.getClass().equals(obj.getClass())) {
StudentPK that = (StudentPK) obj;
return ( ( (this.studentId == null) && (that.studentId == null)) ||
(this.studentId != null && this.studentId.equals(that.studentId))) &&
( ( (this.classId == null) && (that.classId == null)) ||
(this.classId != null && this.classId.equals(that.classId)));
}
}
return false;
} public int hashCode() {
return (studentId + classId).hashCode();
}
}