String substaid, String lineid,String linename, BigDecimal voltagein,Integer ismaster我有的是SQLSERVER数据库,这个表中有两个主键(String substaid, String lineid),我要在其它的方法中调用findByPrimaryKey 怎么写啊 public LineinfoRemote createAll(String substaid, String lineid,
String linename, BigDecimal voltagein,
Integer ismaster) throws CreateException, RemoteException; public LineinfoRemote findByPrimaryKey(LineinfoPK pk) throws FinderException,
RemoteException;
String linename, BigDecimal voltagein,
Integer ismaster) throws CreateException, RemoteException; public LineinfoRemote findByPrimaryKey(LineinfoPK pk) throws FinderException,
RemoteException;
解决方案 »
- 新手,请教input type=text问题
- 关于JSP与servlet的重定向问题
- not-found="ignore" 问题
- JREPORT 问题,很急~~谢谢大家
- css 问题,急急急急!!!!
- 触发器的实现,进者有分
- win7系统,自动安装CA根证书的问题都是CA免费的根证书,XP系统自动安装到了“收信人的根证书颁发机构”,win7却不受信任,有没有什么颁发呢
- 求:JDBC连接SQLSERVER的JAVABEAN
- 急++ , 读xml相关问题
- server.xml问题
- 急招网站开发程序员(J2EE)++++++++++++++++++++++++++++++++++
- 如何把某个页面的所有邮件地址提取出来呀
你试试看!
这是我EJB里自动产生的public class LineinfoPK
implements Serializable {
public String substaid;
public String lineid;
public LineinfoPK() {
} public LineinfoPK(String substaid, String lineid) {
this.substaid = substaid;
this.lineid = lineid;
} public boolean equals(Object obj) {
if (this == obj)
return true;
if (! (obj instanceof LineinfoPK))
return false;
LineinfoPK that = (LineinfoPK) obj;
if (! (that.substaid == null ? this.substaid == null :
that.substaid.equals(this.substaid)))
return false;
if (! (that.lineid == null ? this.lineid == null :
that.lineid.equals(this.lineid)))
return false;
return true;
} public int hashCode() {
int result = 17;
result = 37 * result + this.substaid.hashCode();
result = 37 * result + this.lineid.hashCode();
return result;
}
}
LineinfoRemote ejb = Lineinfohome.findByPrimaryKey(pk); public int deleteLineinfo(String substaid, String lineid) {
int back = -1;
LineinfoPK pk=new LineinfoPK(substaid,lineid);
LineinfoRemote ejb = Lineinfohome.findByPrimaryKey(pk);
return 0;
}