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

📄 addbookform.java

📁 eclipse+struts+sqlserver 简单图书管理系统,内有文档
💻 JAVA
字号:
/*
 * Generated by MyEclipse Struts
 * Template path: templates/java/JavaClass.vtl
 */
package kignbi.dong.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-29-2008
 * 
 * XDoclet definition:
 * @struts.form name="addBookForm"
 */
public class AddBookForm extends ActionForm {
	/*
	 * Generated fields
	 */

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

	/** bprice property */
	private String bprice;

	/** bkind property */
	private String bkind;

	/** bpublish property */
	private String bpublish;

	/** bnumber property */
	private String bnumber;

	/** bid property */
	private String bid;

	/** bdt_publish property */
	private String bdt_publish;

	/** bname property */
	private String bname;

	/** bauthor property */
	private String bauthor;

	/*
	 * Generated Methods
	 */

	/** 
	 * Method validate
	 * @param mapping
	 * @param request
	 * @return ActionErrors
	 */
	public ActionErrors validate(ActionMapping mapping,
			HttpServletRequest request) {
		// TODO Auto-generated method stub
		ActionErrors errors=new ActionErrors();
		
	    if((bid==null)|(bid.length()<1)){
		     errors.add("bid",new ActionMessage("add.book.nobid"));
	    }
		if((bname==null)|(bname.length()<1)){
			errors.add("bname",new ActionMessage("add.book.nobname"));}
		
	
		  if((bnumber== null)|(bnumber.length()<1)){
			  errors.add("bnumber",new ActionMessage("add.book.nobnumber"));
		  }
		  else{
			  try {  
				  if  ( !(new   Double(bnumber)).isNaN()) {}
			   }
			  catch (Exception e){
				errors.add("bnumber",new ActionMessage("add.book.formatbnumber"));
			  }
			}
		  if((bprice==null)|(bprice.length()<1)){
			  errors.add("bnumber",new ActionMessage("add.book.noprice"));
		  } 
		     else{
		          try { 
			        if   ( !(new   Float(bprice)).isNaN()) 
			          {}
			        }
		           catch (Exception e){
			       errors.add( "bprice",new ActionMessage("add.book.formatbprice"));
		  }
		 }
		
		
	
		return errors;
}

	/** 
	 * Method reset
	 * @param mapping
	 * @param request
	 */
	public void reset(ActionMapping mapping, HttpServletRequest request) {
		// TODO Auto-generated method stub
	}

	/** 
	 * Returns the bprice.
	 * @return String
	 */
	public String getBprice() {
		return bprice;
	}

	/** 
	 * Set the bprice.
	 * @param bprice The bprice to set
	 */
	public void setBprice(String bprice) {
		this.bprice = bprice;
	}

	/** 
	 * Returns the bkind.
	 * @return String
	 */
	public String getBkind() {
		return bkind;
	}

	/** 
	 * Set the bkind.
	 * @param bkind The bkind to set
	 */
	public void setBkind(String bkind) {
		this.bkind = bkind;
	}

	/** 
	 * Returns the bpublish.
	 * @return String
	 */
	public String getBpublish() {
		return bpublish;
	}

	/** 
	 * Set the bpublish.
	 * @param bpublish The bpublish to set
	 */
	public void setBpublish(String bpublish) {
		this.bpublish = bpublish;
	}

	/** 
	 * Returns the bnumber.
	 * @return String
	 */
	public String getBnumber() {
		return bnumber;
	}

	/** 
	 * Set the bnumber.
	 * @param bnumber The bnumber to set
	 */
	public void setBnumber(String bnumber) {
		this.bnumber = bnumber;
	}

	/** 
	 * Returns the bid.
	 * @return String
	 */
	public String getBid() {
		return bid;
	}

	/** 
	 * Set the bid.
	 * @param bid The bid to set
	 */
	public void setBid(String bid) {
		this.bid = bid;
	}

	/** 
	 * Returns the bdt_publish.
	 * @return String
	 */
	public String getBdt_publish() {
		return bdt_publish;
	}

	/** 
	 * Set the bdt_publish.
	 * @param bdt_publish The bdt_publish to set
	 */
	public void setBdt_publish(String bdt_publish) {
		this.bdt_publish = bdt_publish;
	}

	/** 
	 * Returns the bname.
	 * @return String
	 */
	public String getBname() {
		return bname;
	}

	/** 
	 * Set the bname.
	 * @param bname The bname to set
	 */
	public void setBname(String bname) {
		this.bname = bname;
	}

	/** 
	 * Returns the bauthor.
	 * @return String
	 */
	public String getBauthor() {
		return bauthor;
	}

	/** 
	 * Set the bauthor.
	 * @param bauthor The bauthor to set
	 */
	public void setBauthor(String bauthor) {
		this.bauthor = bauthor;
	}
}

⌨️ 快捷键说明

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