1 32 33 34 42 package stockonline.ejb.entity.interf; 43 44 47 public class StockHoldingPK implements java.io.Serializable 48 { 49 public int sub_accno; 50 public int stock_id; 51 52 public StockHoldingPK() {} 53 54 public StockHoldingPK(int sub_accno, int stock_id) 55 { 56 this.sub_accno = sub_accno; 57 this.stock_id = stock_id; 58 } 59 60 public int hashCode() 61 { 62 return sub_accno ^ stock_id; 63 } 64 65 public boolean equals(Object other) 66 { 67 if (other != null && other instanceof StockHoldingPK) 68 return ((StockHoldingPK)other).sub_accno == this.sub_accno && 69 ((StockHoldingPK)other).stock_id == this.stock_id; 70 else 71 return false; 72 } 73 } 74 | Popular Tags |