EsiteUserShoppingCartPK.java
上传用户:jnhyscl
上传日期:2010-03-08
资源大小:345k
文件大小:1k
- 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();
- }
- }