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

📄 product.java

📁 java学习的必要的资料,servlet的说明很好
💻 JAVA
字号:
package com.estore.struts.entity;import java.io.Serializable;import java.sql.Date;import java.util.HashSet;import java.util.Set;public class Product implements Serializable,Cloneable {	/**	 * 	 */	private static final long serialVersionUID = 567590787346587554L;	private Integer productid;	private String name;	private String isbn;	private String printer;	private String author;	private double price;	private int booknum;	private String description;	private String imagepath;		private Date createtime;		private Integer state;	private Catalog catalog = new Catalog();		private Set<OrderItem> orderItems=new HashSet<OrderItem>();		public void addOrderItems(OrderItem o){		this.orderItems.add(o);		}		public Catalog getCatalog() {		return catalog;	}	public void setCatalog(Catalog catalog) {		this.catalog = catalog;	}	public String getAuthor() {		return author;	}	public void setAuthor(String author) {		this.author = author;	}	public int getBooknum() {		return booknum;	}	public void setBooknum(int booknum) {		this.booknum = booknum;	}	public String getDescription() {		return description;	}	public void setDescription(String description) {		this.description = description;	}	public String getImagepath() {		return imagepath;	}	public void setImagepath(String imagepath) {		this.imagepath = imagepath;	}	public String getIsbn() {		return isbn;	}	public void setIsbn(String isbn) {		this.isbn = isbn;	}	public String getName() {		return name;	}	public void setName(String name) {		this.name = name;	}	public double getPrice() {		return price;	}	public void setPrice(double price) {		this.price = price;	}	public String getPrinter() {		return printer;	}	public void setPrinter(String printer) {		this.printer = printer;	}	public Integer getProductid() {		return productid;	}	public void setProductid(Integer productid) {		this.productid = productid;	}	public Date getCreatetime() {		return createtime;	}	public void setCreatetime(Date createtime) {		this.createtime = createtime;	}	public Integer getState() {		return state;	}	public void setState(Integer state) {		this.state = state;	}	public Set<OrderItem> getOrderItems() {		return orderItems;	}	public void setOrderItems(Set<OrderItem> orderItems) {		this.orderItems = orderItems;	}//	@Override//	public String toString() {//		return "productid: "+productid//				+"\n name: "+name//				+"\n isbn: "+isbn//				+"\n printer: "+printer//				+"\n author: "+author//				+"\n price:"+price//				+"\n booknum: "+booknum//				+"\n description: "+description//				+"\n imagepath: "+imagepath//				+"\n createtime: "+createtime//				+"\n state: "+ state+"\n catalog: "+catalog//				+"\n ---product end--- \n";//	}////	@Override//	public boolean equals(Object obj) {//		return this.hashCode() == obj.hashCode();//	}////	@Override//	public int hashCode() {//		return new Integer(productid).hashCode();//	}//	@Override	public Object clone() throws CloneNotSupportedException {		// TODO Auto-generated method stub		return super.clone();	}}

⌨️ 快捷键说明

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