?? bid.java
字號:
package org.yeeku.model;
import java.util.Date;
import java.io.Serializable;
/**
* @author yeeku.H.lee kongyeeku@163.com
* @version 1.0
* <br>Copyright (C), 2005-2008, yeeku.H.Lee
* <br>This program is protected by copyright laws.
* <br>Program Name:
* <br>Date:
*/
public class Bid implements Serializable
{
//標識屬性,對應數據表的邏輯主鍵
private Integer id;
//競價的價格
private double bidPrice;
//競價的日期
private Date bidDate;
//所競價的物品
private Item bidItem;
//參與競價的用戶
private AuctionUser bidUser;
public Date getBidDate() {
return bidDate;
}
public void setBidDate(Date bidDate) {
this.bidDate = bidDate;
}
public Item getBidItem() {
return bidItem;
}
public void setBidItem(Item bidItem) {
this.bidItem = bidItem;
}
public double getBidPrice() {
return bidPrice;
}
public void setBidPrice(double bidPrice) {
this.bidPrice = bidPrice;
}
public AuctionUser getBidUser() {
return bidUser;
}
public void setBidUser(AuctionUser bidUser) {
this.bidUser = bidUser;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public int hashCode()
{
return bidUser.getUsername().hashCode() + bidItem.hashCode() + (int)bidPrice;
}
public boolean equals(Object obj)
{
if (obj instanceof Bid)
{
Bid bid = (Bid)obj;
if (bid.getBidUser().getUsername().equals(bidUser.getUsername())
&& bid.getBidItem().equals(bidItem)
&& bid.getBidPrice() == bidPrice)
{
return true;
}
}
return false;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -