⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 basebid.java

📁 网上拍卖系统源代码用java+jsp实现
💻 JAVA
字号:
package org.yeeku.model.base;

import java.lang.Comparable;
import java.io.Serializable;


/**
 * This is an object that contains data related to the bid table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="bid"
 */

public abstract class BaseBid  implements Comparable, Serializable {

	public static String REF = "Bid";
	public static String PROP_BID_PRICE = "BidPrice";
	public static String PROP_BID_ITEM = "BidItem";
	public static String PROP_BID_DATE = "BidDate";
	public static String PROP_ID = "Id";
	public static String PROP_BID_USER = "BidUser";


	// constructors
	public BaseBid () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseBid (java.lang.Integer id) {
		this.setId(id);
		initialize();
	}

	/**
	 * Constructor for required fields
	 */
	public BaseBid (
		java.lang.Integer id,
		org.yeeku.model.Item bidItem,
		org.yeeku.model.AuctionUser bidUser,
		java.lang.Double bidPrice,
		java.util.Date bidDate) {

		this.setId(id);
		this.setBidItem(bidItem);
		this.setBidUser(bidUser);
		this.setBidPrice(bidPrice);
		this.setBidDate(bidDate);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Integer id;

	// fields
	private java.lang.Double bidPrice;
	private java.util.Date bidDate;

	// many to one
	private org.yeeku.model.Item bidItem;
	private org.yeeku.model.AuctionUser bidUser;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="increment"
     *  column="bid_id"
     */
	public java.lang.Integer getId () {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * @param id the new ID
	 */
	public void setId (java.lang.Integer id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: bid_price
	 */
	public java.lang.Double getBidPrice () {
		return bidPrice;
	}

	/**
	 * Set the value related to the column: bid_price
	 * @param bidPrice the bid_price value
	 */
	public void setBidPrice (java.lang.Double bidPrice) {
		this.bidPrice = bidPrice;
	}



	/**
	 * Return the value associated with the column: bid_date
	 */
	public java.util.Date getBidDate () {
		return bidDate;
	}

	/**
	 * Set the value related to the column: bid_date
	 * @param bidDate the bid_date value
	 */
	public void setBidDate (java.util.Date bidDate) {
		this.bidDate = bidDate;
	}



	/**
	 * Return the value associated with the column: bid_item
	 */
	public org.yeeku.model.Item getBidItem () {
		return bidItem;
	}

	/**
	 * Set the value related to the column: bid_item
	 * @param bidItem the bid_item value
	 */
	public void setBidItem (org.yeeku.model.Item bidItem) {
		this.bidItem = bidItem;
	}



	/**
	 * Return the value associated with the column: bid_user
	 */
	public org.yeeku.model.AuctionUser getBidUser () {
		return bidUser;
	}

	/**
	 * Set the value related to the column: bid_user
	 * @param bidUser the bid_user value
	 */
	public void setBidUser (org.yeeku.model.AuctionUser bidUser) {
		this.bidUser = bidUser;
	}





	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof org.yeeku.model.Bid)) return false;
		else {
			org.yeeku.model.Bid bid = (org.yeeku.model.Bid) obj;
			if (null == this.getBidDate() || null == bid.getBidDate() 
                || null == this.getBidUser() || null == bid.getBidUser()) return false;
			else return (this.getBidDate().equals(bid.getBidDate()) 
                && this.getBidUser().equals(bid.getBidUser()));
		}
	}

	public int hashCode () {

		return bidUser.hashCode() + bidDate.hashCode();
	}

	public int compareTo (Object obj) {
		if (obj.hashCode() > hashCode()) return 1;
		else if (obj.hashCode() < hashCode()) return -1;
		else return 0;
	}

	public String toString () {
		return super.toString();
	}


}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -