【Java开源代码栏目提醒】:网学会员,鉴于大家对Java开源代码十分关注,论文会员在此为大家搜集整理了“CreditPrimaryKey.java”一文,供大家参考学习!
package ejava.ejbch36.credit;
import java.io.Serializable;
public class CreditPrimaryKey implements Serializable
{
public int customerID;
public int orderID;
public String cardNumber;
public int hashCode() { return super.hashCode(); }
public boolean equals(Object object)
{
if(object instanceof CreditPrimaryKey){
CreditPrimaryKey otherKey = (CreditPrimaryKey)object;
if( otherKey.orderID == orderID
&& otherKey.customerID == customerID
&& otherKey.cardNumber.equals(cardNumber)){
return true;
}
else{
return false;
}
}else {
return false;
}
}
}
上一篇:
CreditManagerSessionHome.java
下一篇:
2018年汽车自驾运动营地攻防箭大赛总决赛圆满落幕