esiteusershoppingcartpk.java
来自「大型EJB项目的代码,上传让大家看看,希望得到会员的资格,可以下到好的代码来学习」· Java 代码 · 共 43 行
JAVA
43 行
package shiponline;
import java.io.*;
public class EsiteUserShoppingCartPK
implements Serializable {
public Integer user;
public Integer shoppingCartUserid;
public Integer shoppingCartInventoryid;
public EsiteUserShoppingCartPK() {
}
public EsiteUserShoppingCartPK(Integer user, Integer shoppingCartUserid,
Integer shoppingCartInventoryid) {
this.user = user;
this.shoppingCartUserid = shoppingCartUserid;
this.shoppingCartInventoryid = shoppingCartInventoryid;
}
public boolean equals(Object obj) {
if (obj != null) {
if (this.getClass().equals(obj.getClass())) {
EsiteUserShoppingCartPK that = (EsiteUserShoppingCartPK) obj;
return ( ( (this.user == null) && (that.user == null)) ||
(this.user != null && this.user.equals(that.user))) &&
( ( (this.shoppingCartUserid == null) && (that.shoppingCartUserid == null)) ||
(this.shoppingCartUserid != null &&
this.shoppingCartUserid.equals(that.shoppingCartUserid))) &&
( ( (this.shoppingCartInventoryid == null) &&
(that.shoppingCartInventoryid == null)) ||
(this.shoppingCartInventoryid != null &&
this.shoppingCartInventoryid.equals(that.shoppingCartInventoryid)));
}
}
return false;
}
public int hashCode() {
return (user + "" + shoppingCartUserid + shoppingCartInventoryid).hashCode();
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?