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

📄 addproductform.java

📁 网上购物系统 基于jsp实现 运行环境eclipse+My SQL+TomCat
💻 JAVA
字号:
/* * Generated by MyEclipse Struts * Template path: templates/java/JavaClass.vtl */package book.jsj0707.struts.form;import javax.servlet.http.HttpServletRequest;import org.apache.struts.action.ActionErrors;import org.apache.struts.action.ActionForm;import org.apache.struts.action.ActionMapping;import org.apache.struts.action.ActionMessage;/**  * MyEclipse Struts * Creation date: 01-10-2009 *  * XDoclet definition: * @struts.form name="addProductForm" */public class AddProductForm extends ActionForm {	/*	 * Generated fields	 */	/** author property */	private String author;	/** categoryid property */	private String categoryid;	/** price property */	private String price;	/** bookname property */	private String bookname;	/** introduce property */	private String introduce;	/** img property */	private String img;	/** publisherid property */	private String publisherid;	/** publishdate property */	private String publishdate;	/** onhand property */	private Long onhand;	/*	 * Generated Methods	 */	/** 	 * Method validate	 * @param mapping	 * @param request	 * @return ActionErrors	 */	public ActionErrors validate(ActionMapping mapping,			HttpServletRequest request) {		ActionErrors errors = new ActionErrors();		if (this.author == null || this.author.length() == 0) {			errors.add("authorname", new ActionMessage("authorname.add"));		}		if (this.bookname == null || this.bookname.length() == 0) {			errors.add("bookname", new ActionMessage("bookname.add"));		}		if (this.categoryid == null || this.categoryid.length() == 0) {			errors.add("categoryid", new ActionMessage("categoryid.add"));		}		if (this.introduce == null || this.introduce.length() == 0) {			errors.add("introduce", new ActionMessage("introduce.add"));		}		if (this.onhand <0 || this.onhand>9999) {			errors.add("onhand", new ActionMessage("onhand.add"));		}		if (this.price == null || this.price.length() == 0) {			errors.add("price", new ActionMessage("price.add"));		}		if (this.publisherid == null || this.publisherid.length() == 0) {			errors.add("publisherid", new ActionMessage("publisherid.add"));		}		return errors;	}	/** 	 * Method reset	 * @param mapping	 * @param request	 */	public void reset(ActionMapping mapping, HttpServletRequest request) {		// TODO Auto-generated method stub	}	/** 	 * Returns the author.	 * @return String	 */	public String getAuthor() {		return author;	}	/** 	 * Set the author.	 * @param author The author to set	 */	public void setAuthor(String author) {		this.author = author;	}	/** 	 * Returns the categoryid.	 * @return String	 */	public String getCategoryid() {		return categoryid;	}	/** 	 * Set the categoryid.	 * @param categoryid The categoryid to set	 */	public void setCategoryid(String categoryid) {		this.categoryid = categoryid;	}	/** 	 * Returns the price.	 * @return Float	 */	public String getPrice() {		return price;	}	/** 	 * Set the price.	 * @param price The price to set	 */	public void setPrice(String price) {		this.price = price;	}	/** 	 * Returns the bookname.	 * @return String	 */	public String getBookname() {		return bookname;	}	/** 	 * Set the bookname.	 * @param bookname The bookname to set	 */	public void setBookname(String bookname) {		this.bookname = bookname;	}	/** 	 * Returns the introduce.	 * @return String	 */	public String getIntroduce() {		return introduce;	}	/** 	 * Set the introduce.	 * @param introduce The introduce to set	 */	public void setIntroduce(String introduce) {		this.introduce = introduce;	}	/** 	 * Returns the img.	 * @return String	 */	public String getImg() {		return img;	}	/** 	 * Set the img.	 * @param img The img to set	 */	public void setImg(String img) {		this.img = img;	}	/** 	 * Returns the publisherid.	 * @return String	 */	public String getPublisherid() {		return publisherid;	}	/** 	 * Set the publisherid.	 * @param publisherid The publisherid to set	 */	public void setPublisherid(String publisherid) {		this.publisherid = publisherid;	}	/** 	 * Returns the publishdate.	 * @return String	 */	public String getPublishdate() {		return publishdate;	}	/** 	 * Set the publishdate.	 * @param publishdate The publishdate to set	 */	public void setPublishdate(String publishdate) {		this.publishdate = publishdate;	}	/** 	 * Returns the onhand.	 * @return Long	 */	public Long getOnhand() {		return onhand;	}	/** 	 * Set the onhand.	 * @param onhand The onhand to set	 */	public void setOnhand(Long onhand) {		this.onhand = onhand;	}}

⌨️ 快捷键说明

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