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

📄 goods.java

📁 struts和hibernate集成的网上拍卖系统
💻 JAVA
字号:
package y2.yxb.entity;

import java.text.ParseException;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;

/**
 * Goods generated by MyEclipse Persistence Tools
 */

public class Goods implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private Long goodsId;

	private String goodsName;

	private Double goodsPrice;

	private String goodsPic;

	private String goodsDesc;

	private Long salerId;

	private Date beginTime;

	private Date endTime;

	private Long buyerId;

	private Integer goodsStatus;

	private String beginTimeStr;

	private String endTimeStr;

	private Set bids = new HashSet(0);

	private User user = new User();

	// Constructors

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public Set getBids() {
		return bids;
	}

	public void setBids(Set bids) {
		this.bids = bids;
	}

	/** default constructor */
	public Goods() {
	}

	/** minimal constructor */
	public Goods(String goodsName, Double goodsPrice, Long salerId,
			Integer goodsStatus) {
		this.goodsName = goodsName;
		this.goodsPrice = goodsPrice;
		this.salerId = salerId;
		this.goodsStatus = goodsStatus;
	}

	/** full constructor */
	public Goods(String goodsName, Double goodsPrice, String goodsPic,
			String goodsDesc, Long salerId, Date beginTime, Date endTime,
			Long buyerId, Integer goodsStatus) {
		this.goodsName = goodsName;
		this.goodsPrice = goodsPrice;
		this.goodsPic = goodsPic;
		this.goodsDesc = goodsDesc;
		this.salerId = salerId;
		this.beginTime = beginTime;
		this.endTime = endTime;
		this.buyerId = buyerId;
		this.goodsStatus = goodsStatus;
	}

	// Property accessors

	public Long getGoodsId() {
		return this.goodsId;
	}

	public void setGoodsId(Long goodsId) {
		this.goodsId = goodsId;
	}

	public String getGoodsName() {
		return this.goodsName;
	}

	public void setGoodsName(String goodsName) {
		this.goodsName = goodsName;
	}

	public Double getGoodsPrice() {
		return this.goodsPrice;
	}

	public void setGoodsPrice(Double goodsPrice) {
		this.goodsPrice = goodsPrice;
	}

	public String getGoodsPic() {
		return this.goodsPic;
	}

	public void setGoodsPic(String goodsPic) {
		this.goodsPic = goodsPic;
	}

	public String getGoodsDesc() {
		return this.goodsDesc;
	}

	public void setGoodsDesc(String goodsDesc) {

		this.goodsDesc = goodsDesc;
	}

	public Long getSalerId() {
		return this.salerId;
	}

	public void setSalerId(Long salerId) {
		this.salerId = salerId;
	}

	public Long getBuyerId() {
		return this.buyerId;
	}

	public void setBuyerId(Long buyerId) {
		this.buyerId = buyerId;
	}

	public Integer getGoodsStatus() {
		return this.goodsStatus;
	}

	public void setGoodsStatus(Integer goodsStatus) {
		this.goodsStatus = goodsStatus;
	}

	public Date getBeginTime() {
		return beginTime;
	}

	public void setBeginTime(Date beginTime) {

		this.beginTime = beginTime;
	}

	public Date getEndTime() {
		return endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}

	public String getBeginTimeStr() {
		return beginTimeStr;
	}

	public void setBeginTimeStr(String beginTimeStr) {
		try {
			this.beginTime = new java.text.SimpleDateFormat("yyyy-MM-dd")
					.parse(beginTimeStr);
		} catch (ParseException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

	public String getEndTimeStr() {
		return endTimeStr;
	}

	public void setEndTimeStr(String endTimeStr) {
		try {
			this.endTime = new java.text.SimpleDateFormat("yyyy-MM-dd")
					.parse(endTimeStr);
		} catch (ParseException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

	@Override
	public int hashCode() {
		final int PRIME = 31;
		int result = 1;
		result = PRIME * result + ((beginTimeStr == null) ? 0 : beginTimeStr.hashCode());
		result = PRIME * result + ((endTimeStr == null) ? 0 : endTimeStr.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		final Goods other = (Goods) obj;
		if (beginTimeStr == null) {
			if (other.beginTimeStr != null)
				return false;
		} else if (!beginTimeStr.equals(other.beginTimeStr))
			return false;
		if (endTimeStr == null) {
			if (other.endTimeStr != null)
				return false;
		} else if (!endTimeStr.equals(other.endTimeStr))
			return false;
		return true;
	}

}

⌨️ 快捷键说明

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